[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28754 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28754 - gnunet/src/gns |
Date: |
Wed, 21 Aug 2013 17:19:21 +0200 |
Author: grothoff
Date: 2013-08-21 17:19:21 +0200 (Wed, 21 Aug 2013)
New Revision: 28754
Modified:
gnunet/src/gns/gnunet-dns2gns.c
gnunet/src/gns/gnunet-service-gns_interceptor.c
Log:
document places where SHADOW records likely need to be handled
Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c 2013-08-21 15:18:42 UTC (rev 28753)
+++ gnunet/src/gns/gnunet-dns2gns.c 2013-08-21 15:19:21 UTC (rev 28754)
@@ -261,11 +261,10 @@
/**
- * Iterator called on obtained result for a GNS
- * lookup
+ * Iterator called on obtained result for a GNS lookup.
*
* @param cls closure
- * @param rd_count number of records
+ * @param rd_count number of records in @a rd
* @param rd the records in reply
*/
static void
@@ -291,6 +290,8 @@
//packet->flags.opcode = GNUNET_TUN_DNS_OPCODE_STATUS; // ???
for (i=0;i<rd_count;i++)
{
+ // FIXME: do we need to hanlde #GNUNET_NAMESTORE_RF_SHADOW_RECORD
+ // here? Or should we do this in libgnunetgns?
rec.expiration_time.abs_value_us = rd[i].expiration_time;
switch (rd[i].record_type)
{
@@ -299,7 +300,7 @@
rec.name = GNUNET_strdup (packet->queries[0].name);
rec.class = GNUNET_TUN_DNS_CLASS_INTERNET;
rec.type = GNUNET_DNSPARSER_TYPE_A;
- rec.data.raw.data = GNUNET_malloc (sizeof (struct in_addr));
+ rec.data.raw.data = GNUNET_new (struct in_addr);
memcpy (rec.data.raw.data,
rd[i].data,
rd[i].data_size);
@@ -348,9 +349,9 @@
*
* @param lsock socket to use for sending the reply
* @param addr address to use for sending the reply
- * @param addr_len number of bytes in addr
+ * @param addr_len number of bytes in @a addr
* @param udp_msg DNS request payload
- * @param udp_msg_size number of bytes in udp_msg
+ * @param udp_msg_size number of bytes in @a udp_msg
*/
static void
handle_request (struct GNUNET_NETWORK_Handle *lsock,
Modified: gnunet/src/gns/gnunet-service-gns_interceptor.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_interceptor.c 2013-08-21 15:18:42 UTC
(rev 28753)
+++ gnunet/src/gns/gnunet-service-gns_interceptor.c 2013-08-21 15:19:21 UTC
(rev 28754)
@@ -21,6 +21,10 @@
* @file gns/gnunet-service-gns_interceptor.c
* @brief GNUnet GNS interceptor logic
* @author Martin Schanzenbach
+ * @author Christian Grothoff
+ *
+ * TODO:
+ * - implement RF_SHADOW_RECORD logic
*/
#include "platform.h"
#include "gnunet_util_lib.h"
@@ -120,6 +124,9 @@
packet->answers = answer_records;
packet->additional_records = additional_records;
+ /* FIXME: need to handle #GNUNET_NAMESTORE_RF_SHADOW_RECORD option
+ (by ignoring records where this flag is set if there is any
+ other record of that type in the result set) */
for (i=0; i < rd_count; i++)
{
if (rd[i].record_type == query->type)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28754 - gnunet/src/gns,
gnunet <=