A couple of notes:

1. I wouldn't hardcode the "7" all over the place. At least I would use a 
constant, so it'd be easier to change by other people if needed. Better yet, 
I'd make it configurable.

2. I'm not a big fan of inlined conditions:

if (len < 7) gwlist_append(binds, dst);

or

else sql = octstr_format("DELETE FROM `%S` WHERE `%...

Regards,
--
Alejandro Guerrieri
[email protected]



On 25/06/2010, at 10:29, Nikos Balkanas wrote:

> Hi,
> 
> Thanks all for your input. This patch improves on the previous one, by 
> accounting for inexact destinations send by the SMSc and deploying LIKE %... 
> constructs in the query for last 7 digits of destination. It also will query 
> on destination only when asked to (configuration or otherwise). Since this is 
> a lot of work, this time I have only changed dlr_mysql.c to see if we all 
> agree. If we are in agreement, I will expand to rest of databases and rest of 
> code.
> 
> Notes:
> 
> 1) If no destination is specified in the DLR, it assumes that relevant 
> argument is NULL. Verified from code in the case of EMI & SMPP.
> 2) Choise to implicate dst in query depends on variable use_dst. This could 
> be configured/smsc, or to avoid unnecessary configurations, it could be set 
> from the smsc driver. I.e. always use dst on queries for EMI smscs, never for 
> others. Is this safe, or best to let user configure this?
> 
> BR,
> Nikos 
> <mysql.diff>


Reply via email to