From: Mathieu Rene Date: Sat, 9 May 2009 19:30:46 +0000 (+0000) Subject: mod_sofia: Add rescan option to killgw X-Git-Tag: v1.0.4~933 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aede1236d6cef94120e4f56bffd7324bb40817f9;p=thirdparty%2Ffreeswitch.git mod_sofia: Add rescan option to killgw git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13269 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 9f02e5cdca..da619b7361 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2043,6 +2043,14 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t sofia_glue_del_gateway(gateway_ptr); sofia_reg_release_gateway(gateway_ptr); stream->write_function(stream, "+OK gateway marked for deletion.\n"); + + if (argc > 3 && !strcasecmp(argv[3], "rescan")) { + if (reconfig_sofia(profile) == SWITCH_STATUS_SUCCESS) { + stream->write_function(stream, "+OK scan complete\n"); + } else { + stream->write_function(stream, "-ERR cannot find config for profile %s\n", profile->name); + } + } } else { stream->write_function(stream, "-ERR no such gateway.\n"); }