summaryrefslogtreecommitdiff
path: root/include/asterisk/xmpp.h
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2012-07-17 16:32:10 +0000
committerJoshua Colp <jcolp@digium.com>2012-07-17 16:32:10 +0000
commit44345b097337614bbfa5a080f745a770b6e04581 (patch)
treedd7b016062d6667df18ab3897fd0c85d1c03dd82 /include/asterisk/xmpp.h
parent6027b26fa7de6a70a3f1335017d07a22f4069409 (diff)
Fix a crash as a result of propagating MWI or device state over XMPP when the client is disconnected.
The MWI and device state propagation code wrongly assumes that an XMPP client connection will remain established at all times. This fix corrects that by making the lifetime of the subscription the same as the lifetime of the connection itself. As the connection is established and disconnected the subscription itself is created and destroyed. (closes issue ASTERISK-18078) Reported by: elguero git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/xmpp.h')
-rw-r--r--include/asterisk/xmpp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/xmpp.h b/include/asterisk/xmpp.h
index 1bac90042..d0c25707f 100644
--- a/include/asterisk/xmpp.h
+++ b/include/asterisk/xmpp.h
@@ -134,6 +134,8 @@ struct ast_xmpp_client {
pthread_t thread;
int timeout;
unsigned int reconnect:1; /*!< Reconnect this client */
+ struct ast_event_sub *mwi_sub; /*!< If distributing event information the MWI subscription */
+ struct ast_event_sub *device_state_sub; /*!< If distributing event information the device state subscription */
};
/*!