Hi,

I noticed that in gw/smsbo.c

[smsbox_req_sendsms] calls [smsbox_req_handle] which calls
[charset_processing]

while:
[smsbox_sendsms_post] calls [charset_processing] then calls
[smsbox_req_handle] which calls [charset_processing].

resulting the charset_processing is called twice in the case of post.

if the coding, charset are such that a transformation of the body is
required then the second call to charset_processing is erroneous since
the first changed the body but didn't update the charset.

At least in my senario coding=3 charset=ISO-8859-7 charset_to_utf8
fails/crashes

I suggest to remove the the call to charset_processing in the
smsbox_sendsms_post
and let smsbox_req_handle do the charset_processing

Index: gw/smsbox.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsbox.c,v
retrieving revision 1.156
diff -r1.156 smsbox.c
1392,1395d1391
<       if (charset_processing(charset, &body, coding) == -1) {
<           *status = 415;
<           ret = octstr_create("Charset or body misformed, rejected");
<       }





Reply via email to