Added possibility to set variant by proxy (#79)
Added fix for wrong cpu cache detection
This commit is contained in:
parent
b13113b786
commit
a9e3024b9c
4 changed files with 35 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <string.h>
|
||||
#include <utility>
|
||||
#include <uv.h>
|
||||
#include <Options.h>
|
||||
|
||||
#include "interfaces/IClientListener.h"
|
||||
#include "log/Log.h"
|
||||
|
@ -200,6 +201,26 @@ bool Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (params.HasMember("variant")) {
|
||||
int variantFromProxy = params["variant"].GetInt();
|
||||
|
||||
if (Options::i()->forcePowVersion() == Options::POW_AUTODETECT) {
|
||||
switch (variantFromProxy) {
|
||||
case -1:
|
||||
Options::i()->setForcePowVersion(Options::POW_AUTODETECT);
|
||||
break;
|
||||
case 0:
|
||||
Options::i()->setForcePowVersion(Options::POW_V1);
|
||||
break;
|
||||
case 1:
|
||||
Options::i()->setForcePowVersion(Options::POW_V2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_job == job) {
|
||||
if (!m_quiet) {
|
||||
LOG_WARN("[%s:%u] duplicate job received, reconnect", m_url.host(), m_url.port());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue