[PATCH] emi2 driver login behaviour

"Angel Fradejas" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Yes, I know that's my provider problem. I just wanted to point out a
situation where a re-connect loop is a must.

Find attached the patch for that.

Index: gw/smsc_emi2.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc_emi2.c,v
retrieving revision 1.39
diff -u -r1.39 smsc_emi2.c
--- gw/smsc_emi2.c	2002/01/17 07:52:39	1.39
+++ gw/smsc_emi2.c	2002/01/30 09:47:56
@@ -237,10 +237,9 @@
 	    if (result == -2) {
 		/* Are SMSCs going to return any temporary errors? If so,
 		 * testing for those error codes should be added here. */
-		error(0, "smsc_emi2: Server rejected our login, giving up");
-		conn->why_killed = SMSCCONN_KILLED_WRONG_PASSWORD;
+		error(0, "smsc_emi2: Server rejected our login, retrying");
 		conn_destroy(server);
-		return NULL;
+		continue;
 	    }
 	    else if (result == 0) {
 		error(0, "smsc_emi2: Got no reply to login attempt "


-----Mensaje original-----
De: Stipe Tolj [mailto:[email protected]]
Enviado el: martes 29 de enero de 2002 21:47
Para: Angel Fradejas
CC: Kannel Developers
Asunto: Re: [RFC] emi2 driver login behaviour


Angel Fradejas wrote:
>
> My EMI2 provider from time to time leaves my connections in a zombie
state:
> althought I closed it, they see them as already open (they have problems
> with their soft I guess). The result is that when I try to login again
they
> reject me with a "number of sessions exceeded" reason.
>
> Eventually, the sessions they have will die and I will be able to login.

This session misbehaviour/limit is definitly on the server side (your
provider).

> Others drivers will sleep and try again. I think this is the way to go, as
> Kannel is meant to run 24/7 mostly unattended. The modifications needed to
> do that are trivial. I have done it with good results.
>
> What do you think?

I think looping in order to try to re-connect is a thing we should
take into account here.

Can you provide us a patch against current cvs and we are going to
incorporate it.

BTW, I added this issue to STATUS.

Stipe

[email protected]
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
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
patch_loop_connect_emi2.diff (application/octet-stream, 768 B)
Index: gw/smsc_emi2.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc_emi2.c,v
retrieving revision 1.39
diff -u -r1.39 smsc_emi2.c
--- gw/smsc_emi2.c	2002/01/17 07:52:39	1.39
+++ gw/smsc_emi2.c	2002/01/30 09:47:56
@@ -237,10 +237,9 @@
 	    if (result == -2) {
 		/* Are SMSCs going to return any temporary errors? If so,
 		 * testing for those error codes should be added here. */
-		error(0, "smsc_emi2: Server rejected our login, giving up");
-		conn->why_killed = SMSCCONN_KILLED_WRONG_PASSWORD;
+		error(0, "smsc_emi2: Server rejected our login, retrying");
 		conn_destroy(server);
-		return NULL;
+		continue;
 	    }
 	    else if (result == 0) {
 		error(0, "smsc_emi2: Got no reply to login attempt "
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.