[Freeswitch-svn] [commit] r5183 - in freeswitch/trunk/src: . include mod/applications/mod_commands
Freeswitch SVN
anthm at freeswitch.org
Mon May 14 22:21:53 EDT 2007
Author: anthm
Date: Mon May 14 22:21:53 2007
New Revision: 5183
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/switch_ivr_bridge.c
Log:
fix locking bug
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Mon May 14 22:21:53 2007
@@ -491,7 +491,7 @@
SWITCH_DECLARE(char *) switch_core_get_uuid(void);
#ifdef SWITCH_DEBUG_RWLOCKS
-SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(char *uuid_str, const char *file, const char *func, int line);
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(const char *uuid_str, const char *file, const char *func, int line);
#endif
/*!
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Mon May 14 22:21:53 2007
@@ -575,7 +575,7 @@
stream->write_function(stream, "-Error Cannot locate session!\n");
return SWITCH_STATUS_SUCCESS;
}
-
+
if (switch_strlen_zero(action) || switch_strlen_zero(path)) {
goto usage;
}
@@ -594,11 +594,11 @@
stream->write_function(stream, "USAGE: %s\n", session_record_api_interface.syntax);
switch_safe_free(mycmd);
- return SWITCH_STATUS_SUCCESS;
+
done:
- if (session) {
+ if (rsession) {
switch_core_session_rwunlock(rsession);
}
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Mon May 14 22:21:53 2007
@@ -644,14 +644,14 @@
switch_channel_set_state_flag(originator_channel, CF_TRANSFER);
switch_channel_set_state_flag(originatee_channel, CF_TRANSFER);
- /* release the read locks we have on the channels */
- switch_core_session_rwunlock(originator_session);
- switch_core_session_rwunlock(originatee_session);
-
/* change the states and let the chips fall where they may */
switch_channel_set_state(originator_channel, CS_TRANSMIT);
switch_channel_set_state(originatee_channel, CS_TRANSMIT);
+ /* release the read locks we have on the channels */
+ switch_core_session_rwunlock(originator_session);
+ switch_core_session_rwunlock(originatee_session);
+
status = SWITCH_STATUS_SUCCESS;
while (switch_channel_get_state(originatee_channel) < CS_HANGUP && switch_channel_test_flag(originatee_channel, CF_TAGGED)) {
More information about the Freeswitch-svn
mailing list