gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4948 - GNUnet/src/applications/advertising


From: gnunet
Subject: [GNUnet-SVN] r4948 - GNUnet/src/applications/advertising
Date: Fri, 8 Jun 2007 01:16:40 -0600 (MDT)

Author: grothoff
Date: 2007-06-08 01:16:39 -0600 (Fri, 08 Jun 2007)
New Revision: 4948

Modified:
   GNUnet/src/applications/advertising/Makefile.am
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/applications/advertising/advertising_test.c
   GNUnet/src/applications/advertising/bootstrap.c
Log:
increase limit

Modified: GNUnet/src/applications/advertising/Makefile.am
===================================================================
--- GNUnet/src/applications/advertising/Makefile.am     2007-06-08 07:12:02 UTC 
(rev 4947)
+++ GNUnet/src/applications/advertising/Makefile.am     2007-06-08 07:16:39 UTC 
(rev 4948)
@@ -17,7 +17,8 @@
   -export-dynamic -avoid-version -module
 
 check_PROGRAMS = \
-  advertising_test
+  advertising_test \
+  advertising_test_udp 
 
 TESTS = $(check_PROGRAMS)
 
@@ -30,7 +31,16 @@
   $(top_builddir)/src/util/config_impl/libgnunetutil_config.la \
   $(top_builddir)/src/util/libgnunetutil.la 
 
+advertising_test_udp_SOURCES = \
+  advertising_test.c 
+advertising_test_udp_LDADD = \
+  $(top_builddir)/src/applications/stats/libgnunetstats_api.la \
+  $(top_builddir)/src/util/network_client/libgnunetutil_network_client.la \
+  $(top_builddir)/src/applications/testing/libgnunettesting_api.la \
+  $(top_builddir)/src/util/config_impl/libgnunetutil_config.la \
+  $(top_builddir)/src/util/libgnunetutil.la 
 
 
+
 EXTRA_DIST = \
   check.conf 

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2007-06-08 07:12:02 UTC 
(rev 4947)
+++ GNUnet/src/applications/advertising/advertising.c   2007-06-08 07:16:39 UTC 
(rev 4948)
@@ -149,7 +149,7 @@
   TSession * tsession;
   P2P_hello_MESSAGE * copy;
   PeerIdentity foreignId;
-  P2P_hello_MESSAGE * msg;
+  const P2P_hello_MESSAGE * msg;
   MESSAGE_HEADER * ping;
   char * buffer;
   int helloEnd;
@@ -158,7 +158,7 @@
   cron_t now;
 
   /* first verify that it is actually a valid hello */
-  msg = (P2P_hello_MESSAGE* ) message;
+  msg = (const P2P_hello_MESSAGE* ) message;
   if ( (ntohs(msg->header.size) < sizeof(P2P_hello_MESSAGE)) ||
        (ntohs(msg->header.size) != P2P_hello_MESSAGE_size(msg)) ) {
     GE_BREAK(ectx, 0);
@@ -291,8 +291,8 @@
        ( (now - lasthelloMsg) / cronSECONDS) *
        (os_network_monitor_get_limit(coreAPI->load_monitor,
                                     Download))
-       < P2P_hello_MESSAGE_size(msg) * 100 ) {
-    /* do not use more than about 1% of the
+       < P2P_hello_MESSAGE_size(msg) * 10 ) {
+    /* do not use more than about 10% of the
        available bandwidth to VERIFY hellos (by sending
        our own with a PING).  This does not affect
        the hello advertising.  Sure, we should not

Modified: GNUnet/src/applications/advertising/advertising_test.c
===================================================================
--- GNUnet/src/applications/advertising/advertising_test.c      2007-06-08 
07:12:02 UTC (rev 4947)
+++ GNUnet/src/applications/advertising/advertising_test.c      2007-06-08 
07:16:39 UTC (rev 4948)
@@ -79,7 +79,7 @@
     GC_free(cfg);
     return -1;
   }
-  peers = gnunet_testing_start_daemons("tcp",
+  peers = gnunet_testing_start_daemons(NULL == strstr(argv[0], "_udp") ? "tcp" 
: "udp",
                                       "advertising stats",
                                       "/tmp/gnunet-advertising-test",
                                       2087,

Modified: GNUnet/src/applications/advertising/bootstrap.c
===================================================================
--- GNUnet/src/applications/advertising/bootstrap.c     2007-06-08 07:12:02 UTC 
(rev 4947)
+++ GNUnet/src/applications/advertising/bootstrap.c     2007-06-08 07:16:39 UTC 
(rev 4948)
@@ -178,10 +178,9 @@
        Sure, in the end it goes to the topology, so
        probably that API should be extended here... */
     return YES;
-  } else {
-    /* wait a bit longer */
-    return NO;
   }
+  /* wait a bit longer */
+  return NO;  
 }
 
 static void * processThread(void * unused) {





reply via email to

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