static int unload_module(void) { stasis_unsubscribe_and_join(sub); sub = NULL; stasis_message_router_unsubscribe_and_join(router); router = NULL; return 0; }
static int unload_module(void) { struct ao2_container *endpoints; endpoints = stasis_cache_dump(ast_endpoint_cache(), ast_endpoint_snapshot_type()); if (endpoints) { ao2_callback(endpoints, OBJ_MULTIPLE | OBJ_NODATA | OBJ_NOLOCK, dump_cache_unload, NULL); ao2_ref(endpoints, -1); } stasis_message_router_unsubscribe_and_join(router); router = NULL; return 0; }
static void manager_endpoints_shutdown(void) { stasis_message_router_unsubscribe_and_join(endpoint_router); endpoint_router = NULL; }