Hello,

 Here is another patch to reclaim the ring-buffer slot used by any
unacked EMI/UCP keep-alive (OP 31) after at least waitack seconds. This
prevents the window to fill up in which case kannel would get stuck
unable to send any more requests because the window is full.

I'm not sure this is the best way to fix the problem. The other
solution would be to handle the keep-alive in the same way as normal
sent message and reopen the connection. However, I believe this has not
been done so previously for some reason. I'm also seeing frequent
unacked keep-alive on some connections we have to an operator (in
flow-control and not windowing mode) which pushes me to believe it
wouldn't be that nice to reopen the connection too frequently.

Cheers,

                                Olivier

-- 
______________________________________________________________________
MNC Mobile News Channel SA              Direct phone: +41 21 317 50 25
Olivier Dormond                         Central:      +41 21 317 50 20
Av. de la Gare 10                       Fax:          +41 21 317 50 21
1003 Lausanne                           Email:          [email protected]
diff -rubB kannel-1.4.3/gw/smsc/smsc_emi.c kannel-1.4.3-keepalive-window-filling-fix/gw/smsc/smsc_emi.c
--- kannel-1.4.3/gw/smsc/smsc_emi.c	2009-01-12 17:46:50.000000000 +0100
+++ kannel-1.4.3-emi-keepalive-window-filling-fix/gw/smsc/smsc_emi.c	2010-07-08 10:39:52.000000000 +0200
@@ -1239,6 +1239,8 @@
 		    warning(0, "EMI2[%s]: Alert (operation 31) was not "
 			    "ACKed within %d seconds", octstr_get_cstr(privdata->name),
 			    PRIVDATA(conn)->waitack);
+		    PRIVDATA(conn)->slots[i].sendtime = 0;
+		    PRIVDATA(conn)->unacked--;
 		    if (PRIVDATA(conn)->flowcontrol) PRIVDATA(conn)->can_write=1;
 		} else {
 		    panic(0, "EMI2[%s]: Bug, no timeout handler for sent packet",

Reply via email to