mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 12:37:05 +00:00
FS-5285 --resolve
This commit is contained in:
1 parent
0e41c484a3
commit
84cd461bb2
1 file changed
+5
-2
@@ -3776,6 +3776,7 @@ SWITCH_STANDARD_API(session_audio_function)
|
|||||||
switch_core_session_t *u_session = NULL;
|
switch_core_session_t *u_session = NULL;
|
||||||
char *mycmd = NULL;
|
char *mycmd = NULL;
|
||||||
int fail = 0;
|
int fail = 0;
|
||||||
|
int nochannel = 0;
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
char *argv[5] = { 0 };
|
char *argv[5] = { 0 };
|
||||||
int level;
|
int level;
|
||||||
@@ -3794,7 +3795,7 @@ SWITCH_STANDARD_API(session_audio_function)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(u_session = switch_core_session_locate(argv[0]))) {
|
if (!(u_session = switch_core_session_locate(argv[0]))) {
|
||||||
stream->write_function(stream, "-ERR No such channel!\n");
|
nochannel++;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3826,7 +3827,9 @@ SWITCH_STANDARD_API(session_audio_function)
|
|||||||
|
|
||||||
switch_safe_free(mycmd);
|
switch_safe_free(mycmd);
|
||||||
|
|
||||||
if (fail) {
|
if (nochannel) {
|
||||||
|
stream->write_function(stream, "-ERR No such channel!\n");
|
||||||
|
} else if (fail) {
|
||||||
stream->write_function(stream, "-USAGE: %s\n", AUDIO_SYNTAX);
|
stream->write_function(stream, "-USAGE: %s\n", AUDIO_SYNTAX);
|
||||||
} else {
|
} else {
|
||||||
stream->write_function(stream, "+OK\n");
|
stream->write_function(stream, "+OK\n");
|
||||||
|
|||||||
Reference in new issue
Block a user