Merged revisions 114198 via svnmerge from
authorPhilippe Sultan <philippe.sultan@gmail.com>
Thu, 17 Apr 2008 13:46:17 +0000 (13:46 +0000)
committerPhilippe Sultan <philippe.sultan@gmail.com>
Thu, 17 Apr 2008 13:46:17 +0000 (13:46 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114198 | phsultan | 2008-04-17 15:42:23 +0200 (Thu, 17 Apr 2008) | 2 lines

Use keepalives effectively in order diagnose bug #12432.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114199 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index 5bcf70f..d56505a 100644 (file)
@@ -1889,7 +1889,7 @@ static void *aji_recv_loop(void *data)
                else if (res == IKS_NET_TLSFAIL)
                        ast_log(LOG_WARNING, "JABBER:  Failure in TLS.\n");
                else if (client->timeout == 0 && client->state == AJI_CONNECTED) {
-                       res = aji_send_raw(client, " ");
+                       res = client->keepalive ? aji_send_raw(client, " ") : IKS_OK;
                        if(res == IKS_OK)
                                client->timeout = 50;
                        else