aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <Toni.Uhlig@tq-group.com>2017-12-06 13:26:07 +0100
committerToni Uhlig <Toni.Uhlig@tq-group.com>2017-12-06 13:26:07 +0100
commit1ebd329cbabb438b0560ed481be6385784a4882d (patch)
treee662a476147fa2d85c63ddec6bd3d258000b427f
parent3c79f311cfd32f7f4508b6225a90d9caf567e923 (diff)
cosmetics
-rw-r--r--src/UpdateFactory.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/UpdateFactory.cpp b/src/UpdateFactory.cpp
index d5dac40..3b01107 100644
--- a/src/UpdateFactory.cpp
+++ b/src/UpdateFactory.cpp
@@ -135,11 +135,6 @@ void UpdateFactory::setDest(const char *hostname, int port)
this->hostname = hostname;
this->port = port;
http_client = new httplib::Client(hostname, port);
- phpsessid = "";
- emc_serial = "";
- authenticated = false;
- mapped_emc_version = EMC_UNKNOWN;
- mapped_firmware_version = EMC_UNKNOWN;
}
void UpdateFactory::setDest(std::string& hostname, int port)
@@ -217,7 +212,7 @@ int UpdateFactory::doAuth()
if (!authenticated) {
std::ostringstream ostr;
- ostr << "login=" << emc_serial << "&password=" << (passwd.c_str() ? passwd.c_str() : "");
+ ostr << "login=" << emc_serial << "&password=" << passwd;
genRequest(req, "/start.php", ostr.str().c_str());
if (!doPost(req, res2))
@@ -322,8 +317,11 @@ void UpdateFactory::cleanup()
delete http_client;
http_client = nullptr;
}
+ phpsessid = "";
+ emc_serial = "";
authenticated = false;
- emc_serial = "";
+ mapped_emc_version = EMC_UNKNOWN;
+ mapped_firmware_version = EMC_UNKNOWN;
}
void UpdateFactory::genRequest(httplib::Request& req, const char *path,