From 15351e5ddef3624fa03aa4dd0b1f5901f6a2a4eb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 6 Feb 2015 12:00:34 +1100 Subject: [PATCH] Proxy msg_id is not used in any meaningful way so remove it --- src/generator.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/generator.c b/src/generator.c index 9c23e5c3..e5e82962 100644 --- a/src/generator.c +++ b/src/generator.c @@ -98,7 +98,6 @@ struct proxy_instance { double diff; tv_t last_share; - int msg_id; /* Message id for sending stratum messages */ bool no_sessionid; /* Doesn't support session id resume on subscribe */ bool no_params; /* Doesn't want any parameters on subscribe */ @@ -660,19 +659,19 @@ retry: /* Attempt to reconnect if the pool supports resuming */ if (proxi->sessionid) { JSON_CPACK(req, "{s:i,s:s,s:[s,s]}", - "id", proxi->msg_id++, + "id", 0, "method", "mining.subscribe", "params", PACKAGE"/"VERSION, proxi->sessionid); /* Then attempt to connect with just the client description */ } else if (!proxi->no_params) { JSON_CPACK(req, "{s:i,s:s,s:[s]}", - "id", proxi->msg_id++, + "id", 0, "method", "mining.subscribe", "params", PACKAGE"/"VERSION); /* Then try without any parameters */ } else { JSON_CPACK(req, "{s:i,s:s,s:[]}", - "id", proxi->msg_id++, + "id", 0, "method", "mining.subscribe", "params"); } @@ -1042,7 +1041,7 @@ static bool auth_stratum(connsock_t *cs, proxy_instance_t *proxi) bool ret; JSON_CPACK(req, "{s:i,s:s,s:[s,s]}", - "id", proxi->msg_id++, + "id", 42, "method", "mining.authorize", "params", proxi->auth, proxi->pass); ret = send_json_msg(cs, req);