1
0
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:
Con Kolivas 2011-09-06 12:00:40 +10:00
parent 73e33c0925
commit a0a5858d15

10
util.c
View File

@ -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); applog(LOG_DEBUG, "HTTP hdr(%s): %s", key, val);
if (!strcasecmp("X-Roll-Ntime", key)) { if (!strcasecmp("X-Roll-Ntime", key)) {
if (!strcasecmp("Y", val)) { if (!strncasecmp("N", val, 1)) {
if (opt_debug) 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; hi->has_rolltime = true;
} else if (opt_debug) }
applog(LOG_DEBUG, "X-Roll-Ntime: N found");
} }
if (!strcasecmp("X-Long-Polling", key)) { if (!strcasecmp("X-Long-Polling", key)) {