[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6610 - in GNUnet/src: applications/fs/gap util/crypto
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6610 - in GNUnet/src: applications/fs/gap util/crypto |
Date: |
Mon, 24 Mar 2008 01:38:24 -0600 (MDT) |
Author: grothoff
Date: 2008-03-24 01:38:22 -0600 (Mon, 24 Mar 2008)
New Revision: 6610
Modified:
GNUnet/src/applications/fs/gap/querymanager.c
GNUnet/src/util/crypto/hashing.c
Log:
fixes
Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c 2008-03-24 03:35:10 UTC
(rev 6609)
+++ GNUnet/src/applications/fs/gap/querymanager.c 2008-03-24 07:38:22 UTC
(rev 6610)
@@ -515,6 +515,7 @@
struct HMClosure hmc;
struct ClientDataList *client;
struct RequestList *request;
+ struct RequestList *prev;
GNUNET_CronTime now;
GNUNET_mutex_lock (GNUNET_FS_lock);
@@ -546,9 +547,16 @@
GNUNET_GE_ASSERT(NULL, client->request_tail->next == NULL);
client->requests = request->next;
client->request_tail->next = request;
+ prev = client->request_tail;
client->request_tail = request;
request->next = NULL;
}
+ else
+ {
+ prev = NULL;
+ }
+ GNUNET_GE_ASSERT(NULL, request->next == NULL);
+ GNUNET_GE_ASSERT(NULL, client->request_tail->next == NULL);
if ( (client->client != NULL) &&
(GNUNET_OK !=
coreAPI->cs_test_send_to_client_now(client->client,
@@ -573,11 +581,28 @@
GNUNET_ECRS_BLOCKTYPE_ONDEMAND,
&have_more_processor, &hmc))) &&
(hmc.have_more == GNUNET_NO) )
- request->have_more = 0;
+ {
+ if (prev == NULL)
+ {
+ client->request_tail = NULL;
+ client->requests = NULL;
+ }
+ else
+ {
+ prev->next = NULL;
+ if (client->request_tail == request)
+ client->request_tail = prev;
+ }
+ GNUNET_FS_SHARED_free_request_list(request);
+ if (stats != NULL)
+ stats->change (stat_gap_client_query_tracked, -1);
+ }
}
else
- datastore->get (&request->queries[0], request->type,
- &have_more_processor, &hmc);
+ {
+ datastore->get (&request->queries[0], request->type,
+ &have_more_processor, &hmc);
+ }
if (hmc.have_more)
request->have_more += HAVE_MORE_INCREMENT;
}
Modified: GNUnet/src/util/crypto/hashing.c
===================================================================
--- GNUnet/src/util/crypto/hashing.c 2008-03-24 03:35:10 UTC (rev 6609)
+++ GNUnet/src/util/crypto/hashing.c 2008-03-24 07:38:22 UTC (rev 6610)
@@ -31,7 +31,7 @@
*/
#include "platform.h"
-#include "gnunet_util_crypto.h"
+#include "gnunet_util.h"
#define SHA512_DIGEST_SIZE 64
#define SHA512_HMAC_BLOCK_SIZE 128
@@ -424,6 +424,11 @@
GNUNET_free (buf);
return GNUNET_SYSERR;
}
+ if (GNUNET_YES == GNUNET_shutdown_test())
+ {
+ GNUNET_free (buf);
+ return GNUNET_SYSERR;
+ }
sha512_update (&ctx, buf, delta);
if (pos + delta > pos)
pos += delta;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6610 - in GNUnet/src: applications/fs/gap util/crypto,
gnunet <=