[asterisk-commits] murf: branch murf/bug6002 r105581 - in /team/murf/bug6002: channels/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 3 15:27:33 CST 2008


Author: murf
Date: Mon Mar  3 15:27:32 2008
New Revision: 105581

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105581
Log:
This solves a bug that prevented contexts from being found, and therefore regextens being added successfully. Also, some cleanup.

Modified:
    team/murf/bug6002/channels/chan_sip.c
    team/murf/bug6002/main/pbx.c

Modified: team/murf/bug6002/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug6002/channels/chan_sip.c?view=diff&rev=105581&r1=105580&r2=105581
==============================================================================
--- team/murf/bug6002/channels/chan_sip.c (original)
+++ team/murf/bug6002/channels/chan_sip.c Mon Mar  3 15:27:32 2008
@@ -3400,11 +3400,12 @@
 		} else {
 			context = global_regcontext;
 		}
-		if (onoff)
+		if (onoff) {
 			ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
 				 ast_strdup(peer->name), ast_free_ptr, "SIP");
-		else
+		} else {
 			ast_context_remove_extension(context, ext, 1, NULL);
+		}
 	}
 }
 

Modified: team/murf/bug6002/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug6002/main/pbx.c?view=diff&rev=105581&r1=105580&r2=105581
==============================================================================
--- team/murf/bug6002/main/pbx.c (original)
+++ team/murf/bug6002/main/pbx.c Mon Mar  3 15:27:32 2008
@@ -1590,7 +1590,8 @@
 	struct ast_context *next;	
 	struct ast_include *includes;		
 	struct ast_ignorepat *ignorepats;	
-	const char *registrar;	
+	const char *registrar;
+	int refcount;
 	AST_LIST_HEAD_NOLOCK(, ast_sw) alts;	
 	ast_mutex_t macrolock;		
 	char name[256];		
@@ -5947,6 +5948,7 @@
 			application, data, datad, registrar);
 		ast_unlock_contexts();
 	}
+	
 	return ret;
 }
 
@@ -6380,7 +6382,7 @@
 	}
 
 	if (tmp->matchcid) {
-		ast_verb(3, "Added extension '%s' priority %d (CID match '%s')to %s\n",
+		ast_verb(3, "Added extension '%s' priority %d (CID match '%s') to %s\n",
 			tmp->exten, tmp->priority, tmp->cidmatch, con->name);
 	} else {
 		ast_verb(3, "Added extension '%s' priority %d to %s\n",
@@ -6791,8 +6793,6 @@
 	struct ast_ignorepat *ipi;
 	struct ast_context *tmp = con;
 
-	ast_log(LOG_NOTICE,"Destroying old version of %s\n", con->name);
-	
 	for (tmpi = tmp->includes; tmpi; ) { /* Free includes */
 		struct ast_include *tmpil = tmpi;
 		tmpi = tmpi->next;




More information about the asterisk-commits mailing list