mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 00:58:01 +02:00
ctb readout works with receiver for digital readout, allocate ram in server only if 1g udp, free addr info only when setting new udp detals upon configuring ,brough readout flags to receiver
This commit is contained in:
@ -62,6 +62,7 @@ int setUDPDestinationDetails(const char* ip, unsigned short int port) {
|
||||
}
|
||||
|
||||
int createUDPSocket() {
|
||||
FILE_LOG(logDEBUG2, ("Creating UDP Socket\n"));
|
||||
if (!strlen(udpDestinationIp)) {
|
||||
FILE_LOG(logERROR, ("No destination UDP ip specified.\n"));
|
||||
return FAIL;
|
||||
@ -107,10 +108,9 @@ int sendUDPPacket(const char* buf, int length) {
|
||||
}
|
||||
|
||||
void closeUDPSocket() {
|
||||
close(udpSockfd);
|
||||
udpSockfd = -1;
|
||||
if (udpServerAddrInfo) {
|
||||
freeaddrinfo(udpServerAddrInfo);
|
||||
udpServerAddrInfo = 0;
|
||||
if (udpSockfd != -1) {
|
||||
FILE_LOG(logINFO, ("Udp client socket closed\n"));
|
||||
close(udpSockfd);
|
||||
udpSockfd = -1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user