X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;ds=sidebyside;f=example%2Fdiameter%2Flauncher%2Fmain.cpp;h=5a8422d8503ca8c04a05fa7656fd5ba8db1dfeac;hb=d05828d1ebfc81da3041e8ac474057fc0e453f0c;hp=fdb69d30c020e1479d1ec8f1d1caf62328de7c1f;hpb=8da04b5c6567907540a54d440aecc2b7d70e079b;p=anna.git diff --git a/example/diameter/launcher/main.cpp b/example/diameter/launcher/main.cpp index fdb69d3..5a8422d 100644 --- a/example/diameter/launcher/main.cpp +++ b/example/diameter/launcher/main.cpp @@ -358,11 +358,19 @@ public: bool Launcher::getDataBlockFromHexFile(const std::string &pathfile, anna::DataBlock &db) const throw() { // Get hex string - static char buffer[2048]; + static char buffer[8192]; std::ifstream infile(pathfile.c_str(), std::ifstream::in); 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();