瀏覽代碼

sl: do not send error reply if message marked with delayed-reply flag

Daniel-Constantin Mierla 1 年之前
父節點
當前提交
76b7beef6d
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 4 0
      src/modules/sl/sl.c
  2. 4 0
      src/modules/sl/sl_funcs.c

+ 4 - 0
src/modules/sl/sl.c

@@ -340,6 +340,10 @@ static int ki_send_reply_error(sip_msg_t *msg)
 		LM_INFO("message marked with final-reply flag\n");
 		return -2;
 	}
+	if(msg->msg_flags & FL_DELAYED_REPLY) {
+		LM_INFO("message marked with delayed-reply flag\n");
+		return -3;
+	}
 
 	if(sl_bind_tm != 0 && tmb.t_reply_error != NULL) {
 		ret = tmb.t_reply_error(msg);

+ 4 - 0
src/modules/sl/sl_funcs.c

@@ -416,6 +416,10 @@ int sl_reply_error(struct sip_msg *msg)
 		LM_INFO("message marked with final-reply flag\n");
 		return -2;
 	}
+	if(msg->msg_flags & FL_DELAYED_REPLY) {
+		LM_INFO("message marked with delayed-reply flag\n");
+		return -3;
+	}
 
 	ret = err2reason_phrase(
 			prev_ser_error, &sip_error, err_buf, sizeof(err_buf), "SL");