mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
removed .str().c_str() (#1090)
This commit is contained in:
parent
6e826d2840
commit
c43a4030a5
@ -149,12 +149,12 @@ void Listener::CreateUDPSocket(int &actualSize) {
|
|||||||
packetSize = generalData->vetoPacketSize;
|
packetSize = generalData->vetoPacketSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ip =
|
std::string ip;
|
||||||
(eth.length() ? InterfaceNameToIp(eth).str().c_str() : "");
|
if (eth.length() > 0)
|
||||||
|
ip = InterfaceNameToIp(eth).str();
|
||||||
udpSocket = nullptr;
|
udpSocket = nullptr;
|
||||||
udpSocket = make_unique<UdpRxSocket>(
|
udpSocket = make_unique<UdpRxSocket>(
|
||||||
udpPortNumber, packetSize, (ip.length() ? ip.c_str() : nullptr),
|
udpPortNumber, packetSize, (ip.empty() ? nullptr : ip.c_str()),
|
||||||
generalData->udpSocketBufferSize);
|
generalData->udpSocketBufferSize);
|
||||||
LOG(logINFO) << index << ": UDP port opened at port " << udpPortNumber
|
LOG(logINFO) << index << ": UDP port opened at port " << udpPortNumber
|
||||||
<< " (" << (ip.length() ? ip : "any") << ')';
|
<< " (" << (ip.length() ? ip : "any") << ')';
|
||||||
@ -213,9 +213,12 @@ void Listener::CreateDummySocketForUDPSocketBufferSize(int s, int &actualSize) {
|
|||||||
try {
|
try {
|
||||||
// to allowe ports to be bound from udpsocket
|
// to allowe ports to be bound from udpsocket
|
||||||
udpSocket.reset();
|
udpSocket.reset();
|
||||||
UdpRxSocket g(
|
|
||||||
udpPortNumber, packetSize,
|
std::string ip;
|
||||||
(eth.length() ? InterfaceNameToIp(eth).str().c_str() : nullptr),
|
if (eth.length() > 0)
|
||||||
|
ip = InterfaceNameToIp(eth).str();
|
||||||
|
UdpRxSocket g(udpPortNumber, packetSize,
|
||||||
|
(ip.empty() ? nullptr : ip.c_str()),
|
||||||
generalData->udpSocketBufferSize);
|
generalData->udpSocketBufferSize);
|
||||||
|
|
||||||
// doubled due to kernel bookkeeping (could also be less due to
|
// doubled due to kernel bookkeeping (could also be less due to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user