[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29683 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29683 - gnunet/src/namestore |
Date: |
Sun, 29 Sep 2013 17:14:47 +0200 |
Author: grothoff
Date: 2013-09-29 17:14:47 +0200 (Sun, 29 Sep 2013)
New Revision: 29683
Modified:
gnunet/src/namestore/gnunet-service-namestore.c
gnunet/src/namestore/namestore_api.c
Log:
-disconnect on protocol errors, not on no-result
Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c 2013-09-29 14:57:50 UTC
(rev 29682)
+++ gnunet/src/namestore/gnunet-service-namestore.c 2013-09-29 15:14:47 UTC
(rev 29683)
@@ -349,7 +349,7 @@
/**
* A #GNUNET_NAMESTORE_BlockCallback for name lookups in #handle_lookup_block
*
- * @param cls a 'struct LookupNameContext *' with information about the request
+ * @param cls a `struct LookupNameContext *` with information about the request
* @param block the block
*/
static void
Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c 2013-09-29 14:57:50 UTC (rev
29682)
+++ gnunet/src/namestore/namestore_api.c 2013-09-29 15:14:47 UTC (rev
29683)
@@ -452,13 +452,16 @@
switch (res)
{
case GNUNET_SYSERR:
- LOG (GNUNET_ERROR_TYPE_DEBUG, "An error occured during zone to name
operation\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "An error occured during zone to name operation\n");
break;
case GNUNET_NO:
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Namestore has no result for zone to name
mapping \n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Namestore has no result for zone to name mapping \n");
break;
case GNUNET_YES:
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Namestore has result for zone to name
mapping \n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Namestore has result for zone to name mapping \n");
name_len = ntohs (msg->name_len);
rd_count = ntohs (msg->rd_count);
rd_ser_len = ntohs (msg->rd_len);
@@ -472,6 +475,7 @@
rd_tmp = &name_tmp[name_len];
{
struct GNUNET_NAMESTORE_RecordData rd[rd_count];
+
if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize(rd_ser_len,
rd_tmp, rd_count, rd))
{
GNUNET_break (0);
@@ -493,7 +497,7 @@
/* error case, call continuation with error */
if (NULL != qe->proc)
qe->proc (qe->proc_cls, NULL, NULL, 0, NULL);
- return GNUNET_OK;
+ return GNUNET_NO;
}
@@ -594,7 +598,8 @@
GNUNET_break (0);
return GNUNET_SYSERR;
}
- if ((0 == name_len) && (0 == (memcmp (&msg->private_key, &priv_dummy, sizeof
(priv_dummy)))))
+ if ( (0 == name_len) &&
+ (0 == (memcmp (&msg->private_key, &priv_dummy, sizeof (priv_dummy)))) )
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Zone iteration is completed!\n");
@@ -706,12 +711,12 @@
if (NULL != qe)
{
ret = manage_record_operations (qe, msg, type, size);
- if (GNUNET_OK != ret)
+ if (GNUNET_SYSERR == ret)
{
/* protocol error, need to reconnect */
h->reconnect = GNUNET_YES;
}
- if (GNUNET_SYSERR != ret)
+ else
{
/* client was notified about success or failure, clean up 'qe' */
GNUNET_CONTAINER_DLL_remove (h->op_head,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29683 - gnunet/src/namestore,
gnunet <=