Hi, yep, I think gsm_to_latin1 call is better as develop any workarounds. In the first place is a question, why \0 included in the DLR message? Only possible thing that I can imagine, that you sent message that contained \0 and Mblox just copied start of it after text: without encoding. If this is not true then it's a Mblox bug.
Thanks, Alex P.S. Please never ever use // as comments in C code. Strict C compilers doesn't allow it. Mi Reflejo wrote: > HI, > > Do you think so?. gsm_to_latin1 replaces \0 to @ If 00 comes in the > middle or in service id, delivery report does not match with original > message. > > Anyway i'm attaching patch with call to gsm_to_latin1 > > > -- > Regards, > MartÃn. > > On 5/15/06, Alexander Malysh <[EMAIL PROTECTED]> wrote: >> Hi, >> >> it would be more appropriate to call gsm_to_latin1(...) for DLR msgdata. >> >> Mi Reflejo wrote: >> >> > Example: >> > >> > 2006-04-28 16:09:30 [3130] [7] DEBUG: data: 74 65 78 74 3a 20 00 >> > text: >> > . >> > >> > 2006-05-13 01:42:10 [6892] [3] SQLBOXDEBUG: Query debug: INSERT INTO >> > sent_sms (sql_id, momt, sender, receiver, udhdata, m >> > sgdata, time, smsc_id, service, account, sms_type, mclass, mwi, coding, >> > compress, validity, deferred, dlr_mask, dlr >> > _url, pid, alt_dcs, rpi, charset, boxc_id, binfo) VALUES (NULL, 'MO', >> > '83252', '+447766906376', NULL, 'id:566357235 >> > sub:001 dlvrd:001 submit date:0604301954 done date:0604301954 >> > stat:ACKED >> > err:003 text: >> > 2006-05-13 01:42:10 [6892] [3] ERROR: MYSQL: You have an error in your >> > SQL syntax; check the manual that correspond >> > s to your MySQL server version for the right syntax to use near >> > ''id:566357235 sub:001 dlvrd:001 submit date:060430 >> > 1954 done date:0604301954 stat' at line 1 >> > >> > Regards >> > >> > On 5/13/06, Mi Reflejo <[EMAIL PROTECTED]> wrote: >> >> * gw/smsc/smsc_smpp.c >> >> -Remove Null Terminated Character from Delivery Reports >> >> Some providers like MBLOX send 00 hex character in delivery reports. >> >> >> >> if handle_dlr does not do any conversion to msgdata when a Delivery >> >> Reports comes with 00 hex character the cstr representation of >> >> msgdata will put an additional \0 to the end - and when this string is >> >> concatenated to another (like when sqlbox does an INSERT statement) >> >> the final string has an \0 in the middle. This may affect a >> >> lot of operations with the final string. >> >> >> >> >> >> >> >> -- >> Thanks, >> Alex >> >> >> -- Thanks, Alex
