diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 6d39beb70..08ae54eb1 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -1766,7 +1766,7 @@ int multiSlsDetector::getReceiverStreamingPort(int detPos) { return sls::minusOneIfDifferent(r); } -void multiSlsDetector::setClientDataStreamingInIP(std::string ip, +void multiSlsDetector::setClientDataStreamingInIP(const std::string& ip, int detPos) { if (ip.length()) { int prev_streaming = enableDataStreamingToClient(-1); @@ -1800,7 +1800,7 @@ std::string multiSlsDetector::getClientStreamingIP(int detPos) { return sls::concatenateIfDifferent(r); } -void multiSlsDetector::setReceiverDataStreamingOutIP(std::string ip, +void multiSlsDetector::setReceiverDataStreamingOutIP(const std::string& ip, int detPos) { if (ip.length()) { int prev_streaming = enableDataStreamingFromReceiver(-1, detPos); diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h index da1dd52d3..347c20ddf 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h @@ -998,7 +998,7 @@ class multiSlsDetector : public virtual slsDetectorDefs, * By default, it is the IP of receiver hostname * @param detPos -1 for all detectors in list or specific detector position */ - void setClientDataStreamingInIP(std::string ip = "", + void setClientDataStreamingInIP(const std::string& ip = "", int detPos = -1); /** @@ -1016,7 +1016,7 @@ class multiSlsDetector : public virtual slsDetectorDefs, * By default, it is the IP of receiver hostname * @param detPos -1 for all detectors in list or specific detector position */ - void setReceiverDataStreamingOutIP(std::string ip = "", + void setReceiverDataStreamingOutIP(const std::string& ip = "", int detPos = -1); /** diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 37caa3b4c..3c1e5b06b 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2902,7 +2902,7 @@ int slsDetector::getReceiverStreamingPort() { return thisDetector->receiver_zmqport; } -void slsDetector::setClientStreamingIP(std::string sourceIP) { +void slsDetector::setClientStreamingIP(const std::string& sourceIP) { struct addrinfo *result; // on failure to convert to a valid ip if (dataSocket->ConvertHostnameToInternetAddress(sourceIP.c_str(), &result)) { diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index ead0beb32..756a7cb27 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -979,7 +979,7 @@ public: * Sets the client zmq ip\sa sharedSlsDetector * @param sourceIP client zmq ip */ - void setClientStreamingIP(std::string sourceIP); + void setClientStreamingIP(const std::string& sourceIP); /** * Returns the client zmq ip \sa sharedSlsDetector