mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-17 00:34:13 +00:00
add killgw _all_ to delete all gws
This commit is contained in:
1 parent
b6aaea1e9e
commit
89f399832d
3 files changed
+24
-5
No files matched your search
@@ -2604,12 +2604,17 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((gateway_ptr = sofia_reg_find_gateway(argv[2]))) {
|
||||
sofia_glue_del_gateway(gateway_ptr);
|
||||
sofia_reg_release_gateway(gateway_ptr);
|
||||
stream->write_function(stream, "+OK gateway marked for deletion.\n");
|
||||
if (!strcasecmp(argv[2], "_all_")) {
|
||||
sofia_glue_del_every_gateway(profile);
|
||||
stream->write_function(stream, "+OK every gateway marked for deletion.\n");
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR no such gateway.\n");
|
||||
if ((gateway_ptr = sofia_reg_find_gateway(argv[2]))) {
|
||||
sofia_glue_del_gateway(gateway_ptr);
|
||||
sofia_reg_release_gateway(gateway_ptr);
|
||||
stream->write_function(stream, "+OK gateway marked for deletion.\n");
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR no such gateway.\n");
|
||||
}
|
||||
}
|
||||
|
||||
goto done;
|
||||
|
||||
Reference in new issue
Block a user