Module: kamailio
Branch: master
Commit: 812ad6eb4e49426197e2860b89b255fffb018b5a
URL: https://github.com/kamailio/kamailio/commit/812ad6eb4e49426197e2860b89b255f…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-09T13:32:46+03:00
ipops: Add brief comment for ptr_query
---
Modified: src/modules/ipops/ipops_mod.c
Modified: src/modules/ipops/ipops_pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/812ad6eb4e49426197e2860b89b255f…
Patch: https://github.com/kamailio/kamailio/commit/812ad6eb4e49426197e2860b89b255f…
---
diff --git a/src/modules/ipops/ipops_mod.c b/src/modules/ipops/ipops_mod.c
index ea2669d2a19..60fd514d4fb 100644
--- a/src/modules/ipops/ipops_mod.c
+++ b/src/modules/ipops/ipops_mod.c
@@ -1298,7 +1298,18 @@ static int ki_dns_query(sip_msg_t *msg, str *naptrname, str *pvid)
}
/**
+ *! \brief Return 1 (true) if the given `ip` IP address (string or pv)
+ * could successfully be resolved to a domain and saved into `pv_name` pv.
+ * Otherwise, return negative values depending on the error.
*
+ * \param[in] msg SIP message structure.
+ * \param[in] ip IP address (string or pv) to resolve.
+ * \param[in] pv_name PV name to save the resolved domain.
+ * \returns 1 on success.
+ * \returns negative values depending on the error:
+ * \retval 1 success.
+ * \retval res -1 to -5 for bad input.
+ * \retval -6 for error in resolving the domain.
*/
static int w_ptr_query(sip_msg_t *msg, char *ip, char *pv_name)
{
diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c
index 10447e84bcd..034ec696594 100644
--- a/src/modules/ipops/ipops_pv.c
+++ b/src/modules/ipops/ipops_pv.c
@@ -413,8 +413,16 @@ int dns_update_pv(str *hostname, str *name)
return 1;
}
-/*
-*
+/**
+ * \brief Updates the pointer (PTR) record for a given IP address and saves it into pv.
+ *
+ * \details This function updates the PTR record for a specified IP address, and saves it
+ * into `name` AVP encapsulated in $ptrquery pv.
+ * It performs a reverse DNS lookup to obtain the hostname corresponding to the IP address.
+ *
+ * @param ip_address The IP address to update the PTR record for.
+ * @param name The name of AVP to hold the information in $ptrquery pv.
+ * @return 1 on success, or a negative value on failure.
*/
int ptr_update_pv(str *ip_address, str *name)
{
Module: kamailio
Branch: 5.8
Commit: 215af59832efc6e485563b55e3af9d209121d0c5
URL: https://github.com/kamailio/kamailio/commit/215af59832efc6e485563b55e3af9d2…
Author: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Date: 2024-04-08T12:47:20+03:00
pdb server: allow carrier id 0
(cherry-picked from commit 60ded00a3b574a08457a696334d11d668595cc0b)
---
Modified: utils/pdbt/common.h
---
Diff: https://github.com/kamailio/kamailio/commit/215af59832efc6e485563b55e3af9d2…
Patch: https://github.com/kamailio/kamailio/commit/215af59832efc6e485563b55e3af9d2…
---
diff --git a/utils/pdbt/common.h b/utils/pdbt/common.h
index 2146109a29d..a014e7d97e4 100644
--- a/utils/pdbt/common.h
+++ b/utils/pdbt/common.h
@@ -36,7 +36,7 @@
-1000..-1 used in dtm to indicate a carrier id and that no more nodes will follow (leaf node compression).
-1001 used in dtm to mark a pointer to a child node as NULL.
*/
-#define MIN_PDB_CARRIERID 1
+#define MIN_PDB_CARRIERID 0
#define MAX_PDB_CARRIERID 999
#define OTHER_CARRIERID 1000
#define MAX_CARRIERID 1000
Module: kamailio
Branch: 5.7
Commit: 46cf3559f4847b00790c043de41699b6c16f4920
URL: https://github.com/kamailio/kamailio/commit/46cf3559f4847b00790c043de41699b…
Author: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Date: 2024-04-08T12:46:54+03:00
pdb server: allow carrier id 0
(cherry-picked from commit 60ded00a3b574a08457a696334d11d668595cc0b)
---
Modified: utils/pdbt/common.h
---
Diff: https://github.com/kamailio/kamailio/commit/46cf3559f4847b00790c043de41699b…
Patch: https://github.com/kamailio/kamailio/commit/46cf3559f4847b00790c043de41699b…
---
diff --git a/utils/pdbt/common.h b/utils/pdbt/common.h
index 7d121430f1b..e10e2d11658 100644
--- a/utils/pdbt/common.h
+++ b/utils/pdbt/common.h
@@ -32,7 +32,7 @@
-1000..-1 used in dtm to indicate a carrier id and that no more nodes will follow (leaf node compression).
-1001 used in dtm to mark a pointer to a child node as NULL.
*/
-#define MIN_PDB_CARRIERID 1
+#define MIN_PDB_CARRIERID 0
#define MAX_PDB_CARRIERID 999
#define OTHER_CARRIERID 1000
#define MAX_CARRIERID 1000