mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
Fix return values of nanomsg send/receive calls
This commit is contained in:
parent
4be6ba6e66
commit
daba1771fa
|
@ -103,6 +103,7 @@ int FairMQSocketNN::Send(FairMQMessage* msg, const string& flag)
|
||||||
fBytesTx += nbytes;
|
fBytesTx += nbytes;
|
||||||
++fMessagesTx;
|
++fMessagesTx;
|
||||||
static_cast<FairMQMessageNN*>(msg)->fReceiving = false;
|
static_cast<FairMQMessageNN*>(msg)->fReceiving = false;
|
||||||
|
return nbytes;
|
||||||
}
|
}
|
||||||
if (nn_errno() == EAGAIN)
|
if (nn_errno() == EAGAIN)
|
||||||
{
|
{
|
||||||
|
@ -126,6 +127,7 @@ int FairMQSocketNN::Send(FairMQMessage* msg, const int flags)
|
||||||
fBytesTx += nbytes;
|
fBytesTx += nbytes;
|
||||||
++fMessagesTx;
|
++fMessagesTx;
|
||||||
static_cast<FairMQMessageNN*>(msg)->fReceiving = false;
|
static_cast<FairMQMessageNN*>(msg)->fReceiving = false;
|
||||||
|
return nbytes;
|
||||||
}
|
}
|
||||||
if (nn_errno() == EAGAIN)
|
if (nn_errno() == EAGAIN)
|
||||||
{
|
{
|
||||||
|
@ -151,6 +153,7 @@ int FairMQSocketNN::Receive(FairMQMessage* msg, const string& flag)
|
||||||
msg->Rebuild();
|
msg->Rebuild();
|
||||||
msg->SetMessage(ptr, nbytes);
|
msg->SetMessage(ptr, nbytes);
|
||||||
static_cast<FairMQMessageNN*>(msg)->fReceiving = true;
|
static_cast<FairMQMessageNN*>(msg)->fReceiving = true;
|
||||||
|
return nbytes;
|
||||||
}
|
}
|
||||||
if (nn_errno() == EAGAIN)
|
if (nn_errno() == EAGAIN)
|
||||||
{
|
{
|
||||||
|
@ -175,6 +178,7 @@ int FairMQSocketNN::Receive(FairMQMessage* msg, const int flags)
|
||||||
++fMessagesRx;
|
++fMessagesRx;
|
||||||
msg->SetMessage(ptr, nbytes);
|
msg->SetMessage(ptr, nbytes);
|
||||||
static_cast<FairMQMessageNN*>(msg)->fReceiving = true;
|
static_cast<FairMQMessageNN*>(msg)->fReceiving = true;
|
||||||
|
return nbytes;
|
||||||
}
|
}
|
||||||
if (nn_errno() == EAGAIN)
|
if (nn_errno() == EAGAIN)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user