From 3c1ff1f14bcc5f29ac1b9d56707d698428febe5d Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 18 Dec 2016 20:39:35 +0100 Subject: [PATCH] Changed: Minor changes --- code/nel/CMakeLists.txt | 3 --- code/nel/src/net/unified_network.cpp | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 0f1d11579..84b820d33 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -1,5 +1,3 @@ -PROJECT(NeL CXX C) - IF(WITH_STATIC_DRIVERS) ADD_DEFINITIONS(-DNL_STATIC) ENDIF() @@ -17,7 +15,6 @@ IF(WITH_3D) IF(WITH_NEL_CEGUI) FIND_PACKAGE(CEGUI) ENDIF() - ENDIF() IF(WITH_SOUND) diff --git a/code/nel/src/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index ee882f547..3a57b4b0d 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.cpp @@ -828,17 +828,18 @@ void CUnifiedNetwork::addService(const string &name, const vector for (uint i = 0; i < addr.size(); i++) { // first we have to look if we have a network that can established the connection - + uint j = 0; + // it's loopback ip address, it's ok if (!addr[i].isLoopbackIPAddress()) { - // it's loopback ip address, it's ok for (j = 0; j < laddr.size (); j++) { if (laddr[j].internalNetAddress () == addr[i].internalNetAddress ()) { - break; // it's ok, we can try + // it's ok, we can try + break; } } @@ -1272,7 +1273,8 @@ uint8 CUnifiedNetwork::findConnectionId (TServiceId sid, uint8 nid) uint8 connectionId = _IdCnx[sid.get()].DefaultNetwork; if (nid == 0xFF) - { // default network + { + // default network //nldebug ("HNETL5: nid %hu, will use the default connection %hu", (uint16)nid, (uint16)connectionId); } else if (nid >= _IdCnx[sid.get()].NetworkConnectionAssociations.size()) @@ -1293,7 +1295,6 @@ uint8 CUnifiedNetwork::findConnectionId (TServiceId sid, uint8 nid) if (connectionId >= _IdCnx[sid.get()].Connections.size() || !_IdCnx[sid.get()].Connections[connectionId].valid() || !_IdCnx[sid.get()].Connections[connectionId].CbNetBase->connected()) { - if (nid != 0xFF) { // not a default network. There's a problem with the selected connectionID, so try to find a valid one