diff --git a/pool/page.php b/pool/page.php index 7bb2607c..1f8d2a57 100644 --- a/pool/page.php +++ b/pool/page.php @@ -205,8 +205,8 @@ function ni(e,o){if(e){if(o==0){e.defd=e.style.display;e.style.display='none'}el function domin(o){var e=document.getElementById('minicb');if(e){if(o==0){e.checked=true}else{e.checked=false}};for(var i=0;i<10;i++){e=document.getElementById('mini'+i);ni(e,o)}} function mini(){var hm=gcn('mini');if(hm==''){domin(1)}else{domin(0)}} function md(e){var c='';if(e.checked){c='y'}scnv('mini',c);mini()} +function tim(){var e=document.getElementById('ftr');if(e){var now=new Date(),t=document.createTextNode(now.toLocaleString());e.appendChild(t)}} function jst(){var e=document.getElementById('jst');if(e){e.style.visibility='hidden'}} -window.onpaint=jst(); \n"; $head .= "\n"; @@ -589,7 +592,7 @@ function pgmenu($menus) # function pgbody($info, $page, $menu, $dotop, $user, $douser) { - $body = 'starttime); + json_set_int(val, "seqpid", ckp->startpid); + /* Set the atomically incrementing sequence numbers */ mutex_lock(&sdata->ckdb_msg_lock); - json_set_int(val, "seqall", sdata->ckdb_seq++); + seqall = sdata->ckdb_seq++; + json_set_int(val, "seqall", seqall); json_set_int(val, ckdb_seq_names[idtype], sdata->ckdb_seq_ids[idtype]++); mutex_unlock(&sdata->ckdb_msg_lock); json_msg = json_dumps(val, JSON_COMPACT); if (unlikely(!json_msg)) goto out; - ASPRINTF(&ret, "%s.id.json=%s", ckdb_ids[idtype], json_msg); + ASPRINTF(&ret, "%s.%"PRIu64".json=%s", ckdb_ids[idtype], seqall, json_msg); free(json_msg); out: json_decref(val); @@ -3815,7 +3819,7 @@ static int send_recv_auth(stratum_instance_t *client) LOGINFO("Got ckdb response: %s", buf); response = alloca(responselen); memset(response, 0, responselen); - if (unlikely(sscanf(buf, "id.%*d.%c%n", response, &offset) < 1)) { + if (unlikely(sscanf(buf, "%*d.%*d.%c%n", response, &offset) < 1)) { LOGWARNING("Got1 unparseable ckdb auth response: %s", buf); goto out_fail; } @@ -5248,7 +5252,7 @@ static void ckdbq_process(ckpool_t *ckp, char *msg) int offset = 0; memset(response, 0, responselen); - if (sscanf(buf, "id.%*d.%c%n", response, &offset) > 0) { + if (sscanf(buf, "%*d.%*d.%c%n", response, &offset) > 0) { strcpy(response+1, buf+offset); if (safecmp(response, "ok")) { char *cmd;