void on_unload(void) { SLOG(LOG_INFO, "Duplicogram unloading"); term_fini(); hook_subscriber_dtor(&dup_hook, &dup_subscription); hook_subscriber_dtor(&proto_cap->hook, &cap_subscription); cli_unregister(duplicogram_opts); //mutex_dtor(&dup_lock); no since we can have some callbacks called even after we unsubscribed (in another thread) ext_param_bucket_width_fini(); log_category_duplicogram_fini(); }
static int ss7_unload_module(void) { cli_unregister(); #ifdef SCCP sccp_cleanup(); #endif isup_cleanup(); cleanup_dump(0, 1, 1); if(monitor_running) { stop_monitor(); } stop_mtp_thread(); mtp_cleanup(); timers_cleanup(); destroy_config(); ast_verbose(VERBOSE_PREFIX_3 "SS7 channel unloaded.\n"); return AST_MODULE_LOAD_SUCCESS; }