ntohl(dm->size),
GNUNET_h2s(&dm->key));
#endif
+ if (GNUNET_YES == qe->one_shot)
+ free_queue_entry (qe);
h->retry_time.rel_value = 0;
rc.iter (rc.iter_cls,
&dm->key,
ntohl(dm->anonymity),
GNUNET_TIME_absolute_ntoh(dm->expiration),
GNUNET_ntohll(dm->uid));
- if (GNUNET_YES == qe->one_shot)
- free_queue_entry (qe);
}
tcc->tc (tcc->tc_cls, GNUNET_OK);
if (GNUNET_YES == tcc->end)
{
+#if DEBUG_DATASTORE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Done processing client request\n");
+#endif
GNUNET_SERVER_receive_done (tcc->client, GNUNET_OK);
}
else
gettext_noop ("# results found"),
1,
GNUNET_NO);
- transmit (client, &dm->header, &get_next, next_cls, GNUNET_NO);
+ transmit (client, &dm->header, &get_next, next_cls,
+ (next_cls != NULL) ? GNUNET_NO : GNUNET_YES);
return GNUNET_OK;
}
if (i > 255)
memset (data, i - 255, size / 2);
data[0] = k;
- GNUNET_DATASTORE_put (datastore,
- 0,
- &key,
- size,
- data,
- i+1,
- GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100),
- i, 0,
- GNUNET_TIME_relative_to_absolute
- (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
- GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))),
- 1, 1, TIMEOUT,
- &check_success,
- crc);
+ GNUNET_assert (NULL !=
+ GNUNET_DATASTORE_put (datastore,
+ 0,
+ &key,
+ size,
+ data,
+ i+1,
+ GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100),
+ i, 0,
+ GNUNET_TIME_relative_to_absolute
+ (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+ GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))),
+ 1, 1, TIMEOUT,
+ &check_success,
+ crc));
break;
case RP_CUT:
/* trim down below MAX_SIZE again */
- GNUNET_DATASTORE_get_for_replication (datastore,
- 1, 1, TIMEOUT,
- &delete_value,
- crc);
+ GNUNET_assert (NULL !=
+ GNUNET_DATASTORE_get_for_replication (datastore,
+ 1, 1, TIMEOUT,
+ &delete_value,
+ crc));
break;
case RP_REPORT:
printf (