diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index bbe119439..d6a102201 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -103,6 +103,10 @@ enum communicationProtocol{ nsent(0), total_sent(0)// sender (client): where to? ip { + memset(&serverAddress, 0, sizeof(sockaddr_in)); + memset(&clientAddress, 0, sizeof(sockaddr_in)); + // serverAddress = {0}; + // clientAddress = {0}; // strcpy(hostname,host_ip_or_name); struct hostent *hostInfo = gethostbyname(host_ip_or_name); if (hostInfo == NULL){ @@ -158,7 +162,10 @@ enum communicationProtocol{ nsent(0), total_sent(0) { - + memset(&serverAddress, 0, sizeof(sockaddr_in)); + memset(&clientAddress, 0, sizeof(sockaddr_in)); + // serverAddress = {0}; + // clientAddress = {0}; /* // you can specify an IP address: */ /* */ diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index a2ddd6e39..d97adf49a 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1890,7 +1890,7 @@ int UDPStandardImplementation::startWriting(){ } else{ //copy to gui - if((packetsPerFrame * numpackets) == bufferSize){ + if(numpackets == packetsPerFrame * numJobsPerThread){ //only full frames copyFrameToGui(NULL,-1,wbuf[0]+HEADER_SIZE_NUM_TOT_PACKETS); #ifdef VERYVERBOSE cout << ithread << " finished copying" << endl;