Browse Source

Merge commit 'c851f39' into cg_merges_20130304a

Luke Dashjr 13 years ago
parent
commit
e636bc12d2
2 changed files with 6 additions and 0 deletions
  1. 1 0
      miner.h
  2. 5 0
      util.c

+ 1 - 0
miner.h

@@ -1034,6 +1034,7 @@ struct pool {
 	size_t n1_len;
 	size_t n1_len;
 	uint32_t nonce2;
 	uint32_t nonce2;
 	int n2size;
 	int n2size;
+	char *sessionid;
 	bool has_stratum;
 	bool has_stratum;
 	bool stratum_active;
 	bool stratum_active;
 	time_t last_work_time;  /* only set for Stratum right now */
 	time_t last_work_time;  /* only set for Stratum right now */

+ 5 - 0
util.c

@@ -1682,6 +1682,11 @@ bool initiate_stratum(struct pool *pool)
 		applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
 		applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
 		goto out;
 		goto out;
 	}
 	}
+	pool->sessionid = json_array_string(res_val, 3);
+	if (pool->sessionid)
+		applog(LOG_DEBUG, "Pool %d stratum session id: %s", pool->pool_no, pool->sessionid);
+	else
+		applog(LOG_DEBUG, "Pool %d stratum session id does not exist");
 
 
 	ret = true;
 	ret = true;
 out:
 out: