Skip to content

Commit

Permalink
usrloc: clone xavp list in contact struct in memory mode
Browse files Browse the repository at this point in the history
(cherry picked from commit 76f0fa8)
  • Loading branch information
miconda committed Aug 12, 2019
1 parent 009f628 commit 2f07bb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/modules/usrloc/ucontact.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,11 @@ int uldb_delete_attrs(str* _dname, str *_user, str *_domain, str *_ruid);
*/
int uldb_insert_attrs(str *_dname, str *_user, str *_domain,
str *_ruid, sr_xavp_t *_xhead);

/*!
* \brief Set the value for cloning the xavp list to contact structure
* \param v - the value to be set
*/
void ul_set_xavp_contact_clone(int v);

#endif
5 changes: 4 additions & 1 deletion src/modules/usrloc/usrloc_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,11 @@ static int mod_init(void)
if (handle_lost_tcp && db_mode == DB_ONLY)
LM_WARN("handle_lost_tcp option makes nothing in DB_ONLY mode\n");

init_flag = 1;
if(db_mode != DB_ONLY) {
ul_set_xavp_contact_clone(1);
}

init_flag = 1;
return 0;
}

Expand Down

0 comments on commit 2f07bb7

Please sign in to comment.