[asterisk-commits] murf: branch murf/bug11210 r97040 - in /team/murf/bug11210: ./ channels/ incl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 8 08:49:31 CST 2008


Author: murf
Date: Tue Jan  8 08:49:31 2008
New Revision: 97040

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97040
Log:
Derek reports 1. error messages about dialoglist_unlock called too many times.(fixed--a stray unlock in find_call). 2. A lockup in the reload code; I inserted some debugs to see in which section it's locking up....\n

Modified:
    team/murf/bug11210/Makefile
    team/murf/bug11210/channels/chan_sip.c
    team/murf/bug11210/include/asterisk.h

Modified: team/murf/bug11210/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile?view=diff&rev=97040&r1=97039&r2=97040
==============================================================================
--- team/murf/bug11210/Makefile (original)
+++ team/murf/bug11210/Makefile Tue Jan  8 08:49:31 2008
@@ -105,7 +105,7 @@
 ASTLDFLAGS+=$(LDOPTS)
 
 #Uncomment this to see all build commands instead of 'quiet' output
-NOISY_BUILD=yes
+#NOISY_BUILD=yes
 
 ASTTOPDIR:=$(CURDIR)
 
@@ -113,8 +113,8 @@
 OVERWRITE=y
 
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
-;DEBUG=-g3 -pg
-;ASTLDFLAGS += -pg
+#DEBUG=-g3 -pg
+#ASTLDFLAGS += -pg
 DEBUG=-g3
 
 # Define standard directories for various platforms

Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=97040&r1=97039&r2=97040
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Tue Jan  8 08:49:31 2008
@@ -139,6 +139,9 @@
 #include "asterisk/translate.h"
 #include "asterisk/version.h"
 #include "asterisk/event.h"
+
+/* remove when someone fixes this */
+const char *ast_get_version(void);
 
 #ifndef FALSE
 #define FALSE    0
@@ -5649,14 +5652,14 @@
 
 	if (!pedanticsipchecking) {
 		if (!ast_string_field_init(&tmp_dialog, 100)) {
-			int rc;
 			ast_string_field_set(&tmp_dialog, callid, callid);
 			
 			sip_pvt_ptr = ao2_t_find(dialogs, &tmp_dialog, OBJ_POINTER, "ao2_find in dialogs");
+#ifdef DIALOG_DEBUG
 			if (sip_pvt_ptr) {
+				int rc;
 				rc = ao2_t_ref(sip_pvt_ptr,0,"");
 			}
-#ifdef DIALOG_DEBUG
 			if (!sip_pvt_ptr) {
 				struct ao2_iterator i;
 				struct sip_pvt *d2;
@@ -5673,7 +5676,6 @@
 			if (sip_pvt_ptr) {  /* well, if we don't find it-- what IS in there? */
 				/* Found the call */
 				sip_pvt_lock(sip_pvt_ptr);
-				dialoglist_unlock();
 				return sip_pvt_ptr;
 			}
 		} else { /* in pedantic mode! -- do the fancy linear search */
@@ -17619,7 +17621,7 @@
 		return;
 	/* If the call is not in UP state or redirected outside Asterisk, no need to check timers */
 
-	if (!dialog->owner || dialog->owner->_state != AST_STATE_UP || dialog->redirip.sin_addr.s_addr) /* CRASH HERE because dialog->owner is NULL */
+	if (dialog->owner->_state != AST_STATE_UP || dialog->redirip.sin_addr.s_addr) /* CRASH HERE because dialog->owner is NULL */
 		return;
 
 	/* If the call is involved in a T38 fax session do not check RTP timeout */
@@ -18969,6 +18971,7 @@
 		ucfg = ast_config_load("users.conf", config_flags);
 	}
 
+	ast_log(LOG_NOTICE,"Reload: #1\n");
 	if (reason != CHANNEL_MODULE_LOAD) {
 		ast_debug(4, "--------------- SIP reload started\n");
 
@@ -19000,7 +19003,8 @@
 		/* reinstate the user table */
 		users = ao2_t_container_alloc(hash_user_size, user_hash_cb, user_cmp_cb,"allocate users");
 	}
-
+	ast_log(LOG_NOTICE,"Reload: #2\n");
+	
 	/* Initialize copy of current global_regcontext for later use in removing stale contexts */
 	ast_copy_string(oldcontexts, global_regcontext, sizeof(oldcontexts));
 	oldregcontext = oldcontexts;
@@ -19107,6 +19111,8 @@
 
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT);
 	ast_clear_flag(&global_flags[1], SIP_PAGE2_TEXTSUPPORT);
+
+	ast_log(LOG_NOTICE,"Reload: #3\n");
 
 	/* Read the [general] config section of sip.conf (or from realtime config) */
 	for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
@@ -19403,6 +19409,7 @@
 		ast_log(LOG_WARNING, "To disallow external domains, you need to configure local SIP domains.\n");
 		allow_external_domains = 1;
 	}
+	ast_log(LOG_NOTICE,"Reload: #4\n");
 	
 	/* Build list of authentication to various SIP realms, i.e. service providers */
  	for (v = ast_variable_browse(cfg, "authentication"); v ; v = v->next) {
@@ -19469,6 +19476,7 @@
 		ast_config_destroy(ucfg);
 	}
 	
+	ast_log(LOG_NOTICE,"Reload: #5\n");
 
 	/* Load peers, users and friends */
 	cat = NULL;
@@ -19516,6 +19524,7 @@
 			}
 		}
 	}
+	ast_log(LOG_NOTICE,"Reload: #6\n");
 	bindaddr.sin_family = AF_INET;
 	internip = bindaddr;
 	if (ast_find_ourip(&internip.sin_addr, bindaddr)) {
@@ -19566,6 +19575,7 @@
 			ast_inet_ntoa(externip.sin_addr) , ntohs(externip.sin_port));
 	}
 	ast_mutex_unlock(&netlock);
+	ast_log(LOG_NOTICE,"Reload: #7\n");
 
 	/* Add default domains - host name, IP address and IP:port */
 	/* Only do this if user added any sip domain with "localdomains" */
@@ -19593,6 +19603,7 @@
 			add_sip_domain(temp, SIP_DOMAIN_AUTO, NULL);
 	}
 
+	ast_log(LOG_NOTICE,"Reload: #8\n");
 	/* Release configuration from memory */
 	ast_config_destroy(cfg);
 

Modified: team/murf/bug11210/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/include/asterisk.h?view=diff&rev=97040&r1=97039&r2=97040
==============================================================================
--- team/murf/bug11210/include/asterisk.h (original)
+++ team/murf/bug11210/include/asterisk.h Tue Jan  8 08:49:31 2008
@@ -49,6 +49,9 @@
 #define	sched_setscheduler	__PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__
 
 int ast_set_priority(int);			/*!< Provided by asterisk.c */
+
+const char *ast_get_version(void);
+const char *ast_get_version_num(void);
 
 /*!
  * \brief Register a function to be executed before Asterisk exits.




More information about the asterisk-commits mailing list