MT#57439 fix the bit flag comparison in `JsonRpcServer::processMessage()`

The commit fixes this:

     JsonRPCServer.cpp: In static member function 'static int JsonRpcServer::processMessage(char*, unsigned int*, JsonrpcPeerConnection*)':
     JsonRPCServer.cpp:135:49: warning: enum constant in boolean context [-Wint-in-bool-context]
       135 |       if (peer->flags && JsonrpcPeerConnection::FL_CLOSE_WRONG_REPLY) {
           |

Change-Id: I7894f3e2727e384458ea736ad9555864894b0386
mr11.4.1
Donat Zenichev 3 years ago
parent 42b9ad135f
commit ff4a390bca

@ -132,7 +132,7 @@ int JsonRpcServer::processMessage(char* msgbuf, unsigned int* msg_size,
DBG("received reply for unknown request");
*msg_size = 0;
if (peer->flags && JsonrpcPeerConnection::FL_CLOSE_WRONG_REPLY) {
if (peer->flags & JsonrpcPeerConnection::FL_CLOSE_WRONG_REPLY) {
INFO("closing connection after unknown reply id %s received\n", id.c_str());
return -2;
}

Loading…
Cancel
Save