void be_info_free(void) { if (!initialized) panic("called without prior init"); assert(op_Phi->ops.copy_attr == new_phi_copy_attr); op_Phi->ops.copy_attr = old_phi_copy_attr; initialized = false; unregister_hook(hook_node_info, &hook_backend_info); }
static int api_hexchat_unhook(lua_State *L) { hook_info **info = (hook_info **)luaL_checkudata(L, 1, "hook"); if(*info) { unregister_hook(*info); *info = 0; return 0; } else { tostring(L, 1); return luaL_error(L, "hook %s is already unhooked", lua_tostring(L, -1)); } }
static char *handle_cli_amihook_unregister_hook(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: e->command = "amihook unregister"; e->usage = "" "Usage: amihook unregister" ""; return NULL; case CLI_GENERATE: return NULL; case CLI_HANDLER: unregister_hook(); return CLI_SUCCESS; } return CLI_FAILURE; }