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
--- 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);