cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7423 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d5081d0b3e
commit
4a51128f42
|
@ -1274,16 +1274,17 @@ SWITCH_STANDARD_API(break_function)
|
|||
|
||||
if (switch_strlen_zero(cmd)) {
|
||||
stream->write_function(stream, "-USAGE: %s\n", BREAK_SYNTAX);
|
||||
} else {
|
||||
if ((psession = switch_core_session_locate(cmd))) {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(psession);
|
||||
switch_channel_set_flag(channel, CF_BREAK);
|
||||
switch_core_session_rwunlock(psession);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR No Such Channel!\n");
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(psession = switch_core_session_locate(cmd))) {
|
||||
stream->write_function(stream, "-ERR No Such Channel!\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_channel_set_flag(switch_core_session_get_channel(psession), CF_BREAK);
|
||||
switch_core_session_rwunlock(psession);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue