diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2018-05-30 21:18:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-30 21:18:45 +0100 |
commit | c0ab1734332d6472225d8ac7394f6fcba71aabc9 (patch) | |
tree | b53a4c37905a0cb5dfa6a66f514cf3dc1ea94a21 /xmrstak/net/jpsock.hpp | |
parent | 26a5d65f12b2f19a0a3ece39a2bc64718796367b (diff) | |
parent | 4f34bd18024fa71a8cab81d5a0b86cf5c7d9370e (diff) | |
download | xmr-stak-2.4.4.zip xmr-stak-2.4.4.tar.gz |
Merge pull request #1610 from fireice-uk/dev2.4.4
release 2.4.4
Diffstat (limited to 'xmrstak/net/jpsock.hpp')
-rw-r--r-- | xmrstak/net/jpsock.hpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xmrstak/net/jpsock.hpp b/xmrstak/net/jpsock.hpp index 2ddeeee..ad34f6c 100644 --- a/xmrstak/net/jpsock.hpp +++ b/xmrstak/net/jpsock.hpp @@ -15,7 +15,7 @@ - Parsing or connection error Those are fatal errors (we drop the connection if we encounter them). After they are constructed from const char* strings from various places. - (can be from read-only mem), we passs them in an exectutor message + (can be from read-only mem), we pass them in an executor message once the recv thread expires. - Call error This error happens when the "server says no". Usually because the job was @@ -40,9 +40,9 @@ public: static bool hex2bin(const char* in, unsigned int len, unsigned char* out); static void bin2hex(const unsigned char* in, unsigned int len, char* out); - inline double get_pool_weight(bool gross_weight) - { - double ret = pool_weight; + inline double get_pool_weight(bool gross_weight) + { + double ret = pool_weight; if(gross_weight && bRunning) ret += 10.0; if(gross_weight && bLoggedIn) @@ -124,8 +124,8 @@ private: void jpsock_thread(); bool jpsock_thd_main(); bool process_line(char* line, size_t len); - bool process_pool_job(const opq_json_val* params); - bool cmd_ret_wait(const char* sPacket, opq_json_val& poResult); + bool process_pool_job(const opq_json_val* params, const uint64_t messageId); + bool cmd_ret_wait(const char* sPacket, opq_json_val& poResult, uint64_t& messageId); char sMinerId[64]; std::atomic<uint64_t> iJobDiff; @@ -142,5 +142,8 @@ private: opaque_private* prv; base_socket* sck; + + uint64_t iMessageCnt = 0; + uint64_t iLastMessageId = 0; }; |