static int tcp_read_stop(lua_State* L) { tcp_obj* self; int r; self = luaL_checkudata(L, 1, "uv.tcp"); r = uv_read_stop((uv_stream_t*)&self->handle); lua_pushinteger(L, r); if (r == 0) clear_callback(L, "on_read", self); return 1; }
void shutdown_agent(void) { /* probably some of this can be called as shutdown callback */ shutdown_tree(); clear_context(); netsnmp_clear_callback_list(); netsnmp_clear_tdomain_list(); netsnmp_clear_handler_list(); netsnmp_container_free_list(); clear_sec_mod(); clear_snmp_enum(); clear_callback(); clear_user_list(); done_init_agent = 0; }
void shutdown_agent(void) { /* probably some of this can be called as shutdown callback */ shutdown_tree(); clear_context(); netsnmp_clear_callback_list(); netsnmp_clear_tdomain_list(); netsnmp_clear_handler_list(); shutdown_agent_sysORTable(); netsnmp_container_free_list(); clear_sec_mod(); clear_snmp_enum(); clear_callback(); shutdown_secmod(); netsnmp_addrcache_destroy(); #ifdef NETSNMP_CAN_USE_NLIST free_kmem(); #endif done_init_agent = 0; }