[Freeswitch-svn] [commit] r5060 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Tue May 1 20:36:15 EDT 2007


Author: anthm
Date: Tue May  1 20:36:15 2007
New Revision: 5060

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
update

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Tue May  1 20:36:15 2007
@@ -244,7 +244,7 @@
 
 	switch_clear_flag_locked(tech_pvt, TFLAG_IO);
 
-	switch_mutex_lock(tech_pvt->profile->flag_mutex);
+
 	tech_pvt->profile->inuse--;
 	switch_mutex_unlock(tech_pvt->profile->flag_mutex);
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Tue May  1 20:36:15 2007
@@ -359,6 +359,10 @@
 		su_root_step(profile->s_root, 1000);
 	}
 
+	while(profile->inuse) {
+		switch_yield(500000);
+	}
+
 	//sofia_reg_check_expire(profile, 0);
 	//sofia_reg_check_gateway(profile, 0);	
 	switch_thread_rwlock_wrlock(profile->rwlock);
@@ -368,9 +372,8 @@
 
 	su_root_run(profile->s_root);
 	nua_destroy(profile->nua);
-	while(profile->inuse) {
-		switch_yield(100000);
-	}
+
+
 
 	if (switch_event_create(&s_event, SWITCH_EVENT_UNPUBLISH) == SWITCH_STATUS_SUCCESS) {
 		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "service", "_sip._udp,_sip._tcp,_sip._sctp");
@@ -1270,8 +1273,9 @@
 				tech_pvt->sofia_private = NULL;
 			}
 
-			tech_pvt->nh = NULL;
-			
+			tech_pvt->nh = NULL;		
+
+
 		} else if (sofia_private) {
 			if (sofia_private->home) {
 				su_home_unref(sofia_private->home);



More information about the Freeswitch-svn mailing list