[sr-dev] git:master:125031da: dialog: exposed functions to search dlg and lock table entry

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 23 18:00:32 CET 2020


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-23T17:48:39+01:00

dialog: exposed functions to search dlg and lock table entry

---

Modified: src/modules/dialog/dlg_hash.h

---

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

---

diff --git a/src/modules/dialog/dlg_hash.h b/src/modules/dialog/dlg_hash.h
index eb933c5acb..ed5cd7bef0 100644
--- a/src/modules/dialog/dlg_hash.h
+++ b/src/modules/dialog/dlg_hash.h
@@ -324,6 +324,18 @@ int dlg_update_rr_set(struct dlg_cell * dlg, unsigned int leg, str *rr);
 int dlg_set_toroute(dlg_cell_t *dlg, str *route);
 
 
+/*!
+ * \brief Lookup a dialog in the global list
+ *
+ * Note that the caller is responsible for decrementing (or reusing)
+ * the reference counter by one again iff a dialog has been found.
+ * \param h_entry number of the hash table entry
+ * \param h_id id of the hash table entry
+ * \param lmode id if 0, then dlg table entry is unlocked, otherwise is locked
+ * \return dialog structure on success, NULL on failure
+ */
+dlg_cell_t *dlg_lookup_mode(unsigned int h_entry, unsigned int h_id, int lmode);
+
 /*!
  * \brief Lookup a dialog in the global list
  *
@@ -335,6 +347,17 @@ int dlg_set_toroute(dlg_cell_t *dlg, str *route);
  */
 dlg_cell_t* dlg_lookup(unsigned int h_entry, unsigned int h_id);
 
+/*!
+ * \brief Search a dialog in the global list by iuid
+ *
+ * Note that the caller is responsible for decrementing (or reusing)
+ * the reference counter by one again if a dialog has been found.
+ * \param diuid internal unique id per dialog
+ * \param lmode id if 0, then dlg table entry is unlocked, otherwise is locked
+ * \return dialog structure on success, NULL on failure
+ */
+dlg_cell_t* dlg_get_by_iuid_mode(dlg_iuid_t *diuid, int lmode);
+
 /*!
  * \brief Search and return dialog in the global list by iuid
  *




More information about the sr-dev mailing list