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

Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com>
Committer: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com>
Date: 2024-04-09T13:32:46+03:00

ipops: Add KEMI wrapper for ptr_query function

---

Modified: src/modules/ipops/ipops_mod.c

---

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

---

diff --git a/src/modules/ipops/ipops_mod.c b/src/modules/ipops/ipops_mod.c
index 60fd514d4fb..ea82beb0867 100644
--- a/src/modules/ipops/ipops_mod.c
+++ b/src/modules/ipops/ipops_mod.c
@@ -1333,6 +1333,14 @@ static int w_ptr_query(sip_msg_t *msg, char *ip, char 
*pv_name)
        return ptr_update_pv(&ip_address, &name);
 }
 
+/**
+ * \brief KEMI wrapper for `ptr_query` function.
+ */
+static int ki_ptr_query(sip_msg_t *msg, str *ip, str *pvid)
+{
+       return ptr_update_pv(ip, pvid);
+}
+
 /**
  *
  */
@@ -1513,6 +1521,11 @@ static sr_kemi_t sr_kemi_ipops_exports[] = {
                { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
                        SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
        },
+       { str_init("ipops"), str_init("ptr_query"),
+               SR_KEMIP_INT, ki_ptr_query,
+               { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
+                       SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+       },
        { str_init("ipops"), str_init("srv_query"),
                SR_KEMIP_INT, ki_srv_query,
                { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to