From b643511ff513aadbd0485afc6b264702aac41021 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 23 May 2013 16:00:24 +0100 Subject: portability --- rotord/rotord.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'rotord/rotord.cpp') diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index bf1be02..27a09d7 100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -283,8 +283,21 @@ void RotorServer::handleHelp(const std::string& name, const std::string& value){ int RotorServer::main(const std::vector& args){ if (!_helpRequested) { - unsigned short port = (unsigned short) config().getInt("port", 9980); + + unsigned short port; + + xmlIO xml; + if(xml.loadFile("settings.xml") ){ + port=xml.getAttribute("Rotor","port",9980,0); + } + else cerr<<"Rotord: settings.xml not found, using defaults"<