Esempio n. 1
0
/*
	Resource free.
*/	
RC_TYPE http_client_destruct(HTTP_CLIENT *p_self)
{
	RC_TYPE	rc;


	if (p_self==NULL)
	{
		return RC_OK;
	}

	rc=super_destruct(&p_self->super);

	if (!(p_self->is_constructed))
	{
		return RC_OK;
	}

	http_client_shutdown(p_self);

	memset(p_self,0,sizeof(HTTP_CLIENT));
	

	/*free*/
	return rc;
}
Esempio n. 2
0
File: tcp.c Progetto: ebichu/dd-wrt
/*
	Resource free.
*/	
RC_TYPE tcp_destruct(TCP_SOCKET *p_self)
{
	RC_TYPE	rc;


	if (p_self == NULL)
	{
		return RC_OK;
	}

	super_destruct(&p_self->super);

	if (!(p_self->is_constructed))
	{
		return RC_OK;
	}

	rc=tcp_shutdown(p_self);

	memset(p_self,0,sizeof(TCP_SOCKET));
		
	return rc;
}
/*
	Resource free.
*/	
RC_TYPE http_client_destruct(HTTP_CLIENT *p_self)
{
	/*free*/
	return super_destruct(&p_self->super);
}