From ece614eb7e59c40d714abbe6a214febcd8e881b1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 2 Nov 2016 15:40:25 +0100 Subject: [PATCH] startframeindex corrected --- .../src/UDPStandardImplementation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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]); }