Skip to content

Commit

Permalink
Reorder code, fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Mar 30, 2024
1 parent 78048ee commit 0cf4383
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Inventory::Send(const char* serverUrl)
size_t contentLength = ::strtol(responseHeader.Value(HTTPContentLength).c_str(), NULL, 10);
std::string contentType = responseHeader.Value(HTTPContentType);

Logger::LogFormat(LOG_INFO, "Got reply with content type: '%s', content length: %d",
Logger::LogFormat(LOG_INFO, "Got reply with content type: '%s', content length: %ul",
contentType.c_str(), contentLength);

char* resultData = new char[contentLength];
Expand Down Expand Up @@ -405,21 +405,20 @@ void
Inventory::_AddAccountInfo()
{
tinyxml2::XMLElement* accountInfo = fDocument->NewElement("ACCOUNTINFO");
fContent->LinkEndChild(accountInfo);

tinyxml2::XMLElement* keyName = fDocument->NewElement("KEYNAME");
keyName->LinkEndChild(fDocument->NewText("TAG"));
accountInfo->LinkEndChild(keyName);

std::string tag = Configuration::Get()->KeyValue("TAG");
if (tag == "")
tag = "NA";

tinyxml2::XMLElement* keyValue = fDocument->NewElement("KEYVALUE");
keyValue->LinkEndChild(fDocument->NewText(tag.c_str()));

accountInfo->LinkEndChild(keyName);
accountInfo->LinkEndChild(keyValue);

fContent->LinkEndChild(accountInfo);
Logger::Log(LOG_DEBUG, "\tAdded Account Info!");
}

Expand Down

0 comments on commit 0cf4383

Please sign in to comment.