Set stream flags to zero upon initialization.

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
1.6.0
Philippe Sultan 18 years ago
parent b9aeecdb66
commit c08a968cb4

@ -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");

Loading…
Cancel
Save