Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion libsofia-sip-ua/nua/nua_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ nua_stack_respond(nua_t *nua, nua_handle_t *nh,
nua_server_request_t *sr;
tagi_t const *t;
msg_t const *request = NULL;
int prack_pending = 0;

t = tl_find_last(tags, nutag_with);

Expand All @@ -425,8 +426,16 @@ nua_stack_respond(nua_t *nua, nua_handle_t *nh,
if (request && sr->sr_request.msg == request)
break;
/* nua_respond() to INVITE can be used without NUTAG_WITH() */
if (!t && sr->sr_method == sip_method_invite)
if (!t && sr->sr_method == sip_method_invite) {
if (prack_pending) {
nua_stack_event(nua, nh, NULL, nua_i_error,
500, "Server Internal Error", NULL);
return;
}
break;
}
else if (!t && sr->sr_method == sip_method_prack)
prack_pending = 1;
}

if (sr == NULL) {
Expand Down