]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 8 Mar 2008 02:11:21 +0000 (02:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 8 Mar 2008 02:11:21 +0000 (02:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7841 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index fb35cd8ce11c9758e087a019695e6bcc9b677125..b9456ccfe1ee91a77504837d44991a337322b3d9 100644 (file)
@@ -1920,6 +1920,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                break;
        case nua_callstate_terminating:
+               if (session) {
+                       if (!switch_test_flag(tech_pvt, TFLAG_BYE)) {
+                               switch_set_flag_locked(tech_pvt, TFLAG_BYE);
+                       }
+               }
                break;
        case nua_callstate_terminated:
                if (session) {
index 3364da1209d63b6c59c0a177d8de642374b1b8ff..fd37212479be1ab66b5045e04e25b70e354901e2 100644 (file)
@@ -411,8 +411,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
        switch_queue_create(&EVENT_QUEUE[0], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
        switch_queue_create(&EVENT_QUEUE[1], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
        switch_queue_create(&EVENT_QUEUE[2], POOL_COUNT_MAX + 10, THRUNTIME_POOL);
-       switch_queue_create(&EVENT_RECYCLE_QUEUE, SWITCH_CORE_QUEUE_LEN, THRUNTIME_POOL);
-       switch_queue_create(&EVENT_HEADER_RECYCLE_QUEUE, SWITCH_CORE_QUEUE_LEN, THRUNTIME_POOL);
+       switch_queue_create(&EVENT_RECYCLE_QUEUE, 250000, THRUNTIME_POOL);
+       switch_queue_create(&EVENT_HEADER_RECYCLE_QUEUE, 250000, THRUNTIME_POOL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Eventing Engine.\n");
        switch_mutex_init(&BLOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
index c55b4da8bfb165f645c74686797dbdc3b6a4fedf..c0145fbbb507063571236b349f9d0ea1d5ebdc4c 100644 (file)
@@ -765,12 +765,17 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
        if (switch_rtp_create(&rtp_session, payload, samples_per_interval, ms_per_packet, flags, timer_name, err, pool) != SWITCH_STATUS_SUCCESS) {
                goto end;
        }
-       
+
+       switch_mutex_lock(rtp_session->flag_mutex);     
+
        if (switch_rtp_set_local_address(rtp_session, rx_host, rx_port, err) != SWITCH_STATUS_SUCCESS) {
+               switch_mutex_unlock(rtp_session->flag_mutex);   
                rtp_session = NULL;
+               goto end;
        }
 
        if (switch_rtp_set_remote_address(rtp_session, tx_host, tx_port, err) != SWITCH_STATUS_SUCCESS) {
+               switch_mutex_unlock(rtp_session->flag_mutex);   
                rtp_session = NULL;
                goto end;
        }
@@ -778,6 +783,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
  end:
 
        if (rtp_session) {
+               switch_mutex_unlock(rtp_session->flag_mutex);
                rtp_session->ready = 2;
                rtp_session->rx_host = switch_core_strdup(rtp_session->pool, rx_host);
                rtp_session->rx_port = rx_port;