From: Anthony Minessale Date: Wed, 4 Dec 2019 22:41:51 +0000 (+0000) Subject: [mod_verto] Fix packet o death. X-Git-Tag: v1.10.3^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55b148f1c358076d0e606c4111d4d8a518259fd5;p=thirdparty%2Ffreeswitch.git [mod_verto] Fix packet o death. --- diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 9f7cf57602..755af50ac1 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -3589,6 +3589,8 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock *response = obj; + PROTECT_INTERFACE(verto_endpoint_interface); + if (!params) { cJSON_AddItemToObject(obj, "message", cJSON_CreateString("Params data missing")); err = 1; goto cleanup; @@ -3615,7 +3617,6 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "origination_uuid", call_id); - PROTECT_INTERFACE(verto_endpoint_interface); if ((reason = switch_core_session_outgoing_channel(NULL, var_event, "rtc", NULL, &session, NULL, SOF_NONE, &cancel_cause)) != SWITCH_CAUSE_SUCCESS) { cJSON_AddItemToObject(obj, "message", cJSON_CreateString("Cannot create channel"));