* @param qe the respective entry in the message queue
* @param msg the message we received
* @param size the message size
- * @return GNUNET_OK on success, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error and we did NOT notify the client
*/
static int
handle_block_cache_response (struct GNUNET_NAMESTORE_QueueEntry *qe,
/**
- * Handle an incoming message of type 'GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE'
+ * Handle an incoming message of type #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE
*
* @param qe the respective entry in the message queue
* @param msg the message we received
* @param size the message size
- * @return GNUNET_OK on success, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error and we did NOT notify the client
*/
static int
handle_record_store_response (struct GNUNET_NAMESTORE_QueueEntry *qe,
/**
- * Handle an incoming message of type 'GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT'
+ * Handle an incoming message of type #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT
*
* @param qe the respective entry in the message queue
* @param msg the message we received
* @param size the message size
- * @return GNUNET_OK on success, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error and we did NOT notify the client
*/
static int
handle_record_result (struct GNUNET_NAMESTORE_QueueEntry *qe,
/**
* We can now transmit a message to NAMESTORE. Do it.
*
- * @param cls the 'struct GNUNET_NAMESTORE_Handle'
+ * @param cls the `struct GNUNET_NAMESTORE_Handle`
* @param size number of bytes we can transmit
* @param buf where to copy the messages
* @return number of bytes copied into buf
{
const char *name = cls;
char rd_cmp_data[TEST_RECORD_DATALEN];
- if (GNUNET_NO == removed)
- {
- GNUNET_assert (1 == rd_count);
- GNUNET_assert (NULL != rd);
-
- memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN);
-
- GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type);
- GNUNET_assert (TEST_RECORD_DATALEN == rd[0].data_size);
- GNUNET_assert (0 == memcmp (&rd_cmp_data, rd[0].data, TEST_RECORD_DATALEN));
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Block was decrypted successfully, removing records \n");
-
- nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name,
- 0, NULL, &remove_cont, (void *) name);
- }
- else
- {
- if ((0 != rd_count) /*|| (NULL != rd)*/)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Record was not removed \n"));
- if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
- GNUNET_SCHEDULER_cancel (endbadly_task);
- endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
- return;
- }
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Record was removed \n"));
- GNUNET_SCHEDULER_add_now (&end, NULL);
- }
+
+ GNUNET_assert (GNUNET_NO == removed);
+ GNUNET_assert (1 == rd_count);
+ GNUNET_assert (NULL != rd);
+ memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN);
+
+ GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type);
+ GNUNET_assert (TEST_RECORD_DATALEN == rd[0].data_size);
+ GNUNET_assert (0 == memcmp (&rd_cmp_data, rd[0].data, TEST_RECORD_DATALEN));
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Block was decrypted successfully, removing records \n");
+
+ nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name,
+ 0, NULL, &remove_cont, (void *) name);
}
const char *name = cls;
nsqe = NULL;
+ if (removed && (NULL == block))
+ {
+ if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
+ {
+ GNUNET_SCHEDULER_cancel (endbadly_task);
+ endbadly_task = GNUNET_SCHEDULER_NO_TASK;
+ }
+ GNUNET_SCHEDULER_add_now (&end, NULL);
+ return;
+ }
GNUNET_assert (NULL != cls);
if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
{
endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Namestore returned block, decrypting \n");
GNUNET_assert (GNUNET_OK ==
GNUNET_NAMESTORE_block_decrypt (block,