Esempio n. 1
0
static void del_client(void *client, void *unused)
{
	struct a_client *cli = client;
	mowgli_node_t *n;

	if (cli->net == NULL)
		return;

	n = mowgli_node_find(cli, cli->net->clients);
	if (n == NULL)
		return;

	mowgli_node_delete(n, cli->net->clients);
}
Esempio n. 2
0
File: main.c Progetto: alyx/atheme
static void xmlrpc_config_ready(void *vptr)
{
	/* Note: handle_xmlrpc.path may point to freed memory between
	 * reading the config and here.
	 */
	handle_xmlrpc.path = xmlrpc_config.path;

	if (handle_xmlrpc.handler != NULL)
	{
		if (mowgli_node_find(&handle_xmlrpc, httpd_path_handlers))
			return;

		mowgli_node_add(&handle_xmlrpc, mowgli_node_create(), httpd_path_handlers);
	}
	else
		slog(LG_ERROR, "xmlrpc_config_ready(): xmlrpc {} block missing or invalid");
}
Esempio n. 3
0
void _moddeinit(module_unload_intent_t intent)
{
	mowgli_node_t *n;

	xmlrpc_unregister_method("atheme.login");
	xmlrpc_unregister_method("atheme.logout");
	xmlrpc_unregister_method("atheme.command");
	xmlrpc_unregister_method("atheme.privset");
	xmlrpc_unregister_method("atheme.ison");
	xmlrpc_unregister_method("atheme.metadata");

	if ((n = mowgli_node_find(&handle_xmlrpc, httpd_path_handlers)) != NULL)
	{
		mowgli_node_delete(n, httpd_path_handlers);
		mowgli_node_free(n);
	}

	del_conf_item("PATH", &conf_xmlrpc_table);
	del_top_conf("XMLRPC");

	free(xmlrpc_config.path);

	hook_del_config_ready(xmlrpc_config_ready);
}