[patch] AT2 Modem open fix and smsc_http compatibility

"Alex Judd" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <009a01c2f84c$198429d0$0201640a@alexcompaq1>
A couple of small patches attached.

The first uses the correct dialer_open functions (afai can tell) to open the
modem when trying to autodetect it's speed. This has been working here fine
with me and fixes problems I have had with troublesome wavecome units.

The second allows backward parameter compatibility for the smsc_http with
the cgi-bin/sendsms parameters. One use to use 'user' and 'pass' and the
other 'username' and 'password', so I've now made it possible to use
'username' and 'password' for both.

I've also left in the originals too so that nothing should break.

Alex
CTO
Skywire
http://www.skywire.co.uk/
at2_open_patch.diff (application/octet-stream, 575 B)
--- gateway/gw/smsc/smsc_at2.c  Thu Mar 27 08:56:42 2003
+++ gateway/gw/smsc/smsc_at2.c.alex     Tue Apr  1 12:09:23 2003
@@ -1964,7 +1964,7 @@

     int res;

-    if (at2_open_device1(privdata) == -1)
+    if (at2_open_device(privdata) == -1)
        return -1;

     at2_set_speed(privdata, speed);
@@ -1990,7 +1990,7 @@

     debug("bb.smsc.at2", 0, "AT2[%s]: detecting modem type", octstr_get_cstr(privdata->name));

-    if (at2_open_device1(privdata) == -1)
+    if (at2_open_device(privdata) == -1)
         return -1;

     at2_set_speed(privdata, privdata->speed);
smsc_http_diff (application/octet-stream, 925 B) - not displayed
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.