Skip to content

Commit

Permalink
dialog: provide means to fetch dialog by h_entry and h_id
Browse files Browse the repository at this point in the history
(cherry picked from commit f73a2b4)
  • Loading branch information
razvancrainea committed Jul 12, 2023
1 parent dbc3605 commit 7a321d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/dialog/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ int load_dlg( struct dlg_binds *dlgb )
dlgb->get_direction = get_dlg_direction;
dlgb->get_dlg_did = dlg_get_did;
dlgb->get_dlg_by_did = get_dlg_by_did;
dlgb->get_dlg_by_ids = get_dlg_by_ids;
dlgb->get_dlg_by_callid = get_dlg_by_callid;
dlgb->send_indialog_request = send_indialog_request;

Expand Down
6 changes: 6 additions & 0 deletions modules/dialog/dlg_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,12 @@ struct dlg_cell* get_dlg_by_did(str *did, int active_only)
return NULL;
}

struct dlg_cell* get_dlg_by_ids(unsigned int h_entry, unsigned int h_id, int active_only)
{
return lookup_dlg(h_entry, h_id, active_only);
}


struct dlg_cell *get_dlg_by_dialog_id(str *dialog_id)
{
struct dlg_cell *dlg = NULL;
Expand Down
2 changes: 2 additions & 0 deletions modules/dialog/dlg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ struct dlg_cell* get_dlg_by_callid(const str *callid, int active_only);

struct dlg_cell* get_dlg_by_did(str *did, int active_only);

struct dlg_cell* get_dlg_by_ids(unsigned int h_entry, unsigned int h_id, int active_only);

struct dlg_cell *get_dlg_by_dialog_id(str *dialog_id);

int get_dlg_direction(void);
Expand Down
2 changes: 2 additions & 0 deletions modules/dialog/dlg_load.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ typedef struct dlg_cell *(*get_dlg_f) (void);
typedef str *(*get_dlg_did_f) (struct dlg_cell *dlg);
typedef struct dlg_cell *(*get_dlg_by_callid_f) (const str *, int);
typedef struct dlg_cell *(*get_dlg_by_did_f) (str *, int);
typedef struct dlg_cell *(*get_dlg_by_ids_f) (unsigned int, unsigned int, int);
typedef int (*match_dialog_f) (struct sip_msg *msg, int _seq_match_mode);
typedef int (*get_direction_f) (void);

Expand Down Expand Up @@ -62,6 +63,7 @@ struct dlg_binds {
get_direction_f get_direction;
get_dlg_did_f get_dlg_did;
get_dlg_by_did_f get_dlg_by_did;
get_dlg_by_ids_f get_dlg_by_ids;
get_dlg_by_callid_f get_dlg_by_callid;
send_indialog_req_f send_indialog_request;

Expand Down

0 comments on commit 7a321d5

Please sign in to comment.