Module: kamailio Branch: master Commit: 392748691a7ca1ce11b48c8da4b52e26d34761ee URL: https://github.com/kamailio/kamailio/commit/392748691a7ca1ce11b48c8da4b52e26...
Author: Richard Good richard.good@smilecoms.com Committer: Richard Good richard.good@smilecoms.com Date: 2016-03-01T10:17:40+02:00
modules/ims_usrloc_scscf: new mod param contact_delete_delay contact_delete_delay: length of time to delay before deleting contact in state delay delete
---
Modified: modules/ims_usrloc_scscf/udomain.c Modified: modules/ims_usrloc_scscf/ul_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/392748691a7ca1ce11b48c8da4b52e26... Patch: https://github.com/kamailio/kamailio/commit/392748691a7ca1ce11b48c8da4b52e26...
---
diff --git a/modules/ims_usrloc_scscf/udomain.c b/modules/ims_usrloc_scscf/udomain.c index 94d71da..5ef9ecc 100644 --- a/modules/ims_usrloc_scscf/udomain.c +++ b/modules/ims_usrloc_scscf/udomain.c @@ -77,6 +77,8 @@ struct contact_list* contact_list; struct ims_subscription_list* ims_subscription_list; extern int subs_hash_size;
+extern int contact_delete_delay; + /*! * \brief Create a new domain structure * \param _n is pointer to str representing name of the domain, the string is @@ -830,6 +832,7 @@ void unref_contact_unsafe(ucontact_t* c) { LM_WARN("reference dropped below zero... this should not happen\n"); } c->state = CONTACT_DELAYED_DELETE; + c->expires = time(NULL) + contact_delete_delay; // delete_scontact(c); } } diff --git a/modules/ims_usrloc_scscf/ul_mod.c b/modules/ims_usrloc_scscf/ul_mod.c index 6d86f9c..35cc307 100644 --- a/modules/ims_usrloc_scscf/ul_mod.c +++ b/modules/ims_usrloc_scscf/ul_mod.c @@ -119,6 +119,8 @@ struct dlg_binds dlgb; int sub_dialog_hash_size = 9; shtable_t sub_dialog_table;
+int contact_delete_delay = 30; //If contact is put into delay delete state this is how long we delay before deleting + new_shtable_t pres_new_shtable; insert_shtable_t pres_insert_shtable; search_shtable_t pres_search_shtable; @@ -149,6 +151,7 @@ static param_export_t params[] = { {"subs_hash_size", INT_PARAM, &subs_hash_size }, {"contacts_hash_size", INT_PARAM, &contacts_hash_size }, {"nat_bflag", INT_PARAM, &nat_bflag }, + {"contact_delete_delay", INT_PARAM, &contact_delete_delay }, {"usrloc_debug_file", PARAM_STR, &usrloc_debug_file}, {"enable_debug_file", INT_PARAM, &usrloc_debug}, {"user_data_dtd", PARAM_STRING, &scscf_user_data_dtd},