mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
[mod_sofia] Gateways DOWN state introduced a regression: REG gateways in DOWN state could not be killed. NOREG gateways could change state in some conditions. Register and Unregister commands will now error if a gateway is NOREG.
This commit is contained in:
@@ -3666,6 +3666,8 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
||||
gateway_ptr->state = REG_STATE_UNREGED;
|
||||
stream->write_function(stream, "+OK\n");
|
||||
sofia_reg_release_gateway(gateway_ptr);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR NOREG gateway [%s] can't be registered!\n", gname);
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, "Invalid gateway!\n");
|
||||
@@ -3697,6 +3699,8 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
||||
gateway_ptr->state = REG_STATE_UNREGISTER;
|
||||
stream->write_function(stream, "+OK\n");
|
||||
sofia_reg_release_gateway(gateway_ptr);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR NOREG gateway [%s] can't be unregistered!\n", gname);
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, "Invalid gateway!\n");
|
||||
|
||||
Reference in New Issue
Block a user