Hi, what about attached patch ?
Am Donnerstag, 27. Februar 2003 10:30 schrieb Stipe Tolj: > Alan McNatty wrote: > > On Thu, 2003-02-27 at 18:54, Nisan Bloch wrote: > > > 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/ > > > > What I'm trying highlight is that there is a gap in logic .. > > Currently regardless of the type of error we continually retry to bind. > > If we specifically receive an error indicating the password is invalid > > the SMSC is obviously up but we may as well kill the thread. > > yep, that's true in some sense. Trying to reconnect forever while we > get the error information from the SMSC that we can't login with that > credentials *could* be considered as login abuse :) > > At least I would consider this if our SMPP clients would hammer our > SMPP server with invalid credentials. > > Stipe > > [EMAIL PROTECTED] > ------------------------------------------------------------------- > Wapme Systems AG > > Vogelsanger Weg 80 > 40470 Düsseldorf > > Tel: +49-211-74845-0 > Fax: +49-211-74845-299 > > E-Mail: [EMAIL PROTECTED] > Internet: http://www.wapme-systems.de > ------------------------------------------------------------------- > wapme.net - wherever you are -- Best regards / Mit besten Grüßen aus Köln Dipl.-Ing. Alexander Malysh ___________________________________________ Centrium GmbH Ehrenstraße 2 50672 Köln Fon: +49 (0221) 277 49 240 Fax: +49 (0221) 277 49 109 email: [EMAIL PROTECTED] web: www.centrium.de msn: [EMAIL PROTECTED] icq: 98063111
Index: gw/smsc/smsc_smpp.c =================================================================== RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v retrieving revision 1.25 diff -a -u -r1.25 smsc_smpp.c --- gw/smsc/smsc_smpp.c 23 Feb 2003 11:35:34 -0000 1.25 +++ gw/smsc/smsc_smpp.c 27 Feb 2003 10:25:35 -0000 @@ -62,6 +62,8 @@ */ enum { + SMPP_ESME_RINVPASWD = 0x0000000E, + SMPP_ESME_RINVSYSID = 0x0000000F, SMPP_ESME_RMSGQFUL = 0x00000014, SMPP_ESME_RTHROTTLED = 0x00000058, SMPP_ESME_RX_T_APPN = 0x00000064, @@ -958,6 +960,9 @@ "code 0x%08lx.", octstr_get_cstr(smpp->conn->id), pdu->u.bind_transmitter_resp.command_status); + if (pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVSYSID || + pdu->u.bind_transmitter_resp.command_status == SMPP_ESME_RINVPASWD) + smpp->quitting = 1; } else { *pending_submits = 0; smpp->conn->status = SMSCCONN_ACTIVE; @@ -972,6 +977,9 @@ "code 0x%08lx.", octstr_get_cstr(smpp->conn->id), pdu->u.bind_transceiver_resp.command_status); + if (pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVSYSID || + pdu->u.bind_transceiver_resp.command_status == SMPP_ESME_RINVPASWD) + smpp->quitting = 1; } else { *pending_submits = 0; smpp->conn->status = SMSCCONN_ACTIVE; @@ -986,6 +994,9 @@ "code 0x%08lx.", octstr_get_cstr(smpp->conn->id), pdu->u.bind_receiver_resp.command_status); + if (pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVSYSID || + pdu->u.bind_receiver_resp.command_status == SMPP_ESME_RINVPASWD) + smpp->quitting = 1; } else { /* set only resceive status if no transmitt is bind */ if (smpp->conn->status != SMSCCONN_ACTIVE) {