mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
ctb server: reserved not required, as the additional space in last packet can be calcualted
This commit is contained in:
@ -88,7 +88,6 @@ int fillUDPPacket(char* buffer) {
|
|||||||
// calculate number of bytes to copy
|
// calculate number of bytes to copy
|
||||||
int numBytesToCopy = ((udpHeaderOffset + UDP_PACKET_DATA_BYTES) <= dataBytes) ?
|
int numBytesToCopy = ((udpHeaderOffset + UDP_PACKET_DATA_BYTES) <= dataBytes) ?
|
||||||
UDP_PACKET_DATA_BYTES : (dataBytes - udpHeaderOffset);
|
UDP_PACKET_DATA_BYTES : (dataBytes - udpHeaderOffset);
|
||||||
header->reserved = numBytesToCopy;
|
|
||||||
|
|
||||||
// copy data
|
// copy data
|
||||||
memcpy(buffer + sizeof(sls_detector_header), ramValues + udpHeaderOffset, numBytesToCopy);
|
memcpy(buffer + sizeof(sls_detector_header), ramValues + udpHeaderOffset, numBytesToCopy);
|
||||||
|
Reference in New Issue
Block a user