gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18981 - gnunet/src/dns


From: gnunet
Subject: [GNUnet-SVN] r18981 - gnunet/src/dns
Date: Wed, 4 Jan 2012 13:36:43 +0100

Author: grothoff
Date: 2012-01-04 13:36:43 +0100 (Wed, 04 Jan 2012)
New Revision: 18981

Modified:
   gnunet/src/dns/Makefile.am
   gnunet/src/dns/dnsparser.c
   gnunet/src/dns/gnunet-service-dns_new.c
Log:
-bugfixes

Modified: gnunet/src/dns/Makefile.am
===================================================================
--- gnunet/src/dns/Makefile.am  2012-01-04 12:22:14 UTC (rev 18980)
+++ gnunet/src/dns/Makefile.am  2012-01-04 12:36:43 UTC (rev 18981)
@@ -34,6 +34,9 @@
 bin_PROGRAMS = \
   gnunet-service-dns gnunet-service-dns-new $(HIJACKBIN)
 
+noinst_PROGRAMS = \
+  gnunet-dns-monitor
+
 plugin_LTLIBRARIES = \
   libgnunet_plugin_block_dns.la 
 
@@ -55,6 +58,14 @@
   $(top_builddir)/src/dns/libgnunetdnsparser.la \
   $(GN_LIBINTL)
 
+gnunet_dns_monitor_SOURCES = \
+ gnunet-dns-monitor.c
+gnunet_dns_monitor_LDADD = \
+  $(top_builddir)/src/dns/libgnunetdnsparser.la \
+  $(top_builddir)/src/dns/libgnunetdnsnew.la \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GN_LIBINTL)
+
 gnunet_service_dns_new_SOURCES = \
  gnunet-service-dns_new.c 
 gnunet_service_dns_new_LDADD = \

Modified: gnunet/src/dns/dnsparser.c
===================================================================
--- gnunet/src/dns/dnsparser.c  2012-01-04 12:22:14 UTC (rev 18980)
+++ gnunet/src/dns/dnsparser.c  2012-01-04 12:36:43 UTC (rev 18981)
@@ -82,7 +82,7 @@
   ret = GNUNET_strdup ("");
   while (1)
   {
-    if (*off == udp_payload_length)
+    if (*off >= udp_payload_length)
       goto error;
     len = input[*off];
     if (0 == len)
@@ -98,7 +98,7 @@
                       &udp_payload[*off + 1]);
       GNUNET_free (ret);
       ret = tmp;
-      off += 1 + len;
+      *off += 1 + len;
     }
     else if ((64 | 128) == (len & (64 | 128)) )
     {
@@ -116,7 +116,7 @@
       GNUNET_free (ret);
       GNUNET_free (xstr);
       ret = tmp;
-      off += 2;
+      *off += 2;
       /* pointers always terminate names */
       break;
     } 

Modified: gnunet/src/dns/gnunet-service-dns_new.c
===================================================================
--- gnunet/src/dns/gnunet-service-dns_new.c     2012-01-04 12:22:14 UTC (rev 
18980)
+++ gnunet/src/dns/gnunet-service-dns_new.c     2012-01-04 12:36:43 UTC (rev 
18981)
@@ -1049,10 +1049,11 @@
                           rr->client_wait_list_length,
                           0);
       }
-      next_phase (rr); 
-      GNUNET_SERVER_receive_done (client, GNUNET_OK);
-      return;
-    }  
+      break;
+    }
+    next_phase (rr); 
+    GNUNET_SERVER_receive_done (client, GNUNET_OK);
+    return;      
   }
   /* odd, client was not on our list for the request, that ought
      to be an error */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]