[svn-commits] phsultan: trunk r253261 - /trunk/res/res_jabber.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 18 10:59:24 CDT 2010


Author: phsultan
Date: Thu Mar 18 10:59:19 2010
New Revision: 253261

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253261
Log:
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

Modified:
    trunk/res/res_jabber.c

Modified: trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_jabber.c?view=diff&rev=253261&r1=253260&r2=253261
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Thu Mar 18 10:59:19 2010
@@ -2395,11 +2395,17 @@
 		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);
+    }
 }
 
 /*!




More information about the svn-commits mailing list