diff --git a/modules/ims_usrloc_scscf/udomain.c b/modules/ims_usrloc_scscf/udomain.c index 94d71da1a6f..5ef9ecc2e97 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 6d86f9c6a93..35cc307b40d 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},