Skip to content

Commit

Permalink
ua: move emit of SIPSESS_CONN event after SIP checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed May 14, 2024
1 parent 5fd2087 commit 722e7ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ua.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,6 @@ void sipsess_conn_handler(const struct sip_msg *msg, void *arg)
return;
}

err = bevent_sip_msg_emit(UA_EVENT_SIPSESS_CONN, msg, "");
if (err == ENOENT)
return;

/* handle multiple calls */
if (config->call.max_calls &&
uag_call_count() + 1 > config->call.max_calls) {
Expand Down Expand Up @@ -758,6 +754,10 @@ void sipsess_conn_handler(const struct sip_msg *msg, void *arg)
return;
}

err = bevent_sip_msg_emit(UA_EVENT_SIPSESS_CONN, msg, "");
if (err == ENOENT)
return;

(void)pl_strcpy(&msg->to.auri, to_uri, sizeof(to_uri));

err = ua_call_alloc(&call, ua, VIDMODE_ON, msg, NULL, to_uri, true);
Expand Down

0 comments on commit 722e7ea

Please sign in to comment.