Yes - but read attempts does not cause the module to give up on that modem. I think that failing to write to the modem is something which should cause kannel to give up ever trying to get the modem up to speed (for example : when the user specified an incorrect device line for the modem). maybe failing to read should also cause the module to give up ?
In addition to getting at2_write_line_cstr to return a proper return code, my patch also fix at2_send_modem_command to regard a -1 return from at2_write_line_cstr as a cause for alarm and return a -1 error code, thus skipping the at2_wait_modem_command call which would have failed anyway. Oded Arbel m-Wise ltd. -----Original Message----- From: Andreas Fink [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 6:43 PM To: Oded Arbel Cc: [EMAIL PROTECTED] Subject: Re: smsc_at2 module doesnot detect failed writes to modem. >well it doesn't - I can prove it :-) > >at2_write_line_cstr always return 0 no matter what happens. >what do you say about this patch ? > You're right by saying at2_write_line_cstr always returns 0. I consider that a cosmetic bug. However that has absolutely no influence as the return code is nowhere used. If it can't write to the device then you will not get any from the device back either and it will fail during the next read attempt. I've cleaned the code up a little bit. -- Andreas Fink Fink-Consulting ------------------------------------------------------------------ Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com ------------------------------------------------------------------ Something urgent? Try http://www.smsrelay.com/ Nickname afink