Beispiel #1
0
int32 GAgent_Cloud_GetPacket( pgcontext pgc,ppacket pRxbuf, int32 buflen)
{
	int32 Mret=0,Hret=0;
	uint16 GAgentstatus = 0;
    ppacket pbuf = pRxbuf;
	GAgentstatus = pgc->rtinfo.GAgentStatus;
   
	if( (GAgentstatus&WIFI_STATION_STATUS)!= WIFI_STATION_STATUS)
	return -1 ;

	Hret = Cloud_ConfigDataHandle( pgc );
	Mret = Cloud_M2MDataHandle( pgc,pbuf, buflen );
	return Mret;
}
Beispiel #2
0
int32 GAgent_Cloud_GetPacket( pgcontext pgc,ppacket pRxbuf, int32 buflen)
{
	int32 Mret=0;
	uint16 GAgentstatus = 0;
    ppacket pbuf = pRxbuf;
	GAgentstatus = pgc->rtinfo.GAgentStatus;
   
	if( (GAgentstatus&WIFI_STATION_CONNECTED) != WIFI_STATION_CONNECTED)
	    return -1 ;

	//GAgent_Printf(GAGENT_WARNING, "@@@@@@@@@@@@@@m2m socket id:%d\r\n", pgc->rtinfo.waninfo.m2m_socketid);
	
	if(pgc->rtinfo.waninfo.m2m_socketid <= 0)
	{
		
		Cloud_ConfigDataHandle( pgc );
	}
	Mret = Cloud_M2MDataHandle( pgc,pbuf, buflen );
	    return Mret;
}