[asterisk-bugs] [Asterisk 0018272]: [patch] distributed device state does not work

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Nov 26 12:31:49 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18272 
====================================================================== 
Reported By:                klaus3000
Assigned To:                Marquis
====================================================================== 
Project:                    Asterisk
Issue ID:                   18272
Category:                   Resources/res_jabber
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           1.8.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-11-07 14:00 CST
Last Modified:              2010-11-26 12:31 CST
====================================================================== 
Summary:                    [patch] distributed device state does not work
Description: 
from res_jabber.c:

/*! \brief Global flags, initialized to default values */
static struct ast_flags globalflags = { AJI_AUTOREGISTER | AJI_AUTOACCEPT
};

/*! \brief PubSub flags, initialized to default values */
static struct ast_flags pubsubflags = { AJI_AUTOREGISTER };


As you see, pubsubflags is initialized to AJI_AUTOREGISTER - but
AJI_AUTOREGISTER is meant for global flags.


from jabber.h:

enum {
        AJI_AUTOPRUNE = (1 << 0),
        AJI_AUTOREGISTER = (1 << 1),
        AJI_AUTOACCEPT = (1 << 2),
};

enum {
        AJI_XEP0248 = (1 << 0),
        AJI_PUBSUB = (1 << 1),
        AJI_PUBSUB_AUTOCREATE = (1 << 2),
};

As you see AJI_AUTOREGISTER==AJI_PUBSUB. Thus, res_jabber always thinks
that there is already a connection with pubsub enabled and thus does not
allow any other connection to enable pubsub.
====================================================================== 

---------------------------------------------------------------------- 
 (0129167) svnbot (reporter) - 2010-11-26 12:31
 https://issues.asterisk.org/view.php?id=18272#c129167 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 296355

_U  trunk/
U   trunk/res/res_jabber.c

------------------------------------------------------------------------
r296355 | marquis | 2010-11-26 12:31:48 -0600 (Fri, 26 Nov 2010) | 19
lines

Merged revisions 296354 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r296354 | marquis | 2010-11-26 13:31:17 -0500 (Fri, 26 Nov 2010) | 12
lines
  
  Fix XMPP PubSub-based distributed device state.
  
  Initialize pubsubflags to 0 so res_jabber doesn't think there is already
an XMPP connection sending device state.  Also clean up CLI commands a bit.
  
  (closes issue https://issues.asterisk.org/view.php?id=18272)
  Reported by: klaus3000
  Patches:
        res_jabber_fix_pubsubflags_and_CLI-patch.txt uploaded by klaus3000
(license 65)
  Tested by: klaus3000, Marquis
  
  Review: https://reviewboard.asterisk.org/r/1030/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=296355 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-26 12:31 svnbot         Checkin                                      
2010-11-26 12:31 svnbot         Note Added: 0129167                          
======================================================================




More information about the asterisk-bugs mailing list