Module: kamailio
Branch: master
Commit: 2806831045cdb8f110737a87470382c28c5ce094
URL:
https://github.com/kamailio/kamailio/commit/2806831045cdb8f110737a87470382c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-09-04T10:08:12+02:00
htable: exported sht_rm_name() and sht_rm_value() to KEMI
---
Modified: src/modules/htable/htable.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2806831045cdb8f110737a87470382c…
Patch:
https://github.com/kamailio/kamailio/commit/2806831045cdb8f110737a87470382c…
---
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
index 43c58d1942..834583fa0c 100644
--- a/src/modules/htable/htable.c
+++ b/src/modules/htable/htable.c
@@ -525,6 +525,17 @@ static int w_ht_rm_value(sip_msg_t* msg, char* hname, char* op, char
*val)
return w_ht_rm_items(msg, hname, op, val, 1);
}
+static int ki_ht_rm_name(sip_msg_t* msg, str* sname, str* sop, str *sval)
+{
+ return ht_rm_items(msg, sname, sop, sval, 0);
+
+}
+
+static int ki_ht_rm_value(sip_msg_t* msg, str* sname, str* sop, str *sval)
+{
+ return ht_rm_items(msg, sname, sop, sval, 1);
+}
+
static int ht_reset_by_name(str *hname)
{
ht_t *ht;
@@ -1321,6 +1332,16 @@ static sr_kemi_t sr_kemi_htable_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("htable"), str_init("sht_rm_name"),
+ SR_KEMIP_INT, ki_ht_rm_name,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("htable"), str_init("sht_rm_value"),
+ SR_KEMIP_INT, ki_ht_rm_value,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};