[asterisk-commits] jrose: branch 1.8 r339297 - /branches/1.8/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 4 09:01:08 CDT 2011


Author: jrose
Date: Tue Oct  4 09:01:05 2011
New Revision: 339297

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339297
Log:
Reverting revision 333265 due to component connection problems it introduces.

I'm going to attempt some generic res_jabber cleanup and come up with a new fix for this
problem, but first it seems prudent to remove this rather broad attempt to fix it and
instead approach this problem either from the same angle but looking only at canceling
(or possibly rescheduling) the send when we absolutely know it will cause a segfault 
or, if that can't be easily accomplished, strictly from the devstate side of things.
Also, I'm pretty sure a lot of the code in res_jabber isn't thread safe.

(issue ASTERISK-18626)
(issue ASTERISK-18078)


Modified:
    branches/1.8/res/res_jabber.c

Modified: branches/1.8/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_jabber.c?view=diff&rev=339297&r1=339296&r2=339297
==============================================================================
--- branches/1.8/res/res_jabber.c (original)
+++ branches/1.8/res/res_jabber.c Tue Oct  4 09:01:05 2011
@@ -1465,15 +1465,7 @@
 #endif
 	/* If needed, data will be sent unencrypted, and logHook will
 	   be called inside iks_send_raw */
-	if((client->timeout != 0 && client->state == AJI_CONNECTED) || (client->state == AJI_CONNECTING))
-	{
-	    ret = iks_send_raw(client->p, xmlstr);
-	}
-	else {
-		ast_log(LOG_WARNING, "JABBER: Unable to send message to %s, we are not connected", client->name);
-		return -1;
-	}
-
+	ret = iks_send_raw(client->p, xmlstr);
 	if (ret != IKS_OK) {
 		return ret;
 	}




More information about the asterisk-commits mailing list