Browse Source

dialog: check if dialog is still in confirmed state when processing keepalive reply

Daniel-Constantin Mierla 10 năm trước cách đây
mục cha
commit
04410aef38
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      modules/dialog/dlg_req_within.c

+ 4 - 0
modules/dialog/dlg_req_within.c

@@ -264,6 +264,10 @@ void dlg_ka_cb(struct cell* t, int type, struct tmcb_params* ps){
 	}
 
 	if(ps->code==408 || ps->code==481) {
+		if (dlg->state != DLG_STATE_CONFIRMED) {
+			LM_DBG("skip updating non-confirmed dialogs\n");
+			goto done;
+		}
 		if(update_dlg_timer(&dlg->tl, 10)<0) {
 			LM_ERR("failed to update dialog lifetime\n");
 			goto done;