mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-10 20:08:16 +00:00
Merge "res_xmpp: Ensure the connection filter is available." into 13
This commit is contained in:
@@ -3654,13 +3654,6 @@ static int xmpp_client_reconnect(struct ast_xmpp_client *client)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(clientcfg->refresh_token)) {
|
||||
ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);
|
||||
if (fetch_access_token(clientcfg)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ast_xmpp_client_disconnect(client);
|
||||
|
||||
client->timeout = 50;
|
||||
@@ -3671,6 +3664,13 @@ static int xmpp_client_reconnect(struct ast_xmpp_client *client)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(clientcfg->refresh_token)) {
|
||||
ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);
|
||||
if (fetch_access_token(clientcfg)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's a component connect to user otherwise connect to server */
|
||||
res = iks_connect_via(client->parser, S_OR(clientcfg->server, client->jid->server), clientcfg->port,
|
||||
ast_test_flag(&clientcfg->flags, XMPP_COMPONENT) ? clientcfg->user : client->jid->server);
|
||||
|
||||
Reference in New Issue
Block a user