mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
ctb server bug fix: udp ip not reset before overwriting (smaller size creates problems)
This commit is contained in:
@ -28,6 +28,7 @@ int getUdPSocketDescriptor() {
|
||||
int setUDPDestinationDetails(const char* ip, unsigned short int port) {
|
||||
udpDestinationPort = port;
|
||||
size_t len = strlen(ip);
|
||||
memset(udpDestinationIp, 0, MAX_STR_LENGTH);
|
||||
strncpy(udpDestinationIp, ip, len > MAX_STR_LENGTH ? MAX_STR_LENGTH : len );
|
||||
|
||||
if (udpServerAddrInfo) {
|
||||
|
Reference in New Issue
Block a user