Re: bug in smsc_smpp.c login failure
Nisan Bloch <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi At 03:46 PM 2/27/03 +1300, Alan McNatty wrote: >Hello, > >found that if I type in the smpp password incorrectly kannel loops >forever trying to reconnect. ie: -1 from me In the current form this path will not allow any retries for any sort of bind error. eg what happens if there is a temporary connectivity issue, or the SMPP server is down for a short while/ Nisan > [6] DEBUG: SMPP PDU 0x80f3a18 dump: > [6] DEBUG: type_name: bind_receiver_resp > [6] DEBUG: command_id: 2147483649 = 0x80000001 > [6] DEBUG: command_status: 14 = 0x0000000e > [6] DEBUG: sequence_number: 732 = 0x000002dc > [6] DEBUG: system_id: NULL > [6] DEBUG: SMPP PDU dump ends. > [6] ERROR: SMPP[xxx]: SMSC rejected login to receive, code 0x0000000e. > [6] ERROR: SMPP[xxx]: I/O error or other error. Re-connecting. > >And so on .. > >The smsc_smpp.c handle_pdu notices the error (and indeed reports on it) >but it's not noticed at the io_thread level so keeps trying. > >I worked around it by setting smpp->quitting = 1 after the error message >in handle_pdu (see patch) which has the effect of shutting down the >failing threads (so they don't keep trying). Crude - provided as example >only - will look at improving this. > >Also, in the instance you only have 1 smpp connection which when fails >in this way, the bearerbox sits without actually shutting down (ie: >doesn't realise there are no active threads and clean up, etc). Should >the bearerbox shutdown in this instance? > >Cheers, >Alan > > >-- >Alan McNatty <[email protected]>