示例#1
0
文件: network.c 项目: aji/nursery
static void net_destroy(struct a_network *net)
{
	mowgli_free(net->name);
	if (net->acct)
		net_del_from_account(net);

	if (net->host)
		mowgli_free(net->host);

	mowgli_free(net->nick);
	mowgli_free(net->ident);
	mowgli_free(net->gecos);

	mowgli_free(net->nd.nick);
	mowgli_free(net->nd.ident);
	mowgli_free(net->nd.host);
	mowgli_free(net->nd.gecos);
	irc_isupport_destroy(net->nd.isupport);
	mowgli_string_destroy(net->nd.motd);

	if (net->linebuf)
		mowgli_linebuf_destroy(net->linebuf);
	mowgli_list_free(net->clients); /* XXX */

	mowgli_free(net);
}
示例#2
0
文件: sigyn.c 项目: alyx/sigyn
void sigyn_cleanup(void)
{
    logger(LOG_GENERAL, "Running cleanup.");
    modules_shutdown();
    if (me.uplink.connected)
        mowgli_linebuf_destroy(me.uplink.line);
    mowgli_eventloop_destroy(me.ev);
    logger_deinit();
}
示例#3
0
文件: network.c 项目: aji/nursery
static int net_disconnect(struct a_network *net)
{
	if (net->state == NET_DISCONNECTED) {
		a_log(LERROR, "Attempt to disconnect disconnected network");
		return;
	}

	if (net->linebuf) {
		mowgli_linebuf_destroy(net->linebuf);
		net->linebuf = NULL;
	}
	return 0;
}