Skip to content

Commit

Permalink
dialog: exposed functions to search dlg and lock table entry
Browse files Browse the repository at this point in the history
(cherry picked from commit 125031d)
  • Loading branch information
miconda authored and henningw committed May 13, 2020
1 parent b150eac commit bccfb5a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/modules/dialog/dlg_hash.h
Expand Up @@ -300,6 +300,18 @@ int dlg_update_cseq(dlg_cell_t *dlg, unsigned int leg, str *cseq);
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
*
Expand All @@ -311,6 +323,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
*
Expand Down

0 comments on commit bccfb5a

Please sign in to comment.