Revision
16904
Author
anthm
Date
2010-03-04 17:03:51 -0600 (Thu, 04 Mar 2010)

Log Message

declinatio mortuus obfirmo!

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_channel.c (16903 => 16904)


--- freeswitch/trunk/src/switch_channel.c	2010-03-04 20:17:32 UTC (rev 16903)
+++ freeswitch/trunk/src/switch_channel.c	2010-03-04 23:03:51 UTC (rev 16904)
@@ -2813,15 +2813,17 @@
 	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;