Browse code

dialog: exported kemi variants to get empty and print var values

Daniel-Constantin Mierla authored on 11/06/2019 08:39:11
Showing 1 changed files
... ...
@@ -1916,6 +1916,21 @@ static sr_kemi_xval_t* ki_dlg_var_get(sip_msg_t *msg, str *name)
1916 1916
 /**
1917 1917
  *
1918 1918
  */
1919
+static sr_kemi_xval_t* ki_dlg_var_gete(sip_msg_t *msg, str *name)
1920
+{
1921
+	return ki_dlg_var_get_mode(msg, name, SR_KEMI_XVAL_NULL_EMPTY);
1922
+}
1923
+/**
1924
+ *
1925
+ */
1926
+static sr_kemi_xval_t* ki_dlg_var_getw(sip_msg_t *msg, str *name)
1927
+{
1928
+	return ki_dlg_var_get_mode(msg, name, SR_KEMI_XVAL_NULL_PRINT);
1929
+}
1930
+
1931
+/**
1932
+ *
1933
+ */
1919 1934
 /* clang-format off */
1920 1935
 static sr_kemi_t sr_kemi_dialog_exports[] = {
1921 1936
 	{ str_init("dialog"), str_init("dlg_manage"),
... ...
@@ -2028,6 +2043,16 @@ static sr_kemi_t sr_kemi_dialog_exports[] = {
2028 2028
 		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
2029 2029
 			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
2030 2030
 	},
2031
+	{ str_init("dialog"), str_init("var_gete"),
2032
+		SR_KEMIP_XVAL, ki_dlg_var_gete,
2033
+		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
2034
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
2035
+	},
2036
+	{ str_init("dialog"), str_init("var_getw"),
2037
+		SR_KEMIP_XVAL, ki_dlg_var_getw,
2038
+		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
2039
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
2040
+	},
2031 2041
 
2032 2042
 	{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
2033 2043
 };