MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / dr_reload_cmd

Function dr_reload_cmd

modules/drouting/drouting.c:2388–2404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2386}
2387
2388mi_response_t *dr_reload_cmd(const mi_params_t *params,
2389 struct mi_handler *async_hdl)
2390{
2391 int is_inherit_state = get_mi_bool_like_param(params, "inherit_state", 1);
2392
2393 LM_INFO("dr_reload MI command received!\n");
2394
2395 if (dr_reload_data(0, is_inherit_state) != 0) {
2396 LM_CRIT("failed to load routing data\n");
2397 return init_mi_error(500, MI_SSTR("Failed to reload"));
2398 }
2399
2400 if (dr_cluster_id && dr_cluster_sync() < 0)
2401 return init_mi_error(500, MI_SSTR("Failed to synchronize states from cluster"));
2402
2403 return init_mi_result_ok();
2404}
2405
2406mi_response_t *dr_reload_cmd_1(const mi_params_t *params,
2407 struct mi_handler *async_hdl)

Callers

nothing calls this directly

Calls 4

get_mi_bool_like_paramFunction · 0.85
dr_reload_dataFunction · 0.85
init_mi_errorFunction · 0.85
dr_cluster_syncFunction · 0.85

Tested by

no test coverage detected