Set stream flags to zero upon initialization.
authorPhilippe Sultan <philippe.sultan@gmail.com>
Wed, 2 Jan 2008 11:34:26 +0000 (11:34 +0000)
committerPhilippe Sultan <philippe.sultan@gmail.com>
Wed, 2 Jan 2008 11:34:26 +0000 (11:34 +0000)
When the XMPP over TLS/SSL connection resets for some reason, it is
wrongly believed as being secured, which makes the re-connection
process endlessly fail. This was reported by mvanbaak in issue #11644.

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

res/res_jabber.c

index c5e3bbf..32458ea 100644 (file)
@@ -2256,8 +2256,13 @@ static int aji_client_connect(void *data, ikspak *pak)
  */
 static int aji_initialize(struct aji_client *client)
 {
+       int connected = IKS_NET_NOCONN;
+       
+       /* reset stream flags */
+       client->stream_flags = 0;
+
        /* If it's a component, connect to user, otherwise, connect to server */
-       int connected = iks_connect_via(client->p, S_OR(client->serverhost, client->jid->server), client->port, client->component ? client->user : client->jid->server);
+       connected = iks_connect_via(client->p, S_OR(client->serverhost, client->jid->server), client->port, client->component ? client->user : client->jid->server);
 
        if (connected == IKS_NET_NOCONN) {
                ast_log(LOG_ERROR, "JABBER ERROR: No Connection\n");