[sr-dev] git:master:8a124182: core: two fixup helpers for functions with four parameters

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 1 17:25:54 CET 2022


Module: kamailio
Branch: master
Commit: 8a124182ab0667455726fa1d2ed2fc368c2723ff
URL: https://github.com/kamailio/kamailio/commit/8a124182ab0667455726fa1d2ed2fc368c2723ff

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-01T11:11:15+01:00

core: two fixup helpers for functions with four parameters

---

Modified: src/core/mod_fix.c
Modified: src/core/mod_fix.h

---

Diff:  https://github.com/kamailio/kamailio/commit/8a124182ab0667455726fa1d2ed2fc368c2723ff.diff
Patch: https://github.com/kamailio/kamailio/commit/8a124182ab0667455726fa1d2ed2fc368c2723ff.patch

---

diff --git a/src/core/mod_fix.c b/src/core/mod_fix.c
index 148ba50227..325e3d117b 100644
--- a/src/core/mod_fix.c
+++ b/src/core/mod_fix.c
@@ -788,6 +788,7 @@ int fixup_free_vstr_all(void** param, int param_no)
 	pv_elem_free_all((pv_elem_t*)(*param));
 	return 0;
 }
+
 /**
  *
  */
@@ -799,3 +800,71 @@ int fixup_get_vstr_buf(sip_msg_t *msg, pv_elem_t *p, char *buf, int blen)
 	}
 	return -1;
 }
+
+/**
+ *
+ */
+int fixup_sssi(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+		case 3:
+			return fixup_spve_null(param, 1);
+		case 4:
+			return fixup_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
+
+/**
+ *
+ */
+int fixup_free_sssi(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+		case 3:
+			return fixup_free_spve_null(param, 1);
+		case 4:
+			return fixup_free_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
+
+/**
+ *
+ */
+int fixup_ssii(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+			return fixup_spve_null(param, 1);
+		case 3:
+		case 4:
+			return fixup_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
+
+/**
+ *
+ */
+int fixup_free_ssii(void** param, int param_no)
+{
+	switch(param_no) {
+		case 1:
+		case 2:
+			return fixup_free_spve_null(param, 1);
+		case 3:
+		case 4:
+			return fixup_free_igp_null(param, 1);
+		default:
+			return E_UNSPEC;
+	}
+}
diff --git a/src/core/mod_fix.h b/src/core/mod_fix.h
index f91e489f68..ca63a5a804 100644
--- a/src/core/mod_fix.h
+++ b/src/core/mod_fix.h
@@ -162,4 +162,11 @@ 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_sssi(void** param, int param_no);
+int fixup_free_sssi(void** param, int param_no);
+
+int fixup_ssii(void** param, int param_no);
+int fixup_free_ssii(void** param, int param_no);
+
 #endif




More information about the sr-dev mailing list