From 0b920a390e7ffbe77575f0c29c19ac286785929b Mon Sep 17 00:00:00 2001 From: Andreas Habel Date: Fri, 14 Nov 2008 18:28:51 +0100 Subject: 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. --- src/game-server/itemmanager.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/game-server/itemmanager.cpp') 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; -- cgit