RE: Daily patch: gateway
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: kannel [mailto:[email protected]] > Sent: Saturday, March 09, 2002 8:30 AM > To: [email protected] > Subject: Daily patch: gateway > Index: gateway/ChangeLog > diff -u gateway/ChangeLog:1.1704 gateway/ChangeLog:1.1708 > --- gateway/ChangeLog:1.1704 Thu Mar 7 21:01:03 2002 > +++ gateway/ChangeLog Fri Mar 8 22:28:36 2002 > @@ -1,3 +1,48 @@ > +2002-03-08 Andreas Fink <[email protected]> > + * gw/smsc_at2.c: fixed a bug for +CPIN which wasnt > waiting for OK after > + +CPIN answer. This was screwing up AT command answers > and Siemens TC35 > + couldnt get initialized anymore. I don't think that this solution it correct - as some modems do not send an OK after +CPIN:READY, and AFAIR, the standard does not require it. as the modem does not send an OK, wait_modem_command() will return a timeout, which init_device() will parse as an error and therby fail the initialization. this has been discussed before and that's the reason that the ret = 4 line was introduced. you can go around making patches that are known to break some implemenations just because it will make your implemenation work. I assert that both solutions are wrong and we need to come up with a third one. how about calling wait_modem_command() once after recieving +CPIN:READY if the modem is of a type that sends an OK after that message ? (or just call it anyway and discard the return value ? at most it will slow some modems' initialization by the call timeout). -- Oded Arbel m-Wise Inc. [email protected] Experience is what causes a person to make new mistakes instead of old ones.