aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--src/UpdateFactory.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/TODO b/TODO
index e404772..e94b722 100644
--- a/TODO
+++ b/TODO
@@ -3,3 +3,5 @@
- shrink Http.hpp (server is not needed afaik)
- port Http.hpp to HTTP/1.1 (chunked transport)
- Http.hpp uses Maps and Multimaps (What happens with multiple values per key e.g. multiple Set-Cookie's in one response?)
+
+- update python mock (was developed against 1.5* and 2.* versions)
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,