refactor to avoid some potential issues with channels that are hungup instantly after being answered

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4926 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-04-13 22:15:58 +00:00
parent ff44ce11cc
commit eb2124ae32
16 changed files with 1524 additions and 1606 deletions

View File

@@ -590,7 +590,7 @@ static switch_status_t pause_function(char *cmd, switch_core_session_t *isession
static switch_status_t originate_function(char *cmd, switch_core_session_t *isession, switch_stream_handle_t *stream)
{
switch_channel_t *caller_channel;
switch_core_session_t *caller_session;
switch_core_session_t *caller_session = NULL;
char *argv[7] = { 0 };
int i = 0, x, argc = 0;
char *aleg, *exten, *dp, *context, *cid_name, *cid_num;
@@ -684,6 +684,10 @@ static switch_status_t originate_function(char *cmd, switch_core_session_t *ises
stream->write_function(stream, "Created Session: %s\n", switch_core_session_get_uuid(caller_session));
}
if (caller_session) {
switch_core_session_rwunlock(caller_session);
}
return SWITCH_STATUS_SUCCESS;;
}