Esempio n. 1
0
eNextState KillTerminate(AsyncIO *IO)
{
	long id;
	KillOtherSessionContext *Ctx = (KillOtherSessionContext*)IO->Data;
	EV_syslog(LOG_DEBUG, "%s Exit\n", __FUNCTION__);
	id = IO->ID;
	FreeAsyncIOContents(IO);
	memset(Ctx, 0, sizeof(KillOtherSessionContext));
	IO->ID = id; /* just for the case we want to analyze it in a coredump */
	free(Ctx);
	return eAbort;

}
Esempio n. 2
0
void DeleteSmtpOutMsg(void *v)
{
	SmtpOutMsg *Msg = v;
	AsyncIO *IO = &Msg->IO;
	EV_syslog(LOG_DEBUG, "%s Exit\n", __FUNCTION__);

	/* these are kept in our own space and free'd below */
	Msg->IO.ConnectMe = NULL;

	ares_free_data(Msg->AllMX);
	if (Msg->HostLookup.VParsedDNSReply != NULL)
		Msg->HostLookup.DNSReplyFree(Msg->HostLookup.VParsedDNSReply);
	FreeURL(&Msg->Relay);
	FreeStrBuf(&Msg->msgtext);
	FreeStrBuf(&Msg->MultiLineBuf);
	FreeAsyncIOContents(&Msg->IO);
	memset (Msg, 0, sizeof(SmtpOutMsg)); /* just to be shure... */
	free(Msg);
}
Esempio n. 3
0
void DeletePOP3Aggregator(void *vptr)
{
	pop3aggr *ptr = vptr;
	DeleteHashPos(&ptr->Pos);
	DeleteHash(&ptr->MsgNumbers);
//	FreeStrBuf(&ptr->rooms);
	FreeStrBuf(&ptr->pop3user);
	FreeStrBuf(&ptr->pop3pass);
	FreeStrBuf(&ptr->Host);
	FreeStrBuf(&ptr->RoomName);
	FreeURL(&ptr->IO.ConnectMe);
	FreeStrBuf(&ptr->Url);
	FreeStrBuf(&ptr->IO.IOBuf);
	FreeStrBuf(&ptr->IO.SendBuf.Buf);
	FreeStrBuf(&ptr->IO.RecvBuf.Buf);
	DeleteAsyncMsg(&ptr->IO.ReadMsg);
	if (((struct CitContext*)ptr->IO.CitContext)) {
		((struct CitContext*)ptr->IO.CitContext)->state = CON_IDLE;
		((struct CitContext*)ptr->IO.CitContext)->kill_me = 1;
	}
	FreeAsyncIOContents(&ptr->IO);
	free(ptr);
}