mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
fix for changing udp socket buffer size
This commit is contained in:
parent
4caf10c12b
commit
b089dc90cd
@ -342,7 +342,6 @@ TEST_CASE("rx_padding", "[.cmd][.rx]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") {
|
TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") {
|
||||||
//exit(-1);
|
|
||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
|
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
|
||||||
|
@ -205,6 +205,8 @@ void Listener::CreateDummySocketForUDPSocketBufferSize(int s, int &actualSize) {
|
|||||||
|
|
||||||
// create dummy socket
|
// create dummy socket
|
||||||
try {
|
try {
|
||||||
|
// to allowe ports to be bound from udpsocket
|
||||||
|
udpSocket.reset();
|
||||||
UdpRxSocket g(
|
UdpRxSocket g(
|
||||||
udpPortNumber, packetSize,
|
udpPortNumber, packetSize,
|
||||||
(eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr),
|
(eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr),
|
||||||
@ -218,7 +220,7 @@ void Listener::CreateDummySocketForUDPSocketBufferSize(int s, int &actualSize) {
|
|||||||
} else {
|
} else {
|
||||||
generalData->udpSocketBufferSize = actualSize / 2;
|
generalData->udpSocketBufferSize = actualSize / 2;
|
||||||
}
|
}
|
||||||
|
// to allow udp sockets to be able to bind in the future
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
throw RuntimeError("Could not create a test UDP socket on port " +
|
throw RuntimeError("Could not create a test UDP socket on port " +
|
||||||
std::to_string(udpPortNumber));
|
std::to_string(udpPortNumber));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user