aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_jabber.c
diff options
context:
space:
mode:
authorphsultan <phsultan@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-18 15:59:19 +0000
committerphsultan <phsultan@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-18 15:59:19 +0000
commitb8a852910e6e3f852395212ce2fbf604904873a9 (patch)
tree7cba866c52d7461b087d70086a313227b28cebef /res/res_jabber.c
parent259fe75b9eb99fdc52d0728c2df483bef92c99c8 (diff)
Prevent a crash when a buddy gets offline.
(closes issue #16760) Reported by: fiddur Patches: 248394.diff uploaded by fiddur (license 678)i with modifications by me Tested by: fiddur, phsultan git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253261 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_jabber.c')
-rw-r--r--res/res_jabber.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c
index d71cf0fb0..04038eabf 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -2395,11 +2395,17 @@ static void aji_handle_presence(struct aji_client *client, ikspak *pak)
ast_debug(3, "JABBER: Kinky! how did that happen %i\n", pak->show);
}
+ if (found) {
manager_event(EVENT_FLAG_USER, "JabberStatus",
"Account: %s\r\nJID: %s\r\nResource: %s\r\nStatus: %d\r\nPriority: %d"
"\r\nDescription: %s\r\n",
client->name, pak->from->partial, found->resource, found->status,
found->priority, found->description);
+ } else {
+ manager_event(EVENT_FLAG_USER, "JabberStatus",
+ "Account: %s\r\nJID: %s\r\nStatus: %d\r\n",
+ client->name, pak->from->partial, pak->show ? pak->show:IKS_SHOW_UNAVAILABLE);
+ }
}
/*!