1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

longpoll seems to work either way with post or get but some servers prefer get so change to httpget.

This commit is contained in:
Con Kolivas 2011-07-17 14:39:53 +10:00
parent 65b2aff8d0
commit 6e30c0701c

5
util.c
View File

@ -259,7 +259,10 @@ json_t *json_rpc_call(CURL *curl, const char *url,
curl_easy_setopt(curl, CURLOPT_USERPWD, userpass);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
}
curl_easy_setopt(curl, CURLOPT_POST, 1);
if (longpoll)
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
else
curl_easy_setopt(curl, CURLOPT_POST, 1);
if (opt_protocol)
applog(LOG_DEBUG, "JSON protocol request:\n%s\n", rpc_req);