[sr-dev] git:master:a9a8731d: core: kemi - changed SR_KEMIP_INTSTR to SR_KEMIP_XVAL

Daniel-Constantin Mierla miconda at gmail.com
Tue May 21 15:57:49 CEST 2019


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-05-21T13:35:21+02:00

core: kemi - changed SR_KEMIP_INTSTR to SR_KEMIP_XVAL

- added also SR_KEMIP_NULL to mark null values

---

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

---

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

---

diff --git a/src/core/kemi.c b/src/core/kemi.c
index 6a1d61af43..169bd520f1 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -2347,7 +2347,7 @@ static sr_kemi_param_map_t _sr_kemi_param_map[] = {
 	{ SR_KEMIP_INT,    str_init("int") },
 	{ SR_KEMIP_STR,    str_init("str") },
 	{ SR_KEMIP_BOOL,   str_init("bool") },
-	{ SR_KEMIP_INTSTR, str_init("int-str") },
+	{ SR_KEMIP_XVAL,   str_init("xval") },
 	{ 0, STR_NULL }
 };
 
diff --git a/src/core/kemi.h b/src/core/kemi.h
index 26e56e3087..8b5458f1a7 100644
--- a/src/core/kemi.h
+++ b/src/core/kemi.h
@@ -30,7 +30,8 @@
 #define SR_KEMIP_INT	(1<<0)	/* type integer */
 #define SR_KEMIP_STR	(1<<1)	/* type str* */
 #define SR_KEMIP_BOOL	(1<<2)	/* type boolean (0/1) */
-#define SR_KEMIP_INTSTR	(1<<3)	/* type integer or str* */
+#define SR_KEMIP_XVAL	(1<<3)	/* type extended value (integer, str*, ...) */
+#define SR_KEMIP_NULL	(1<<4)	/* type NULL */
 
 #define SR_KEMI_FALSE	0
 #define SR_KEMI_TRUE	1
@@ -65,6 +66,14 @@ typedef union {
 	str s;
 } sr_kemi_val_t;
 
+typedef struct sr_kemi_xval {
+	int vtype;
+	union {
+		int n;
+		str *s;
+	} v;
+} sr_kemi_xval_t;
+
 /* only sip_msg_t */
 typedef int (*sr_kemi_fm_f)(sip_msg_t*);
 




More information about the sr-dev mailing list