[svn-commits] marquis: branch group/pinana-publish-1.4 r296529 - /team/group/pinana-publish...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Nov 28 14:31:46 CST 2010


Author: marquis
Date: Sun Nov 28 14:31:42 2010
New Revision: 296529

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=296529
Log:
Copy the category so the memory doesn't get pulled out from under us.

Modified:
    team/group/pinana-publish-1.4/channels/chan_sip.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=296529&r1=296528&r2=296529
==============================================================================
--- team/group/pinana-publish-1.4/channels/chan_sip.c (original)
+++ team/group/pinana-publish-1.4/channels/chan_sip.c Sun Nov 28 14:31:42 2010
@@ -19867,10 +19867,11 @@
 
 
 	while ( (cat = ast_category_browse(pcfg, cat)) ) {
-		char* type = NULL;
-		char* host = NULL;
-		char* domain = NULL;
-		char* filter = NULL;
+		char *type = NULL;
+		char *host = NULL;
+		char *domain = NULL;
+		char *filter = NULL;
+		char *name = ast_strdupa(cat);
 		if (!strcasecmp(cat, "general")) {
 			continue;
 		}
@@ -19893,7 +19894,7 @@
 			continue;
 		}
 		if (!strcasecmp(type, "presence")) {
-			publisher = sip_publisher_init(cat, host, domain, filter);
+			publisher = sip_publisher_init(name, host, domain, filter);
 			if (publisher) {
 				ao2_link(devstate_publishers, publisher);
 			}




More information about the svn-commits mailing list