From 3c3621cc439b34bb7b8153efa4859bfd07be3edf Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 25 Jan 2015 00:23:38 +1100 Subject: [PATCH] Use delete_init on the DL lists used in stratifier for thoroughness --- src/stratifier.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 38a3fb78..bc20a054 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -881,7 +881,7 @@ static void __add_dead(sdata_t *sdata, stratum_instance_t *client) static void __del_dead(sdata_t *sdata, stratum_instance_t *client) { LOGDEBUG("Deleting dead instance %ld", client->id); - DL_DELETE(sdata->dead_instances, client); + DL_DELETE_INIT(sdata->dead_instances, client); sdata->stats.dead--; } @@ -1122,7 +1122,7 @@ static void __drop_client(sdata_t *sdata, stratum_instance_t *client, user_insta HASH_DEL(sdata->stratum_instances, client); if (instance) - DL_DELETE(instance->instances, client); + DL_DELETE_INIT(instance->instances, client); HASH_FIND(hh, sdata->disconnected_instances, &client->enonce1_64, sizeof(uint64_t), old_client); /* Only keep around one copy of the old client in server mode */ if (!client->ckp->proxy && !old_client && client->enonce1_64 && client->authorised) { @@ -1431,7 +1431,7 @@ static void block_solve(ckpool_t *ckp, const char *blockhash) if (!strcmp(solvehash, blockhash)) { dealloc(solvehash); found = block; - DL_DELETE(sdata->block_solves, block); + DL_DELETE_INIT(sdata->block_solves, block); break; } dealloc(solvehash); @@ -1478,7 +1478,7 @@ static void block_reject(sdata_t *sdata, const char *blockhash) if (!strcmp(solvehash, blockhash)) { dealloc(solvehash); found = block; - DL_DELETE(sdata->block_solves, block); + DL_DELETE_INIT(sdata->block_solves, block); break; } dealloc(solvehash);