>Hi All
>
>A small patch to the dlr code.
>In a situation of highload, we get duplicate ts columns in the
>dlr.dlr table for a particular smsc. The Mysql dlr_find code, did
>not take the destination into account in its query. Patch makes the
>SQL in dlr_find search on smsc, ts, destination rather than just
>smsc,ts
>
>Nisan
this wont work if the submitted number doesnt match the number the
SMSC is giving back. Example: I send to +4179245733 which is my phone
number in international format. The EMI driver will make 004179245733
out of it but the report will show 079245733 as the reported number
because that's the national format.
I was thinking of changing that and storing the timestamp as given
back by the EMI ACK which would always match but then I have to
update the record in memory/in database so I have to keep track the
record number with the submitted sequence number. Not that easy as it
sounded.
>
>--- cvs/gateway/gw/dlr.c Tue Apr 9 15:09:03 2002
>+++ ./dlr.c Tue Jul 9 11:13:58 2002
>@@ -413,11 +413,13 @@
> MYSQL_RES *result;
> MYSQL_ROW row;
>
>- sql = octstr_format("SELECT %s, %s, %s FROM %s WHERE %s='%s'
>AND %s='%s';",
>+ sql = octstr_format("SELECT %s, %s, %s FROM %s WHERE %s='%s' AND %s='%s'
>+ AND %s='%s';",
> octstr_get_cstr(field_mask),
>octstr_get_cstr(field_serv),
> octstr_get_cstr(field_url), octstr_get_cstr(table),
> octstr_get_cstr(field_smsc),
>- smsc, octstr_get_cstr(field_ts), ts);
>+ smsc, octstr_get_cstr(field_ts), ts,
>+
>octstr_get_cstr(field_dst), dst);
>
> mutex_lock(dlr_mutex);
--
Andreas Fink
Fink-Consulting
------------------------------------------------------------------
Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333
Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland
E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com
------------------------------------------------------------------
Something urgent? Try http://www.smsrelay.com/ Nickname afink