diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-11-14 11:01:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 11:01:57 +0000 |
commit | 288363814fb091ccfc452f0408bfa53727fc30c0 (patch) | |
tree | e460f1baa5d8436dee82c671ab9758be999fc1ef /xmrstak/misc | |
parent | b1645f6e26a7f1d0d907b4911ddf4ac6bc933166 (diff) | |
parent | 04e4d28c98a76e9b0982674fdeb9f27a82a6790e (diff) | |
download | xmr-stak-288363814fb091ccfc452f0408bfa53727fc30c0.zip xmr-stak-288363814fb091ccfc452f0408bfa53727fc30c0.tar.gz |
Merge pull request #103 from fireice-uk/topic-versioning
Versioning
Diffstat (limited to 'xmrstak/misc')
-rw-r--r-- | xmrstak/misc/executor.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp index c568fe9..454d1cf 100644 --- a/xmrstak/misc/executor.cpp +++ b/xmrstak/misc/executor.cpp @@ -34,6 +34,7 @@ #include "xmrstak/jconf.hpp" #include "xmrstak/misc/console.hpp" #include "xmrstak/donate-level.hpp" +#include "xmrstak/version.hpp" #include "xmrstak/http/webdesign.hpp" #include <thread> @@ -44,6 +45,7 @@ #include <assert.h> #include <time.h> + #ifdef _WIN32 #define strncasecmp _strnicmp #endif // _WIN32 @@ -848,7 +850,7 @@ void executor::http_hashrate_report(std::string& out) out.reserve(4096); - snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Hashrate Report", "Hashrate Report"); + snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Hashrate Report", ver_html, "Hashrate Report"); out.append(buffer); snprintf(buffer, sizeof(buffer), sHtmlHashrateBodyHigh, (unsigned int)nthd + 3); @@ -893,7 +895,7 @@ void executor::http_result_report(std::string& out) out.reserve(4096); - snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Result Report", "Result Report"); + snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Result Report", ver_html, "Result Report"); out.append(buffer); size_t iGoodRes = vMineResults[0].count, iTotalRes = iGoodRes; @@ -939,7 +941,7 @@ void executor::http_connection_report(std::string& out) out.reserve(4096); - snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Connection Report", "Connection Report"); + snprintf(buffer, sizeof(buffer), sHtmlCommonHeader, "Connection Report", ver_html, "Connection Report"); out.append(buffer); jpsock* pool = pick_pool_by_id(current_pool_id); @@ -1079,11 +1081,11 @@ void executor::http_json_report(std::string& out) cn_error.append(buffer); } - size_t bb_size = 1024 + hr_thds.size() + res_error.size() + cn_error.size(); + size_t bb_size = 2048 + hr_thds.size() + res_error.size() + cn_error.size(); std::unique_ptr<char[]> bigbuf( new char[ bb_size ] ); int bb_len = snprintf(bigbuf.get(), bb_size, sJsonApiFormat, - hr_thds.c_str(), hr_buffer, a, + get_version_str().c_str(), hr_thds.c_str(), hr_buffer, a, int_port(iPoolDiff), int_port(iGoodRes), int_port(iTotalRes), fAvgResTime, int_port(iPoolHashes), int_port(iTopDiff[0]), int_port(iTopDiff[1]), int_port(iTopDiff[2]), int_port(iTopDiff[3]), int_port(iTopDiff[4]), int_port(iTopDiff[5]), int_port(iTopDiff[6]), int_port(iTopDiff[7]), int_port(iTopDiff[8]), int_port(iTopDiff[9]), |