mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Use the presence of X-Roll-Ntime in the header as a bool for exists unless N is found in the response.
This commit is contained in:
parent
73e33c0925
commit
a0a5858d15
10
util.c
10
util.c
@ -205,12 +205,14 @@ static size_t resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data)
|
||||
applog(LOG_DEBUG, "HTTP hdr(%s): %s", key, val);
|
||||
|
||||
if (!strcasecmp("X-Roll-Ntime", key)) {
|
||||
if (!strcasecmp("Y", val)) {
|
||||
if (!strncasecmp("N", val, 1)) {
|
||||
if (opt_debug)
|
||||
applog(LOG_DEBUG, "X-Roll-Ntime: Y found");
|
||||
applog(LOG_DEBUG, "X-Roll-Ntime: N found");
|
||||
} else {
|
||||
if (opt_debug)
|
||||
applog(LOG_DEBUG, "X-Roll-Ntime found");
|
||||
hi->has_rolltime = true;
|
||||
} else if (opt_debug)
|
||||
applog(LOG_DEBUG, "X-Roll-Ntime: N found");
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcasecmp("X-Long-Polling", key)) {
|
||||
|
Loading…
Reference in New Issue
Block a user