Review Board 1.7.16


Fix Distributed Device State broken at sites using res_xmpp or res_jabber where Secuity Advisory AST-2012-015 is inplace.

Review Request #2452 - Created April 14, 2013 and submitted

Alec Davis
1.8 to trunk
ASTERISK-21429
Reviewers
asterisk-dev
Asterisk
The site that doesn't update it's devicestates from the remotesite is the site with ASR-2012-015 inplace.

This fixes the scenario where one site doesn't send the IE cachable=1 in the XMPP/Jabber message, to a newer system that expects to see it.

If the IE 'cachable' isn't present we need to default to AST_DEVSTATE_CACHABLE.
 Assigning the cachable variable directly from ast_event_get_ie_uint is wrong, if the IE 'cachable' isn't found ast_event_get_ie_uint() will return 0, 0 = AST_DEVSTATE_NOT_CACHABLE

We need to read the 'cachable' IE into a string first, allowing us to check that it exists, if it doesn't exist then default to cachable=AST_DEVSTATE_CACHABLE.
 If the 'cachable' IE does exist, then convert to a uint, validate value and go with it.


Caused by:
https://issues.asterisk.org/jira/browse/ASTERISK-20175
Yes, change device state, at either site, and it's reflected in the other. One site is prior to ASTERISK-21075.

Tested both sites at r385594, and states correct at both sites.
Total:
3
Open:
3
Resolved:
0
Dropped:
0
Status:
From:
Description From Last Updated Status
This should be retreived as a uint. opticron April 15, 2013, 8:54 a.m. Open
I don't see a reason to change the ordering here. opticron April 15, 2013, 8:54 a.m. Open
Idem. opticron April 15, 2013, 8:54 a.m. Open
Review request changed
Updated (April 20, 2013, 11:12 a.m.)
  • changed from pending to submitted
Committed in revision 386185

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.