summaryrefslogtreecommitdiffstats
path: root/src/game-server/itemmanager.cpp
diff options
context:
space:
mode:
authorAndreas Habel <mail@exceptionfault.de>2008-11-14 18:28:51 +0100
committerAndreas Habel <mail@exceptionfault.de>2008-11-14 18:28:51 +0100
commit0b920a390e7ffbe77575f0c29c19ac286785929b (patch)
tree5ecce4186e20267e239a6af8d4037b2c29bf0310 /src/game-server/itemmanager.cpp
parentb5ef81d1bed0caa6fd71d63c9d6ae06e5fcd0d5e (diff)
Added check for database version on startup of Accountserver.
The provided CreateTable.sql scripts store their versions inline of a database table. The account server checks this version number with its known compatible version. If the numbers don't match, the account server raises an error and shuts down.
Diffstat (limited to 'src/game-server/itemmanager.cpp')
-rw-r--r--src/game-server/itemmanager.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/game-server/itemmanager.cpp b/src/game-server/itemmanager.cpp
index a86a01e..3fbd13e 100644
--- a/src/game-server/itemmanager.cpp
+++ b/src/game-server/itemmanager.cpp
@@ -87,15 +87,7 @@ void ItemManager::reload()
if (xmlStrEqual(node->name, BAD_CAST "version"))
{
std::string revision = XML::getProperty(node, "revision", std::string());
- size_t found = revision.find("$Revision: ");
-
- if (found==std::string::npos)
- {
- LOG_ERROR("Itemdatabase has wrong version format string!");
- continue;
- }
- // position 11 is the first numeric character in the SVN tag
- itemDatabaseVersion = atoi(revision.substr(11).c_str());
+ itemDatabaseVersion = atoi(revision.c_str());
LOG_INFO("Loading item database version " << itemDatabaseVersion);
continue;