From 59a6b35dd1582b73ce791c1a962cdd81d015cd9c Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 5 Apr 2009 11:34:40 +0000 Subject: [PATCH] Fixing compiler errors. --- src/net/common/clientstate.cpp | 7 ++++--- src/net/common/clientthread.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index ea6abf5c..083dea3a 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -472,8 +472,8 @@ ClientStateReadingServerList::Process(ClientThread &client) // IPv6 support for avatar servers depends on this address and on libcurl. const TiXmlNode *avatarNode = nextServer->FirstChild("AvatarServerAddress"); - if (!nameNode || !nameNode->ToElement() || !addrNode || !addr4Node->ToElement() - || !addr6Node->ToElement() || !portNode || !portNode->ToElement()) + if (!nameNode || !nameNode->ToElement() || !addr4Node || !addr4Node->ToElement() + || !addr6Node || !addr6Node->ToElement() || !portNode || !portNode->ToElement()) throw ClientException(__FILE__, __LINE__, ERR_SOCK_INVALID_SERVERLIST_XML, 0); serverInfo.name = nameNode->ToElement()->Attribute("value"); @@ -489,7 +489,8 @@ ClientStateReadingServerList::Process(ClientThread &client) if (sctpNode && sctpNode->ToElement()) { int tmpSctp; - sctpNode->ToElement()->QueryIntAttribute + sctpNode->ToElement()->QueryIntAttribute("value", &tmpSctp); + serverInfo.supportsSctp = tmpSctp == 1 ? true : false; } if (avatarNode && avatarNode->ToElement()) serverInfo.avatarServerAddr = avatarNode->ToElement()->Attribute("value"); diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index 818abf02..eab332fe 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -978,7 +978,7 @@ ClientThread::ClearServerInfoMap() void ClientThread::UseServer(unsigned serverId) { - ClientContext &context = client.GetContext(); + ClientContext &context = GetContext(); ServerInfo useInfo(GetServerInfo(serverId)); if (context.GetAddrFamily() == AF_INET6)