[asterisk-commits] marquis: branch group/pinana-publish-1.4 r297180 - in /team/group/pinana-publ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 1 17:29:23 CST 2010


Author: marquis
Date: Wed Dec  1 17:29:19 2010
New Revision: 297180

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=297180
Log:
Fix segfault, you're welcome oej!

Modified:
    team/group/pinana-publish-1.4/channels/chan_sip.c
    team/group/pinana-publish-1.4/main/devicestate.c

Modified: team/group/pinana-publish-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinana-publish-1.4/channels/chan_sip.c?view=diff&rev=297180&r1=297179&r2=297180
==============================================================================
--- team/group/pinana-publish-1.4/channels/chan_sip.c (original)
+++ team/group/pinana-publish-1.4/channels/chan_sip.c Wed Dec  1 17:29:19 2010
@@ -9930,8 +9930,8 @@
 		if (option_debug > 2) {
 			ast_log(LOG_DEBUG, "Device %s have nextstate, adding to queue\n", device->name);
 		}
-		//XXX OEJ PINANA _ This is disabled as it generates strange segfaults
-		//sip_devicestate_cb(device->name, device->nextstate, NULL);
+		
+		sip_devicestate_cb(device->name, device->nextstate, NULL);
 		device->nextstate = -1;	/* Reset next state change */
 	}
 }
@@ -10010,7 +10010,7 @@
 				/* We already have a PUBLISH transaction. Let's skip this or put it on the queue */
 				if (device->laststate != sc->state) {
 					ast_log(LOG_DEBUG, "--- We have an outstanding request for %s. Setting nextstate and kipping.\n", device->name);
-					device->nextstate = sc->state;
+					device->nextstate = sc->state;	
 				}
 			} else if (device->laststate == sc->state) {
 				ast_log(LOG_DEBUG, "--- No change, skipping PUBLISH for %s\n", device->name);
@@ -10050,6 +10050,7 @@
 			return -1;
 		}
 		device->laststate = sc->state;
+		device->nextstate = -1;
 		device->epa = create_epa_entry("dialog", pres_server->host);
 		if (!(device->epa) ) {
 			ast_log(LOG_ERROR, "Cannot allocate sip_epa_entry!\n");

Modified: team/group/pinana-publish-1.4/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinana-publish-1.4/main/devicestate.c?view=diff&rev=297180&r1=297179&r2=297180
==============================================================================
--- team/group/pinana-publish-1.4/main/devicestate.c (original)
+++ team/group/pinana-publish-1.4/main/devicestate.c Wed Dec  1 17:29:19 2010
@@ -102,7 +102,7 @@
 /* Parseable */
 const char *ast_devstate_str(enum ast_device_state state)
 {
-        return devstatestring[state - 1][1];
+	return devstatestring[state - 1][1];
 }
 /*! \brief Find out if device is active in a call or not 
 	\note find channels with the device's name in it




More information about the asterisk-commits mailing list