patching dlr_sdb for same smsc all the time

Rory Campbell-Lange <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
I have a problem with only one incoming smsc being available as Orange
only give me one port to connect to.

I am using two outgoing smsc-groups for different ton values (short and
long numbers). However only the short code is set for incoming.

This is a REAL problem for delivery reports. These are working great
except that the wrong smsc is chosen for long-codes -- as the incoming
smsc is the short code one.

I was thinking of patching dlr-sdb.c and need some advice as I don't
have any C experience (!).

line 141:
    sql = octstr_format("SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE %s='%s' AND %s='%s' %s",
                        octstr_get_cstr(fields->field_mask), octstr_get_cstr(fields->field_serv),
                        octstr_get_cstr(fields->field_url), octstr_get_cstr(fields->field_src),
                        octstr_get_cstr(fields->field_dst), octstr_get_cstr(fields->field_boxc),
                        octstr_get_cstr(fields->table),
                        octstr_get_cstr(fields->field_smsc), octstr_get_cstr(smsc),
                        octstr_get_cstr(fields->field_ts), octstr_get_cstr(ts), sdb_get_limit_str());

I need something like:
    sql = octstr_format("SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE %s='%s' AND %s='%s' %s",
                        octstr_get_cstr(fields->field_mask), octstr_get_cstr(fields->field_serv),
                        octstr_get_cstr(fields->field_url), octstr_get_cstr(fields->field_src),
                        octstr_get_cstr(fields->field_dst), octstr_get_cstr(fields->field_boxc),
                        octstr_get_cstr(fields->table),
                        octstr_get_cstr(fields->field_smsc), 'my_short_code_smsc_name',
                        octstr_get_cstr(fields->field_ts), octstr_get_cstr(ts), sdb_get_limit_str());

Will this work?

Thanks for _any_ help!

Rory


-- 
Rory Campbell-Lange 
<[email protected]>
<www.campbell-lange.net>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.