/** * Destroys the modules */ static void mod_destroy(void) { int do_destroy=0; LOG(L_INFO,"INFO:"M_NAME":mod_destroy: child exit\n"); lock_get(process_lock); if((*shutdown_singleton)==0){ *shutdown_singleton=1; do_destroy=1; } lock_release(process_lock); if (do_destroy){ if (scscf_persistency_mode!=NO_PERSISTENCY){ /* First let's snapshot everything */ make_snapshot_authdata(); make_snapshot_dialogs(); make_snapshot_registrar(); } /* Then nuke it all */ auth_data_destroy(); parser_destroy(); r_notify_destroy(); r_storage_destroy(); s_dialogs_destroy(); lock_get(scscf_dialog_count_lock); shm_free(scscf_dialog_count); lock_destroy(scscf_dialog_count_lock); pkg_free(scscf_service_route.s); } if ( scscf_persistency_mode==WITH_DATABASE_BULK || scscf_persistency_mode==WITH_DATABASE_CACHE) { DBG("INFO:"M_NAME": ... closing db connection\n"); scscf_db_close(); } #ifdef WITH_IMS_PM ims_pm_destroy(); #endif /* WITH_IMS_PM */ }
static void destroy(void) { auth_data_destroy(); }