diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 93b8f28ad..69513b8fc 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1533,7 +1533,7 @@ int UDPStandardImplementation::setupWriter(){ -int UDPStandardImplementation::createNewFile(int ithread){ +int UDPStandardImplementation::createNewFile(int ithread){cprintf(BLUE,"Creating new file\n"); FILE_LOG(logDEBUG) << __AT__ << " called"; //create file name @@ -2141,8 +2141,8 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch if(currentpnum == pnum){ //cout<<"correct packet"<frameNumber))&frameIndexMask)-startFrameIndex; - //cout<<"current fnum:"<<(*((uint32_t*)(buffer[ithread]+8)))<frameNumber))&frameIndexMask); + cout<<"current fnum:"<<(*((uint32_t*)(buffer[ithread]+8)))<frameNumber))&frameIndexMask; + startFrameIndex = (*((uint32_t*)(buffer[ithread]+8))); break; default: if(shortFrameEnable < 0){ @@ -2870,8 +2869,9 @@ void UDPStandardImplementation::handleWithoutMissingPackets(int ithread, char* w //write to file if enabled and update write parameters if(npackets > 0){ if((fileWriteEnable) && (sfilefd[ithread])){ - if((tempframenumber%maxFramesPerFile) == 0) + if((tempframenumber%maxFramesPerFile) == 0){ createNewFile(ithread); + } fwrite(wbuffer, 1, oneDataSize*packetsPerFrame+fifoBufferHeaderSize, sfilefd[ithread]); }