mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 16:15:23 +08:00
Problem: bind_to_device unnecessarily accepts a non-const string parameter
Solution: add const
This commit is contained in:
parent
12c4b55af8
commit
3f4e64edc0
@ -237,7 +237,7 @@ int zmq::set_nosigpipe (fd_t s_)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zmq::bind_to_device (fd_t s_, std::string &bound_device_)
|
||||
void zmq::bind_to_device (fd_t s_, const std::string &bound_device_)
|
||||
{
|
||||
#ifdef ZMQ_HAVE_SO_BINDTODEVICE
|
||||
int rc = setsockopt (s_, SOL_SOCKET, SO_BINDTODEVICE,
|
||||
|
@ -56,7 +56,7 @@ void set_ip_type_of_service (fd_t s_, int iptos_);
|
||||
int set_nosigpipe (fd_t s_);
|
||||
|
||||
// Binds the underlying socket to the given device, eg. VRF or interface
|
||||
void bind_to_device (fd_t s_, std::string &bound_device_);
|
||||
void bind_to_device (fd_t s_, const std::string &bound_device_);
|
||||
|
||||
// Initialize network subsystem. May be called multiple times. Each call must be matched by a call to shutdown_network.
|
||||
bool initialize_network ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user