diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/host.cpp | 2 | ||||
-rw-r--r-- | src/network/network.cpp | 2 | ||||
-rw-r--r-- | src/network/network_chat_gui.cpp | 2 | ||||
-rw-r--r-- | src/network/network_server.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp index 917de0a2f..7adb64f01 100644 --- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -173,7 +173,7 @@ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // !G strecpy(r.ifr_name, req->ifr_name, lastof(r.ifr_name)); if (ioctl(sock, SIOCGIFFLAGS, &r) != -1 && - r.ifr_flags & IFF_BROADCAST && + (r.ifr_flags & IFF_BROADCAST) && ioctl(sock, SIOCGIFBRDADDR, &r) != -1) { NetworkAddress addr(&r.ifr_broadaddr, sizeof(sockaddr)); if (!broadcast->Contains(addr)) *broadcast->Append() = addr; diff --git a/src/network/network.cpp b/src/network/network.cpp index 266ce506d..32b1cb683 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -462,7 +462,7 @@ void NetworkCloseClient(NetworkClientSocket *cs) } /* When the client was PRE_ACTIVE, the server was in pause mode, so unpause */ - if (cs->status == STATUS_PRE_ACTIVE && _pause_mode & PM_PAUSED_JOIN) { + if (cs->status == STATUS_PRE_ACTIVE && (_pause_mode & PM_PAUSED_JOIN)) { DoCommandP(0, PM_PAUSED_JOIN, 0, CMD_PAUSE); NetworkServerSendChat(NETWORK_ACTION_SERVER_MESSAGE, DESTTYPE_BROADCAST, 0, "", CLIENT_ID_SERVER, NETWORK_SERVER_MESSAGE_GAME_UNPAUSED_CONNECT_FAIL); } diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 4284f15d7..d3fa7245c 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -96,7 +96,7 @@ void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char * /* The default colour for a message is company colour. Replace this with * white for any additional lines */ - cmsg->colour = (bufp == buf && colour & IS_PALETTE_COLOUR) ? colour : TC_WHITE; + cmsg->colour = (bufp == buf && (colour & IS_PALETTE_COLOUR)) ? colour : TC_WHITE; cmsg->end_date = _date + duration; bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 8b1a5b669..d0bdb4fd4 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -866,8 +866,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) } - if (GetCommandFlags(cp.cmd) & CMD_SERVER && ci->client_id != CLIENT_ID_SERVER) { - IConsolePrintF(CC_ERROR, "WARNING: server only command from client %d (IP: %s), kicking...", ci->client_id, GetClientIP(ci)); + if ((GetCommandFlags(cp.cmd) & CMD_SERVER) && ci->client_id != CLIENT_ID_SERVER) { + IConsolePrintF(CC_ERROR, "WARNING: server only command from: client %d (IP: %s), kicking...", ci->client_id, GetClientIP(ci)); SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_KICKED); return; } |