]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 May 2007 00:36:15 +0000 (00:36 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 May 2007 00:36:15 +0000 (00:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5060 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c

index 991dd699267282857e7a493dcabf4db48f73a3f4..d6262de1dde58261a7fa2605f0de1a6e7c6af03c 100644 (file)
@@ -244,7 +244,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
 
        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);
 
index c12a12b8e8327742bc7dd1236790299378bc89a4..5e4c3abeeed03262fbd33c1844084a571dd9ce66 100644 (file)
@@ -359,6 +359,10 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
                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 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
 
        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 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                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);