Fix identity setting for req/rep socket

This commit is contained in:
Alexey Rybalchenko 2016-04-07 15:13:51 +02:00
parent e977dfb609
commit 82090c356c

View File

@ -49,7 +49,7 @@ FairMQSocketZMQ::FairMQSocketZMQ(const string& type, const string& name, const i
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (zmq_setsockopt(fSocket, ZMQ_IDENTITY, &fId, fId.length()) != 0) if (zmq_setsockopt(fSocket, ZMQ_IDENTITY, fId.c_str(), fId.length()) != 0)
{ {
LOG(ERROR) << "Failed setting ZMQ_IDENTITY socket option, reason: " << zmq_strerror(errno); LOG(ERROR) << "Failed setting ZMQ_IDENTITY socket option, reason: " << zmq_strerror(errno);
} }