[Asterisk-code-review] res xmpp: Correct implementation of JABBER STATUS & JabberSt... (asterisk[13])

Sean Bright asteriskteam at digium.com
Thu Mar 23 10:45:32 CDT 2017


Hello Anonymous Coward #1000019, Joshua Colp,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/5286

to look at the new patch set (#2).

Change subject: res_xmpp: Correct implementation of JABBER_STATUS & JabberStatus
......................................................................

res_xmpp: Correct implementation of JABBER_STATUS & JabberStatus

The documentation for JABBER_STATUS (and the deprecated JabberStatus
app) indicate that a return value of 7 indicates that the specified
buddy was not in the roster. It also indicates that you can specify a
"bare" JID (one without a resource). Unfortunately the actual behavior
does not match the documented behavior.

Assuming that our roster includes the buddy online and available
"valid at example.org/Valid" and does *not* include the buddy
"invalid at example.org", the JABBER_STATUS() function returns the
following before this patch:

+------------------------------+------------+--------------------------+
| Buddy                        | Status     | Result                   |
+------------------------------+------------+--------------------------+
| valid at example.org            |  Online    |  7 (Not in roster)       |
| valid at example.org/Valid      |  Online    |  1 (Online)              |
| valid at example.org/Invalid    |  N/A       |  7 (Not in roster)       |
| invalid at example.org          |  N/A       |  Error logged, no return |
| invalid at example.org/Valid    |  N/A       |  Error logged, no return |
+------------------------------+------------+--------------------------+

And after this patch:

+------------------------------+------------+--------------------------+
| Buddy                        | Status     | Result                   |
+------------------------------+------------+--------------------------+
| valid at example.org            |  Online    |  1 (Online)              |
| valid at example.org/Valid      |  Online    |  1 (Online)              |
| valid at example.org/Invalid    |  N/A       |  6 (Offline)             |
| invalid at example.org          |  N/A       |  7 (Not in roster)       |
| invalid at example.org/Valid    |  N/A       |  7 (Not in roster)       |
+------------------------------+------------+--------------------------+

This brings the behavior in line with the documentation.

ASTERISK-23510 #close
Reported by: Anthony Critelli

Change-Id: I9c3241035363ef4a6bdc21fabfd8ffcd9ec657bf
---
M res/res_xmpp.c
1 file changed, 31 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/86/5286/2
-- 
To view, visit https://gerrit.asterisk.org/5286
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9c3241035363ef4a6bdc21fabfd8ffcd9ec657bf
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list