gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9378 - in GNUnet/src: applications/fragmentation applicati


From: gnunet
Subject: [GNUnet-SVN] r9378 - in GNUnet/src: applications/fragmentation applications/fs/ecrs applications/fs/tools applications/transport include server util/containers util/loggers
Date: Sun, 1 Nov 2009 13:21:22 -0700

Author: grothoff
Date: 2009-11-01 13:21:22 -0700 (Sun, 01 Nov 2009)
New Revision: 9378

Modified:
   GNUnet/src/applications/fragmentation/fragmentation.c
   GNUnet/src/applications/fs/ecrs/search.c
   GNUnet/src/applications/fs/tools/gnunet-search.c
   GNUnet/src/applications/transport/Makefile.am
   GNUnet/src/include/gnunet_remote_lib.h
   GNUnet/src/server/connection.c
   GNUnet/src/util/containers/heap.c
   GNUnet/src/util/loggers/file.c
Log:
more bug and style fixes

Modified: GNUnet/src/applications/fragmentation/fragmentation.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentation.c       2009-11-01 
20:02:34 UTC (rev 9377)
+++ GNUnet/src/applications/fragmentation/fragmentation.c       2009-11-01 
20:21:22 UTC (rev 9378)
@@ -534,7 +534,7 @@
           unsigned int len, GNUNET_BuildMessageCallback bmc, void *bmcClosure)
 {
   FragmentBMC *fbmc;
-  int xlen;
+  unsigned int xlen;
 
   GNUNET_GE_ASSERT (NULL, len > mtu);
   GNUNET_GE_ASSERT (NULL, mtu > sizeof (P2P_fragmentation_MESSAGE));

Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c    2009-11-01 20:02:34 UTC (rev 
9377)
+++ GNUnet/src/applications/fs/ecrs/search.c    2009-11-01 20:21:22 UTC (rev 
9378)
@@ -68,11 +68,6 @@
   GNUNET_CronTime start;
 
   /**
-   * What is the global timeout?
-   */
-  GNUNET_CronTime timeout;
-
-  /**
    * Search context
    */
   struct GNUNET_FS_SearchContext *sctx;

Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c    2009-11-01 20:02:34 UTC 
(rev 9377)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c    2009-11-01 20:21:22 UTC 
(rev 9378)
@@ -73,8 +73,7 @@
   char *filename;
 
 #if DEBUG
-  GNUNET_EncName *enc;
-  enc = GNUNET_malloc (sizeof (GNUNET_EncName));
+  GNUNET_EncName enc;
 #endif
   switch (event->type)
     {
@@ -94,10 +93,13 @@
 #if DEBUG
       if (GNUNET_ECRS_uri_test_loc (event->data.SearchResult.fi.uri))
         {
-          GNUNET_ECRS_locURI_extract_peer (event->data.SearchResult.fi.uri,
-                                           &enc);
-          fprintf (stdout, "Received locURI putting data at peer %s\n",
-                   (char *) enc);
+         GNUNET_PeerIdentity id;
+          GNUNET_ECRS_uri_get_peer_identity_from_loc 
(event->data.SearchResult.fi.uri,
+                                                     &id);
+         GNUNET_hash_to_enc (&id.hashPubKey, &enc);
+          fprintf (stdout,
+                  "Received locURI putting data at peer %s\n",
+                   (const char*) &enc);
         }
 #endif
       printf ("%s:\n", uri);

Modified: GNUnet/src/applications/transport/Makefile.am
===================================================================
--- GNUnet/src/applications/transport/Makefile.am       2009-11-01 20:02:34 UTC 
(rev 9377)
+++ GNUnet/src/applications/transport/Makefile.am       2009-11-01 20:21:22 UTC 
(rev 9378)
@@ -9,6 +9,8 @@
   libgnunetmodule_transport.la 
 
 
+EXTRA_DIST = check.c
+
 libgnunetmodule_transport_la_SOURCES = \
   transport.c 
 libgnunetmodule_transport_la_LDFLAGS = \

Modified: GNUnet/src/include/gnunet_remote_lib.h
===================================================================
--- GNUnet/src/include/gnunet_remote_lib.h      2009-11-01 20:02:34 UTC (rev 
9377)
+++ GNUnet/src/include/gnunet_remote_lib.h      2009-11-01 20:21:22 UTC (rev 
9378)
@@ -58,6 +58,7 @@
   struct GNUNET_GC_Configuration *config;
   GNUNET_PeerIdentity *peer;
   unsigned short port;
+  char *path;
   char *pid;
   char *hostname;
   char *username;

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2009-11-01 20:02:34 UTC (rev 9377)
+++ GNUnet/src/server/connection.c      2009-11-01 20:21:22 UTC (rev 9378)
@@ -957,7 +957,7 @@
 {
   unsigned int i;
   int j;
-  int max;
+  unsigned int max;
   long long *v;
   int *efflen;
   SendEntry **entries;
@@ -1126,7 +1126,7 @@
 checkSendFrequency (BufferEntry * be)
 {
   GNUNET_CronTime msf;
-  int load;
+  unsigned int load;
   unsigned int i;
 
   for (i = 0; i < be->sendBufferSize; i++)
@@ -1152,7 +1152,7 @@
   if (msf > 2 * MIN_SAMPLE_TIME / MINIMUM_SAMPLE_COUNT)
     msf = 2 * MIN_SAMPLE_TIME / MINIMUM_SAMPLE_COUNT;
   load = GNUNET_cpu_get_load (ectx, cfg);
-  if (load == -1)
+  if (load == (unsigned int) -1)
     load = 50;
   /* adjust frequency based on send buffer size */
   i = be->sendBufferSize;

Modified: GNUnet/src/util/containers/heap.c
===================================================================
--- GNUnet/src/util/containers/heap.c   2009-11-01 20:02:34 UTC (rev 9377)
+++ GNUnet/src/util/containers/heap.c   2009-11-01 20:21:22 UTC (rev 9378)
@@ -29,18 +29,7 @@
 #include "gnunet_util.h"
 #include "gnunet_util_containers.h"
 
-/*
- * Struct that is stored in hashmap, pointers to
- * locations in min_heap and max_heap.
- */
-struct GNUNET_CONTAINER_heap_info
-{
-  struct GNUNET_CONTAINER_heap_node *min_loc;
 
-  struct GNUNET_CONTAINER_heap_node *max_loc;
-
-};
-
 /*
  * Generic heap node structure, contains pointer to parent
  * left child, right child, and actual neighbor.
@@ -211,7 +200,7 @@
 getPos (struct GNUNET_CONTAINER_Heap *root, unsigned int pos)
 {
   struct GNUNET_CONTAINER_heap_node *ret;
-  int i;
+  unsigned int i;
 
   ret = NULL;
   if (pos > root->size)

Modified: GNUnet/src/util/loggers/file.c
===================================================================
--- GNUnet/src/util/loggers/file.c      2009-11-01 20:02:34 UTC (rev 9377)
+++ GNUnet/src/util/loggers/file.c      2009-11-01 20:21:22 UTC (rev 9378)
@@ -76,11 +76,6 @@
   int logrotate;
 
   /**
-   * Last day of year we logged anything.
-   */
-  int yday;
-
-  /**
    * Is this the first time we log anything for this
    * process?  Used with log rotation to delete old logs.
    */





reply via email to

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