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();
}
a_burstActive = true;
- register int count;
+ int count;
for (count = 0; count < loadAmount; count++)
if (!sendBurstMessage()) break;
return -2;
}
- register int count;
+ int count;
for (count = 0; count < loadAmount; count++)
if (!sendBurstMessage(true /* anyway */)) break;
if (a_burstRepeat) {
a_burstCycle++;
- if (burstLogEnabled()) writeBurstLogFile(anna::functions::asString(("\nCompleted burst cycle. Starting again (repeat mode) on cycle %d.\n", a_burstCycle)));
+ if (burstLogEnabled()) writeBurstLogFile(anna::functions::asString("\nCompleted burst cycle. Starting again (repeat mode) on cycle %d.\n", a_burstCycle));
} else {
if (burstLogEnabled()) writeBurstLogFile("\nCompleted burst cycle. Burst finished (repeat mode disabled).\n");
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());
}