int contains_sig = GNUNET_NO;
int rd_count = 0;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "LOOKUP_NAME_RESPONSE");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "LOOKUP_NAME_RESPONSE");
/* Operation done, remove */
GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
rd_len = ntohs (msg->rd_len);
if (msg_len != exp_msg_len)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message size describes with `%u' bytes but calculated size is %u bytes \n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Message size describes with `%u' bytes but calculated size is %u bytes \n",
msg_len, exp_msg_len);
GNUNET_break_op (0);
return;
struct RecordPutResponseMessage* msg,
size_t size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "RECORD_PUT_RESPONSE");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "RECORD_PUT_RESPONSE");
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
/* Operation done, remove */
struct RecordCreateResponseMessage* msg,
size_t size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "RECORD_CREATE_RESPONSE");
-
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "RECORD_CREATE_RESPONSE");
/* Operation done, remove */
GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
struct RecordRemoveResponseMessage* msg,
size_t size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "RECORD_REMOVE_RESPONSE");
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
+
/* Operation done, remove */
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "RECORD_REMOVE_RESPONSE");
GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
int res = ntohl (msg->op_result);
struct ZoneToNameResponseMessage* msg,
size_t size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "ZONE_TO_NAME_RESPONSE");
-
struct GNUNET_NAMESTORE_Handle *h = qe->nsh;
- /* Operation done, remove */
- GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
-
int res = ntohs (msg->res);
-
struct GNUNET_TIME_Absolute expire;
size_t name_len;
size_t rd_ser_len;
char * name_tmp;
char * rd_tmp;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "ZONE_TO_NAME_RESPONSE");
+ /* Operation done, remove */
+ GNUNET_CONTAINER_DLL_remove(h->op_head, h->op_tail, qe);
if (res == GNUNET_SYSERR)
{
- GNUNET_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");
if (qe->proc != NULL)
qe->proc (qe->proc_cls, NULL, GNUNET_TIME_UNIT_ZERO_ABS, NULL, 0, NULL, NULL);
}
else if (res == GNUNET_NO)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore has no result for zone to name mapping \n");
- if (qe->proc != NULL)
- qe->proc (qe->proc_cls, NULL, GNUNET_TIME_UNIT_ZERO_ABS, NULL, 0, NULL, NULL);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Namestore has no result for zone to name mapping \n");
+ if (qe->proc != NULL)
+ qe->proc (qe->proc_cls, NULL, GNUNET_TIME_UNIT_ZERO_ABS, NULL, 0, NULL, NULL);
}
else if (res == GNUNET_YES)
{
- GNUNET_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);
struct ZoneIterationResponseMessage *msg,
size_t size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
- "ZONE_ITERATION_RESPONSE");
-
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubdummy;
size_t msg_len = 0;
size_t exp_msg_len = 0;
size_t name_len = 0;
size_t rd_len = 0;
unsigned rd_count = 0;
-
char *name_tmp;
char *rd_ser_tmp;
struct GNUNET_TIME_Absolute expire;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' \n",
+ "ZONE_ITERATION_RESPONSE");
msg_len = ntohs (msg->gns_header.header.size);
rd_len = ntohs (msg->rd_len);
rd_count = ntohs (msg->rd_count);
exp_msg_len = sizeof (struct ZoneIterationResponseMessage) + name_len + rd_len;
if (msg_len != exp_msg_len)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message size describes with `%u' bytes but calculated size is %u bytes \n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Message size describes with `%u' bytes but calculated size is %u bytes \n",
msg_len, exp_msg_len);
GNUNET_break_op (0);
return;
memset (&pubdummy, '\0', sizeof (pubdummy));
if ((0 == name_len) && (0 == (memcmp (&msg->public_key, &pubdummy, sizeof (pubdummy)))))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Zone iteration is completed!\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Zone iteration is completed!\n");
GNUNET_CONTAINER_DLL_remove(ze->h->z_head, ze->h->z_tail, ze);
gm = (struct GNUNET_NAMESTORE_Header *) msg;
r_id = ntohl (gm->r_id);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received message type %i size %i op %u\n", type, size, r_id);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message type %i size %i op %u\n", type, size, r_id);
/* Find matching operation */
if (r_id > h->last_op_id_used)
struct GNUNET_NAMESTORE_ZoneIterator *z;
GNUNET_assert (h != NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
while (NULL != (p = h->pending_head))
{
GNUNET_CONTAINER_DLL_remove (h->pending_head, h->pending_tail, p);
void
GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from namestore service\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from namestore service\n");
GNUNET_SCHEDULER_add_now (&clean_up_task, h);
}
GNUNET_assert (NULL != name);
GNUNET_assert (NULL != rd);
GNUNET_assert (NULL != signature);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Storing %u records under name `%s'\n",
- rd_count,
- name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Storing %u records under name `%s'\n",
+ rd_count,
+ name);
name_len = strlen(name) + 1;
if (name_len > 256)
{
memcpy (name_tmp, name, name_len);
memcpy (rd_tmp, rd_ser, rd_ser_len);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for name `%s' with size %u\n", "NAMESTORE_RECORD_PUT", name, msg_size);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for name `%s' with size %u\n", "NAMESTORE_RECORD_PUT", name, msg_size);
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
do_transmit(h);
GNUNET_assert (NULL != pkey);
GNUNET_assert (NULL != name);
GNUNET_assert (NULL != rd);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Creating record of type %u under name `%s'\n",
- rd->record_type,
- name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Creating record of type %u under name `%s'\n",
+ rd->record_type,
+ name);
name_len = strlen(name) + 1;
if (name_len > 256)
{
memcpy (rd_tmp, rd_ser, rd_ser_len);
GNUNET_free (pkey_enc);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending `%s' message for name `%s' with size %u\n",
- "NAMESTORE_RECORD_CREATE", name, msg_size);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for name `%s' with size %u\n",
+ "NAMESTORE_RECORD_CREATE", name, msg_size);
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
do_transmit(h);
return qe;
GNUNET_assert (NULL != h);
if (NULL != rd)
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Removing record of type %u under name `%s'\n",
- rd->record_type,
- name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Removing record of type %u under name `%s'\n",
+ rd->record_type,
+ name);
else
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Removing all records under name `%s'\n",
- name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Removing all records under name `%s'\n",
+ name);
rid = get_op_id(h);
qe = GNUNET_malloc(sizeof (struct GNUNET_NAMESTORE_QueueEntry));
qe->nsh = h;
GNUNET_free (pkey_enc);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for name `%s' with size %u\n", "NAMESTORE_RECORD_REMOVE", name, msg_size);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for name `%s' with size %u\n",
+ "NAMESTORE_RECORD_REMOVE", name, msg_size);
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
do_transmit(h);
GNUNET_assert (NULL != h);
GNUNET_assert (NULL != zone);
GNUNET_assert (NULL != name);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Looking for record of type %u under name `%s'\n",
- record_type,
- name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Looking for record of type %u under name `%s'\n",
+ record_type,
+ name);
name_len = strlen (name) + 1;
if ((name_len == 0) || (name_len > 256))
msg->zone = *zone;
memcpy (&msg[1], name, name_len);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for name `%s'\n", "NAMESTORE_LOOKUP_NAME", name);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for name `%s'\n", "NAMESTORE_LOOKUP_NAME", name);
/* transmit message */
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
msg->value_zone = *value_zone;
char * z_tmp = GNUNET_strdup (GNUNET_short_h2s (zone));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for zone `%s' in zone `%s'\n",
- "NAMESTORE_ZONE_TO_NAME",
- z_tmp,
- GNUNET_short_h2s (value_zone));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for zone `%s' in zone `%s'\n",
+ "NAMESTORE_ZONE_TO_NAME",
+ z_tmp,
+ GNUNET_short_h2s (value_zone));
GNUNET_free (z_tmp);
/* transmit message */
msg->gns_header.r_id = htonl (rid);
if (NULL != zone)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for zone `%s'\n", "ZONE_ITERATION_START", GNUNET_short_h2s(zone));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for zone `%s'\n",
+ "ZONE_ITERATION_START", GNUNET_short_h2s(zone));
msg->zone = *zone;
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message for all zones\n", "ZONE_ITERATION_START");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending `%s' message for all zones\n", "ZONE_ITERATION_START");
memset (&msg->zone, '\0', sizeof (msg->zone));
}
msg->must_have_flags = ntohs (must_have_flags);
msg->gns_header.header.size = htons (msg_size);
msg->gns_header.r_id = htonl (it->op_id);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "ZONE_ITERATION_NEXT");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "ZONE_ITERATION_NEXT");
/* transmit message */
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);