]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
declinatio mortuus obfirmo!
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 Mar 2010 23:03:51 +0000 (23:03 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 Mar 2010 23:03:51 +0000 (23:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16904 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index 47ac157b89f274012ea9b72f44c9e27d105f14d8..bd4700b48df43577d663cdf2d1d99348a0fb9bed 100644 (file)
@@ -2813,15 +2813,17 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *
        switch_mutex_lock(channel->profile_mutex);
 
        if (switch_channel_test_flag(channel, CF_TIMESTAMP_SET)) {
+               switch_mutex_unlock(channel->profile_mutex);
                return SWITCH_STATUS_FALSE;
        }
 
-       switch_channel_set_flag(channel, CF_TIMESTAMP_SET);
-
        if (!(caller_profile = channel->caller_profile) || !channel->variables) {
+               switch_mutex_unlock(channel->profile_mutex);
                return SWITCH_STATUS_FALSE;
        }
 
+       switch_channel_set_flag(channel, CF_TIMESTAMP_SET);
+
        if ((app_log = switch_core_session_get_app_log(channel->session))) {
                for (ap = app_log; ap && ap->next; ap = ap->next);
                last_app = ap->app;