<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6914">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_xmpp: Ensure the connection filter is available.<br><br>Users of the API that res_xmpp provides expect that a<br>filter be available on the client at all times. When<br>OAuth authentication support was added this requirement<br>was not maintained.<br><br>This change merely moves the OAuth authentication to<br>after the filter is created, ensuring users of res_xmpp<br>can add things to the filter as needed.<br><br>ASTERISK-27346<br><br>Change-Id: I4ac474afe220e833288ff574e32e2b9a23394886<br>(cherry picked from commit 07e17fd04ffcf204400898660a4c118666596d5d)<br>---<br>M res/res_xmpp.c<br>1 file changed, 7 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/6914/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_xmpp.c b/res/res_xmpp.c<br>index d8487f5..6ba4014 100644<br>--- a/res/res_xmpp.c<br>+++ b/res/res_xmpp.c<br>@@ -3654,13 +3654,6 @@<br> return -1;<br> }<br> <br>- if (!ast_strlen_zero(clientcfg->refresh_token)) {<br>- ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);<br>- if (fetch_access_token(clientcfg)) {<br>- return -1;<br>- }<br>- }<br>-<br> ast_xmpp_client_disconnect(client);<br> <br> client->timeout = 50;<br>@@ -3671,6 +3664,13 @@<br> return -1;<br> }<br> <br>+ if (!ast_strlen_zero(clientcfg->refresh_token)) {<br>+ ast_debug(2, "Obtaining OAuth access token for client '%s'\n", client->name);<br>+ if (fetch_access_token(clientcfg)) {<br>+ return -1;<br>+ }<br>+ }<br>+<br> /* If it's a component connect to user otherwise connect to server */<br> res = iks_connect_via(client->parser, S_OR(clientcfg->server, client->jid->server), clientcfg->port,<br> ast_test_flag(&clientcfg->flags, XMPP_COMPONENT) ? clientcfg->user : client->jid->server);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6914">change 6914</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6914"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13.18 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4ac474afe220e833288ff574e32e2b9a23394886 </div>
<div style="display:none"> Gerrit-Change-Number: 6914 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>