1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Do away with GET for dealing with longpoll forever. POST is the one that works everywhere, not the other way around.

This commit is contained in:
Con Kolivas 2011-07-24 17:34:57 +10:00
parent 508c5c4b12
commit 401983136c

7
util.c
View File

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