示例#1
0
void fileConn_delete(NBK_fileConn** fileConn)
{
	NBK_fileConn* c = *fileConn;
	conn_delete(&c->d);
    fileConn_reset(c);
	NBK_free(c);
	*fileConn = N_NULL;
}
示例#2
0
int input_logout(DESC_DATA *d, const char *data, int plen)
{
	const int PACKET_LENGTH = 4;

	if (plen < PACKET_LENGTH)
		return 0;

	DWORD account_id = decode_4bytes((const BYTE*)data);

//	sys_log("LOGOUT: %u", account_id);

	CONN_DATA	*conn = conn_find(account_id);
	if (NULL==conn)
	{
		return PACKET_LENGTH;
	}

	// update online time and logout time
	{
		conn_delete(account_id);
	}

	return PACKET_LENGTH;
} /* end of input_logout() */