Patch for http smsc

Bassam Al-Sarori <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <CADjNs2ggtka+RYp25mFZSn2oTczGT6UcGQYA5_ew89wu2mSkVw@mail.gmail.com>
Hi all,

I am new to this mailing list but have been using Kannel for a long time.

I want to share a patch which I hope to be useful.

The patch solves two issues which I faced with http smsc (generic)

1) URL Parameters of an MO message request are not logged. Only the base URL
gets logged, for example,
2011-10-10 00:35:06 [2930] [7] DEBUG: HTTP[httpsmsc]: Got request `/send'

Which makes it hard for debugging

So, I made some changes so that the full URL and parameters are logged

2011-10-10 00:35:06 [2930] [7] DEBUG: HTTP[httpsmsc]: Got request
`/send?from=13123&to=6774638981&text=hi&coding=0&udh='

2) Incorrect success reply for failed MOs. SMSC assumes that the only case
of failure is when bb_smscconn_receive returns -1, which is not correct
(bb_smscconn_receive never returns -1). So, I changed it to only assume
success in case of SMSCCONN_SUCCESS or SMSCCONN_QUEUED is returned.

Please note that I am not an experienced C programmer. So, if you find any
stupid mistakes let me know. Thanks!


Regards,
Bassam
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.