浏览代码

core: mod fixup helpers for params sequence str, str, int

(cherry picked from commit 5e4576a54e7783b1ee8fde6af7919232a5e207c4)
Daniel-Constantin Mierla 3 年之前
父节点
当前提交
76acfb717f
共有 2 个文件被更改,包括 35 次插入0 次删除
  1. 32 0
      src/core/mod_fix.c
  2. 3 0
      src/core/mod_fix.h

+ 32 - 0
src/core/mod_fix.c

@@ -801,6 +801,38 @@ int fixup_get_vstr_buf(sip_msg_t *msg, pv_elem_t *p, char *buf, int blen)
 	return -1;
 }
 
+/**
+ *
+ */
+int fixup_ssi(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+			return fixup_spve_null(param, 1);
+		case 3:
+			return fixup_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
+
+/**
+ *
+ */
+int fixup_free_ssi(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+			return fixup_free_spve_null(param, 1);
+		case 3:
+			return fixup_free_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
+
 /**
  *
  */

+ 3 - 0
src/core/mod_fix.h

@@ -163,6 +163,9 @@ int fixup_get_vstr_buf(sip_msg_t *msg, pv_elem_t *p, char *buf, int blen);
 int fixup_igp_regexp(void** param, int param_no);
 int fixup_free_igp_regexp(void** param, int param_no);
 
+int fixup_ssi(void** param, int param_no);
+int fixup_free_ssi(void** param, int param_no);
+
 int fixup_sssi(void** param, int param_no);
 int fixup_free_sssi(void** param, int param_no);