debugging

This commit is contained in:
Dhanya Maliakal 2016-11-08 09:22:18 +01:00
parent a5c4434ae8
commit 01db6b988b
2 changed files with 4 additions and 4 deletions

View File

@ -611,7 +611,7 @@ cprintf(RED,"packet_soze:%d\n",packet_size);
break;
case UDP:
if (socketDescriptor<0) return -1;
cprintf(RED,"length:%d packetsize:%d\n",length,packet_size);
//if length given, listens to length, else listens for packetsize till length is reached
if(length){

View File

@ -2133,7 +2133,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
int currentfnum=-1;
//read first packet
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset, onePacketSize);
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset);
if(!receivedSize) return 0;
header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
currentpnum = (*( (uint8_t*) header->packetNumber));
@ -2159,7 +2159,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
break;
pnum --;
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset, onePacketSize);
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset);
if(!receivedSize){
totalIgnoredPacketCount[ithread] += (packetsPerFrame - pnum);
return 0;
@ -2180,7 +2180,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
//find the start of next image
while(currentpnum != pnum){
totalIgnoredPacketCount[ithread]++;
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset, onePacketSize);
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset);
if(!receivedSize) return 0;
header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
currentpnum = (*( (uint8_t*) header->packetNumber));