fold reconfig_sofia into config_sofia so we don't have 2 difft config funcs
This commit is contained in:
parent
68e0b7e859
commit
b29412054a
|
@ -3636,7 +3636,7 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
|||
switch_xml_reload(&err);
|
||||
stream->write_function(stream, "Reload XML [%s]\n", err);
|
||||
|
||||
if (config_sofia(1, argv[0]) == SWITCH_STATUS_SUCCESS) {
|
||||
if (config_sofia(SOFIA_CONFIG_RESCAN, argv[0]) == SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "%s started successfully\n", argv[0]);
|
||||
} else {
|
||||
stream->write_function(stream, "Failure starting %s\n", argv[0]);
|
||||
|
@ -3713,7 +3713,7 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
|||
switch_xml_reload(&err);
|
||||
stream->write_function(stream, "Reload XML [%s]\n", err);
|
||||
|
||||
if (reconfig_sofia(profile) == SWITCH_STATUS_SUCCESS) {
|
||||
if (config_sofia(SOFIA_CONFIG_RESCAN, profile->name) == 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);
|
||||
|
@ -5707,8 +5707,13 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
|
|||
/* start one message thread */
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Starting initial message thread.\n");
|
||||
sofia_msg_thread_start(0);
|
||||
|
||||
|
||||
if (config_sofia(0, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
if (sofia_init() != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
if (config_sofia(SOFIA_CONFIG_LOAD, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
mod_sofia_globals.running = 0;
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
|
|
@ -138,6 +138,12 @@ typedef struct private_object private_object_t;
|
|||
#include <sofia-sip/msg.h>
|
||||
#include <sofia-sip/uniqueid.h>
|
||||
|
||||
typedef enum {
|
||||
SOFIA_CONFIG_LOAD = 0,
|
||||
SOFIA_CONFIG_RESCAN,
|
||||
SOFIA_CONFIG_RESPAWN
|
||||
} sofia_config_t;
|
||||
|
||||
typedef enum {
|
||||
DTMF_2833,
|
||||
DTMF_INFO,
|
||||
|
@ -966,7 +972,7 @@ void sofia_presence_event_handler(switch_event_t *event);
|
|||
|
||||
|
||||
void sofia_presence_cancel(void);
|
||||
switch_status_t config_sofia(int reload, char *profile_name);
|
||||
switch_status_t config_sofia(sofia_config_t reload, char *profile_name);
|
||||
void sofia_reg_auth_challenge(sofia_profile_t *profile, nua_handle_t *nh, sofia_dispatch_event_t *de,
|
||||
sofia_regtype_t regtype, const char *realm, int stale);
|
||||
auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t const *authorization,
|
||||
|
@ -1118,7 +1124,6 @@ switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt, in
|
|||
switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force);
|
||||
char *sofia_glue_get_register_host(const char *uri);
|
||||
const char *sofia_glue_strip_proto(const char *uri);
|
||||
switch_status_t reconfig_sofia(sofia_profile_t *profile);
|
||||
void sofia_glue_del_gateway(sofia_gateway_t *gp);
|
||||
void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *stream, int up);
|
||||
void sofia_glue_del_every_gateway(sofia_profile_t *profile);
|
||||
|
@ -1199,6 +1204,7 @@ void crtp_init(switch_loadable_module_interface_t *module_interface);
|
|||
int sofia_recover_callback(switch_core_session_t *session);
|
||||
void sofia_glue_set_name(private_object_t *tech_pvt, const char *channame);
|
||||
private_object_t *sofia_glue_new_pvt(switch_core_session_t *session);
|
||||
switch_status_t sofia_init(void);
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue