gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7799 - in GNUnet/src: applications/advertising include uti


From: gnunet
Subject: [GNUnet-SVN] r7799 - in GNUnet/src: applications/advertising include util/containers
Date: Sat, 18 Oct 2008 23:10:13 -0600 (MDT)

Author: grothoff
Date: 2008-10-18 23:10:13 -0600 (Sat, 18 Oct 2008)
New Revision: 7799

Modified:
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/include/gnunet_util_containers.h
   GNUnet/src/util/containers/multihashmap.c
Log:
fiox

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2008-10-17 19:59:34 UTC 
(rev 7798)
+++ GNUnet/src/applications/advertising/advertising.c   2008-10-19 05:10:13 UTC 
(rev 7799)
@@ -203,7 +203,6 @@
                      GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
                      _
                      ("HELLO message has expiration too far in the future. 
Dropping.\n"));
-      GNUNET_GE_BREAK_OP (ectx, 0);
       return GNUNET_SYSERR;
     }
   if (GNUNET_SYSERR == transport->hello_verify (msg))

Modified: GNUnet/src/include/gnunet_util_containers.h
===================================================================
--- GNUnet/src/include/gnunet_util_containers.h 2008-10-17 19:59:34 UTC (rev 
7798)
+++ GNUnet/src/include/gnunet_util_containers.h 2008-10-19 05:10:13 UTC (rev 
7799)
@@ -363,7 +363,7 @@
 int GNUNET_multi_hash_map_put(struct GNUNET_MultiHashMap* map,
                              const GNUNET_HashCode * key,
                              void * value,
-                             enum GNUNET_MultiHashMapOptions opt);
+                             enum GNUNET_MultiHashMapOption opt);
 
 
 

Modified: GNUnet/src/util/containers/multihashmap.c
===================================================================
--- GNUnet/src/util/containers/multihashmap.c   2008-10-17 19:59:34 UTC (rev 
7798)
+++ GNUnet/src/util/containers/multihashmap.c   2008-10-19 05:10:13 UTC (rev 
7799)
@@ -89,7 +89,7 @@
   e = map->map[idx_of(map, key)];
   while (e != NULL)
     {
-      if (0 == memcmp(key, e->key, sizeof(GNUNET_HashCode)))
+      if (0 == memcmp(key, &e->key, sizeof(GNUNET_HashCode)))
        return e->value;
       e = e->next;
     }
@@ -109,7 +109,7 @@
   e = map->map[i];
   while (e != NULL)
     {
-      if ( (0 == memcmp(key, e->key, sizeof(GNUNET_HashCode))) &&
+      if ( (0 == memcmp(key, &e->key, sizeof(GNUNET_HashCode))) &&
           (value == e->value) )
        {
          if (p == NULL)
@@ -140,7 +140,7 @@
   e = map->map[i];
   while (e != NULL)
     {
-      if (0 == memcmp(key, e->key, sizeof(GNUNET_HashCode)))
+      if (0 == memcmp(key, &e->key, sizeof(GNUNET_HashCode)))
        {
          if (p == NULL)
            map->map[i] = e->next;
@@ -173,8 +173,7 @@
   e = map->map[i];
   while (e != NULL)
     {
-      if ( (0 == memcmp(key, e->key, sizeof(GNUNET_HashCode))) &&
-          (value == e->value) )
+      if (0 == memcmp(key, &e->key, sizeof(GNUNET_HashCode)))
        return GNUNET_YES;
       e = e->next;
     }
@@ -199,8 +198,8 @@
       while (NULL != (e = old[i]))
        {         
          old[i] = e->next;
-         e->next = map->map[idx_of(e->key)];
-         map->map[idx_of(e->key)] = e;
+         e->next = map->map[idx_of(map, &e->key)];
+         map->map[idx_of(map, &e->key)] = e;
        }
     }
   GNUNET_free(old);
@@ -209,7 +208,7 @@
 int GNUNET_multi_hash_map_put(struct GNUNET_MultiHashMap* map,
                              const GNUNET_HashCode * key,
                              void * value,
-                             enum GNUNET_MultiHashMapOptions opt) 
+                             enum GNUNET_MultiHashMapOption opt) 
 {
   struct MapEntry* e;
   unsigned int i;
@@ -220,10 +219,10 @@
       e = map->map[i];
       while (e != NULL)
        {
-         if ( (0 == memcmp(key, e->key, sizeof(GNUNET_HashCode))) &&
+         if ( (0 == memcmp(key, &e->key, sizeof(GNUNET_HashCode))) &&
               (value == e->value) )
            {
-             if (opt == GNUNET_MultiHashMapOption_UNIQUE)
+             if (opt == GNUNET_MultiHashMapOption_UNIQUE_ONLY)
                return GNUNET_SYSERR;
              e->value = value;
              return GNUNET_NO;





reply via email to

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