X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fmain.cpp;h=54fcbdc3ae644417f2cf974aa521666fd5867ee9;hb=2bbb5ef5ed8fc5997d9c9a973860ca8aae769ad5;hp=280624cbc03f47d15e9e3f49e06f99c5b4f92f87;hpb=5256cb543a9d35b610df19bd227cde977186aef0;p=anna.git diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index 280624c..54fcbdc 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -363,6 +363,14 @@ bool Launcher::getDataBlockFromHexFile(const std::string &pathfile, anna::DataBl if(infile.is_open()) { infile >> buffer; std::string hexString(buffer, strlen(buffer)); + // Allow colon separator in hex string: we have to remove them before processing with 'fromHexString': + hexString.erase(std::remove(hexString.begin(), hexString.end(), ':'), hexString.end()); + LOGDEBUG( + std::string msg = "Hex string (remove colons if exists): "; + msg += hexString; + anna::Logger::debug(msg, ANNA_FILE_LOCATION); + ); + anna::functions::fromHexString(hexString, db); // Close file infile.close(); @@ -1466,8 +1474,8 @@ throw(anna::RuntimeException) { std::string address; int port; anna::functions::getAddressAndPortFromSocketLiteral(cl.getValue("httpServer"), address, port); - //const anna::comm::Device* device = network.find(Device::asAddress(address)); // aqui hay que proporcionar una IP ! - const anna::comm::Device* device = *((network.resolve(address)->device_begin())); // ArtimaƱa para resolver (IP o hostname) + //const anna::comm::Device* device = network.find(Device::asAddress(address)); // here provide IP + const anna::comm::Device* device = *((network.resolve(address)->device_begin())); // trick to solve a_httpServerSocket = new anna::comm::ServerSocket(anna::comm::INetAddress(device, port), cl.exists("httpServerShared") /* shared bind */, &anna::http::Transport::getFactory()); }