mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 14:58:01 +00:00
Rename parse_stratum to parse_method as it is only for stratum messages that contain methods.
This commit is contained in:
parent
b871f69f62
commit
739cba28a7
@ -4055,7 +4055,7 @@ static void *stratum_thread(void *userdata)
|
||||
s = recv_line(pool->sock);
|
||||
if (unlikely(!s))
|
||||
continue;
|
||||
if (!parse_stratum(pool, s)) /* Create message queues here */
|
||||
if (!parse_method(pool, s)) /* Create message queues here */
|
||||
applog(LOG_INFO, "Unknown stratum msg: %s", s);
|
||||
free(s);
|
||||
if (unlikely(pool->swork.clean)) {
|
||||
|
4
util.c
4
util.c
@ -1055,7 +1055,7 @@ static bool parse_diff(struct pool *pool, json_t *val)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool parse_stratum(struct pool *pool, char *s)
|
||||
bool parse_method(struct pool *pool, char *s)
|
||||
{
|
||||
json_t *val = NULL, *method, *err_val, *params;
|
||||
json_error_t err;
|
||||
@ -1123,7 +1123,7 @@ bool auth_stratum(struct pool *pool)
|
||||
/* Parse all data prior sending auth request */
|
||||
while (sock_full(pool->sock, false)) {
|
||||
sret = recv_line(pool->sock);
|
||||
if (!parse_stratum(pool, sret)) {
|
||||
if (!parse_method(pool, sret)) {
|
||||
clear_sock(pool->sock);
|
||||
applog(LOG_WARNING, "Failed to parse stratum buffer");
|
||||
free(sret);
|
||||
|
2
util.h
2
util.h
@ -111,7 +111,7 @@
|
||||
struct pool;
|
||||
bool sock_send(int sock, char *s, ssize_t len);
|
||||
char *recv_line(SOCKETTYPE sock);
|
||||
bool parse_stratum(struct pool *pool, char *s);
|
||||
bool parse_method(struct pool *pool, char *s);
|
||||
bool extract_sockaddr(struct pool *pool, char *url);
|
||||
bool auth_stratum(struct pool *pool);
|
||||
bool initiate_stratum(struct pool *pool);
|
||||
|
Loading…
Reference in New Issue
Block a user