diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-23 22:06:33 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-24 19:08:09 +0100 |
commit | a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade (patch) | |
tree | 91b7bd840756eff88d59617054854d55bb5910d2 /src/account-server | |
parent | 94d97450bc3a52cd90baa696320bd08d91ac301f (diff) | |
download | manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.gz manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.bz2 manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.xz manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.zip |
Rely more on the functionality in XML::Document
By default XML::Document will use the ResourceManager to resolve the
file name you pass to it. There is no point in disabling that
functionality only to resolve it manually.
Reviewed-by: Jared Adams
Diffstat (limited to 'src/account-server')
-rw-r--r-- | src/account-server/accounthandler.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index cb587ae5..aada5dbb 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -28,7 +28,6 @@ #include "chat-server/chathandler.h" #include "common/configuration.h" #include "common/manaserv_protocol.h" -#include "common/resourcemanager.h" #include "common/transaction.h" #include "net/connectionhandler.h" #include "net/messagein.h" @@ -150,15 +149,9 @@ AccountHandler::AccountHandler(const std::string &attributesFile): mUpdateHost(Configuration::getValue("net_defaultUpdateHost", std::string())), mDataUrl(Configuration::getValue("net_clientDataUrl", std::string())) { - std::string absPathFile = ResourceManager::resolve(attributesFile); - if (absPathFile.empty()) - { - LOG_FATAL("Account handler: Could not find " << attributesFile << "!"); - exit(EXIT_XML_NOT_FOUND); - } - - XML::Document doc(absPathFile, false); + XML::Document doc(attributesFile); xmlNodePtr node = doc.rootNode(); + if (!node || !xmlStrEqual(node->name, BAD_CAST "attributes")) { LOG_FATAL("Account handler: " << attributesFile << ": " |