Re: Additional switch for concatination count?

"Nikos Balkanas" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Thanks, Falco.

Seems to me that you are describing a very clear business case that is
related to billing. Your code is simple and clear as far as C goes. I
imagine that this is applicable to older devices, recent devices split
messages by themselves and I imagine they should calculate multibyte
characters correctly. I say you have used it on real traffic and works
without problems?

Unfortunately, I am not the cvs administrator, and for any patch to be
accepted a vote is taken. The format for the patch is slightly different
than what you sent, but we have to see what other people think.

As far as I am concerned I don't see any problems with it.

BR,

Nikos
On Tue, Dec 9, 2008 at 12:32 PM, Falko Ziemann <[email protected]> wrote:

> Hi,
>
> the problem is, that many users try to get as close as possible to the 160
> chars, but if they use e.g. the euro sign, they have one more char than they
> have calculated.
>
> I've inserted the following lines into smsbox.c:
> static int countparts = 0;
>
> in delayed_http_reply(Msg *msg):
>     switch (msg->ack.nack) {
>       case ack_success:
>         status = HTTP_ACCEPTED;
>         answer = octstr_create("0: Accepted for delivery - Parts:");
>         octstr_append_decimal(answer, countparts);
>         break;
>       case ack_buffered:
>         status = HTTP_ACCEPTED;
>         answer = octstr_create("3: Queued for later delivery - Parts:");
>         octstr_append_decimal(answer, countparts);
>         break;
>
> and in send_message(URLTranslation *trans, Msg *msg):
>     gwlist_destroy(list, NULL);
>     countparts = msg_count;
>     return msg_count;
>
> Thanks!
> Falko
>
> 2008/12/9 Nikos Balkanas <[email protected]>
>
>> Hi Falco,
>>
>> I am not sure I follow your reasoning very clearly, or how escaped
>> characters relate to concatenated messages. I think it would be clearer if
>> you could post the patch so that we can see from the code what you are
>> trying to do. I think you will get much better feedback that way.
>>
>> BR,
>>
>> Nikos
>>
>> On Tue, Dec 9, 2008 at 8:56 AM, Falko Ziemann <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I had the problem, that sometimes some of my customers miscalculate the
>>> length of a short message due to escape characters. That always brought
>>> some trouble at the end of the month, wenn they got the invoice.
>>> So I added a switch to the response of kannel, which included the
>>> information in how many concatinated parts the message was split. My
>>> problem is, that my C abilities are VERY limited, so I coded it that way
>>> that the answer in included into every response.
>>> My question: is anybody else interesseted in that function? And is
>>> anybody interesseted in that function and has the abilities to implement
>>> it in a more acceptable way?
>>>
>>> Regards
>>> Falko
>>>
>>>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.