Skip to content

Commit b1482d8

Browse files
committed
b2b_entities: make sure last_method is updated before req
1 parent 5640ccd commit b1482d8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • modules/b2b_entities

modules/b2b_entities/dlg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,6 +2520,7 @@ int _b2b_send_request(b2b_dlg_t* dlg, b2b_req_data_t* req_data)
25202520
dlg->last_method == METHOD_INVITE)
25212521
{
25222522
/* send it ACK so that you can send the new request */
2523+
dlg->last_method = METHOD_ACK;
25232524
b2b_send_indlg_req(dlg, et, b2b_key, &ack, &ehdr, 0,
25242525
req_data->body, req_data->no_cb);
25252526
dlg->state= B2B_ESTABLISHED;
@@ -2559,7 +2560,9 @@ int _b2b_send_request(b2b_dlg_t* dlg, b2b_req_data_t* req_data)
25592560
}
25602561
else
25612562
{
2563+
dlg->last_method = METHOD_ACK;
25622564
b2b_send_indlg_req(dlg, et, b2b_key, &ack, &ehdr, 0, 0, req_data->no_cb);
2565+
dlg->last_method = METHOD_BYE;
25632566
ret = b2b_send_indlg_req(dlg, et, b2b_key, &bye, &ehdr, 0, req_data->body,
25642567
req_data->no_cb);
25652568
method_value = METHOD_BYE;

0 commit comments

Comments
 (0)