merge from 4.0.1

This commit is contained in:
2019-02-11 14:37:54 +01:00
68 changed files with 6174 additions and 2231 deletions

View File

@ -568,14 +568,20 @@ uint32_t Listener::ListenToAnImage(char* buf) {
lastCaughtFrameIndex = fnum;
#ifdef VERBOSE
//#ifdef VERBOSE
//if (!index)
cprintf(GREEN,"Listening %d: currentfindex:%lu, fnum:%lu, pnum:%u numpackets:%u\n",
index,currentFrameIndex, fnum, pnum, numpackets);
#endif
//#endif
if (!measurementStartedFlag)
RecordFirstIndices(fnum);
if (pnum >= pperFrame ) {
cprintf(RED,"bad packet, throwing away. packets caught so far: %d\n", numpackets);
return 0; // bad packet
}
//future packet by looking at image number (all other detectors)
if (fnum != currentFrameIndex) {
//cprintf(RED,"setting carry over flag to true num:%llu nump:%u\n",fnum, numpackets );
@ -611,6 +617,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
memcpy(buf + fifohsize + (pnum * dsize) - 2, listeningPacket + hsize, dsize+2);
break;
case JUNGFRAUCTB:
if (pnum == (pperFrame-1))
memcpy(buf + fifohsize + (pnum * dsize), listeningPacket + hsize, corrected_dsize);
else

View File

@ -158,6 +158,7 @@ void slsReceiverTCPIPInterface::startTCPServer(){
#ifdef VERY_VERBOSE
FILE_LOG(logDEBUG5) << "Conenction accepted";
#endif
// std::cout << "connected" << std::endl;
v = decode_function();
#ifdef VERY_VERBOSE
FILE_LOG(logDEBUG5) << "function executed";
@ -2580,11 +2581,12 @@ int slsReceiverTCPIPInterface::set_additional_json_header() {
char arg[MAX_STR_LENGTH];
memset(arg, 0, sizeof(arg));
char* retval=NULL;
// std::cout << "set additional json header" << std::endl;
// receive arguments
if (mySock->ReceiveDataOnly(arg,MAX_STR_LENGTH) < 0 )
return printSocketReadError();
// std::cout << arg << endl;
// execute action
#ifdef SLS_RECEIVER_UDP_FUNCTIONS
if (receiverBase == NULL)