Skip to content

Commit f0b193e

Browse files
author
fanpengy
committed
Fix release INVITE server request lead to core dump at worng order 200OK.
1 parent 5830a32 commit f0b193e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libsofia-sip-ua/nua/nua_server.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,13 @@ nua_stack_respond(nua_t *nua, nua_handle_t *nh,
425425
if (request && sr->sr_request.msg == request)
426426
break;
427427
/* nua_respond() to INVITE can be used without NUTAG_WITH() */
428-
if (!t && sr->sr_method == sip_method_invite)
428+
if (!t && sr->sr_method == sip_method_invite) {
429429
break;
430+
} else if(!t && (sr->sr_method == sip_method_prack || sr->sr_method == sip_method_update)) {
431+
nua_stack_event(nua, nh, NULL, nua_i_error,
432+
500, "Server Internal Error", NULL);
433+
return;
434+
}
430435
}
431436

432437
if (sr == NULL) {

0 commit comments

Comments
 (0)