summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-04-06 16:33:38 -0600
committerJared Adams <jaxad0127@gmail.com>2010-04-06 17:05:49 -0600
commitdb3bc0a260cd26ee58d53d2b0531d0c0c471ccd0 (patch)
treee0b24d1593e752df328aa0e7252efefee460dcb4 /src/net
parentd17c63e1bb5579fb05c58f9abc3fb4be5bb9d58f (diff)
downloadmana-client-db3bc0a260cd26ee58d53d2b0531d0c0c471ccd0.tar.gz
mana-client-db3bc0a260cd26ee58d53d2b0531d0c0c471ccd0.tar.bz2
mana-client-db3bc0a260cd26ee58d53d2b0531d0c0c471ccd0.tar.xz
mana-client-db3bc0a260cd26ee58d53d2b0531d0c0c471ccd0.zip
Fix a crash when adding new servers
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net')
-rw-r--r--src/net/serverinfo.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index adfdee7e..8b5b8f9d 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -36,22 +36,24 @@ public:
EATHENA
};
+ typedef std::pair<int, std::string> VersionString;
+
Type type;
std::string name;
std::string hostname;
unsigned short port;
std::string description;
+ VersionString version;
bool save;
- bool meetsMinimumVersion;
ServerInfo()
{
type = UNKNOWN;
port = 0;
save = false;
- meetsMinimumVersion = true;
+ version.first = 0;
}
ServerInfo(const ServerInfo &info)
@@ -61,8 +63,9 @@ public:
hostname = info.hostname;
port = info.port;
description = info.description;
+ version.first = info.version.first;
+ version.second = info.version.second;
save = info.save;
- meetsMinimumVersion = info.meetsMinimumVersion;
}
bool isValid() const
@@ -77,8 +80,9 @@ public:
hostname.clear();
port = 0;
description.clear();
+ version.first = 0;
+ version.second.clear();
save = false;
- meetsMinimumVersion = true;
}
bool operator==(const ServerInfo &other) const