-use const in peerstore callback
authorChristian Grothoff <christian@grothoff.org>
Thu, 18 Dec 2014 16:22:14 +0000 (16:22 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 18 Dec 2014 16:22:14 +0000 (16:22 +0000)
16 files changed:
src/ats/ats.conf.in
src/cadet/test_cadet.c
src/fs/gnunet-service-fs_cp.c
src/hostlist/gnunet-daemon-hostlist_client.c
src/include/gnunet_peerstore_service.h
src/peerstore/gnunet-service-peerstore.c
src/peerstore/peerstore.h
src/peerstore/peerstore_api.c
src/peerstore/perf_peerstore_store.c
src/peerstore/test_peerstore_api_iterate.c
src/peerstore/test_peerstore_api_store.c
src/peerstore/test_peerstore_api_sync.c
src/sensor/gnunet-sensor-profiler.c
src/sensor/gnunet-service-sensor_analysis.c
src/sensor/gnunet-service-sensor_reporting.c
src/transport/plugin_transport_http_common.c

index f8e323037f34fd41a33549b1b330aaa6a2d1299a..8765de4348f8eb0e2b7615d85663a207c8a9162a 100644 (file)
@@ -35,7 +35,7 @@ BLUETOOTH_QUOTA_OUT = 128 KiB
 # Proportional specific settings
 # How proportional to preferences is bandwidth distribution in a network
 # 1.0: Fair with respect to addresses without preferences
-# > 1.0: The bigger, the more respect is payed to preferences 
+# > 1.0: The bigger, the more respect is payed to preferences
 PROP_PROPORTIONALITY_FACTOR = 2.00
 # Should we stick to existing connections are prefer to switch?
 # [1.0...2.0], lower value prefers to switch, bigger value is more tolerant
@@ -47,7 +47,7 @@ PROP_STABILITY_FACTOR = 1.25
 # Maximum duration for a solution process (both LP and MILP)
 # MLP_MAX_DURATION = 3 s
 # Maximum numbero of iterations for a solution process (only LP)
-# MLP_MAX_ITERATIONS = 
+# MLP_MAX_ITERATIONS =
 # Tolerated MIP Gap [0.0 .. 1.0], default 0.025
 MLP_MAX_MIP_GAP = 0.025
 # Tolerated LP/MIP Gap [0.0 .. 1.0], default 0.025
index fb17c053a420cb4ea91afdd10ecc1fea272124bc..b9661a9b7b017bf9bfc6cd179c67eb4e7384cce7 100644 (file)
@@ -33,7 +33,7 @@
 /**
  * How namy messages to send
  */
-#define TOTAL_PACKETS 20000
+#define TOTAL_PACKETS 40000
 
 /**
  * How long until we give up on connecting the peers?
index d6ffa491d2e95e0b9dfe44e6d490cba877bb4200..e901af25eb2b9b35253a6bdacae304c78e40acba 100644 (file)
@@ -579,8 +579,8 @@ ats_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
  */
 static int
 peer_respect_cb (void *cls,
-                 struct GNUNET_PEERSTORE_Record *record,
-                 char *emsg)
+                 const struct GNUNET_PEERSTORE_Record *record,
+                 const char *emsg)
 {
   struct GSF_ConnectedPeer *cp = cls;
 
index d59407af833e0879f4f441adeffe9c114e0065a0..4d31ab692ae4cb04e87d592ed5844d62477ccab7 100644 (file)
@@ -1574,12 +1574,13 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
       else if (0 == strcmp(proxytype_str, "SOCKS4A"))
         proxy_type = CURLPROXY_SOCKS4A;
       else if (0 == strcmp(proxytype_str, "SOCKS5_HOSTNAME"))
-        proxy_type = CURLPROXY_SOCKS5_HOSTNAME ;
+        proxy_type = CURLPROXY_SOCKS5_HOSTNAME;
       else
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-             _("Invalid proxy type: `%s', disabling proxy! Check configuration!\n"),
-             proxytype_str);
+        if (0 != strcasecmp (proxytype_str, "NONE"))
+          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                      _("Invalid proxy type: `%s', disabling proxy! Check configuration!\n"),
+                      proxytype_str);
         GNUNET_free (proxytype_str);
 
         GNUNET_free (proxy);
index a3fed7065cc1616b0b65e4dc34dba7a74365cfa3..49166659bba8e4ac464cd35178e19bf0af4df11d 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      (C) 
+      (C)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
@@ -52,7 +52,7 @@ enum GNUNET_PEERSTORE_StoreOption
    * Delete any previous values for the given key before
    * storing the given value.
    */
-  GNUNET_PEERSTORE_STOREOPTION_REPLACE = 1,
+  GNUNET_PEERSTORE_STOREOPTION_REPLACE = 1
 
 };
 
@@ -93,7 +93,7 @@ struct GNUNET_PEERSTORE_Record
   void *value;
 
   /**
-   * Size of 'value' BLOB
+   * Size of @e value BLOB
    */
   size_t value_size;
 
@@ -108,13 +108,15 @@ struct GNUNET_PEERSTORE_Record
   struct GNUNET_SERVER_Client *client;
 };
 
+
 /**
  * Continuation called with a status result.
  *
  * @param cls closure
  * @param success #GNUNET_OK or #GNUNET_SYSERR
  */
-typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, int success);
+typedef void
+(*GNUNET_PEERSTORE_Continuation)(void *cls, int success);
 
 /**
  * Function called by PEERSTORE for each matching record.
@@ -124,9 +126,10 @@ typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, int success);
  * @param emsg error message, or NULL if no errors
  * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop
  */
-typedef int (*GNUNET_PEERSTORE_Processor) (void *cls,
-    struct GNUNET_PEERSTORE_Record *record,
-    char *emsg);
+typedef int
+(*GNUNET_PEERSTORE_Processor) (void *cls,
+                               const struct GNUNET_PEERSTORE_Record *record,
+                               const char *emsg);
 
 /**
  * Connect to the PEERSTORE service.
@@ -136,6 +139,7 @@ typedef int (*GNUNET_PEERSTORE_Processor) (void *cls,
 struct GNUNET_PEERSTORE_Handle *
 GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
+
 /**
  * Disconnect from the PEERSTORE service. Any pending ITERATE and WATCH requests
  * will be canceled.
@@ -145,7 +149,9 @@ GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
  * @param sync_first send any pending STORE requests before disconnecting
  */
 void
-GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first);
+GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h,
+                             int sync_first);
+
 
 /**
  * Store a new entry in the PEERSTORE.
@@ -161,7 +167,7 @@ GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first);
  * @param expiry absolute time after which the entry is (possibly) deleted
  * @param options options specific to the storage operation
  * @param cont Continuation function after the store request is sent
- * @param cont_cls Closure for 'cont'
+ * @param cont_cls Closure for @a cont
  */
 struct GNUNET_PEERSTORE_StoreContext *
 GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
@@ -175,6 +181,7 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
                         GNUNET_PEERSTORE_Continuation cont,
                         void *cont_cls);
 
+
 /**
  * Cancel a store request
  *
@@ -183,6 +190,7 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
 void
 GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
 
+
 /**
  * Iterate over records matching supplied key information
  *
@@ -196,11 +204,13 @@ GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
  */
 struct GNUNET_PEERSTORE_IterateContext *
 GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
-    const char *sub_system,
-    const struct GNUNET_PeerIdentity *peer,
-    const char *key,
-    struct GNUNET_TIME_Relative timeout,
-    GNUNET_PEERSTORE_Processor callback, void *callback_cls);
+                          const char *sub_system,
+                          const struct GNUNET_PeerIdentity *peer,
+                          const char *key,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_PEERSTORE_Processor callback,
+                          void *callback_cls);
+
 
 /**
  * Cancel an iterate request
@@ -211,9 +221,10 @@ GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
 void
 GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
 
+
 /**
  * Request watching a given key
- * User will be notified with any new values added to key
+ * User will be notified with any new values added to key.
  *
  * @param h handle to the PEERSTORE service
  * @param sub_system name of sub system
@@ -225,10 +236,12 @@ GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
  */
 struct GNUNET_PEERSTORE_WatchContext *
 GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
-    const char *sub_system,
-    const struct GNUNET_PeerIdentity *peer,
-    const char *key,
-    GNUNET_PEERSTORE_Processor callback, void *callback_cls);
+                        const char *sub_system,
+                        const struct GNUNET_PeerIdentity *peer,
+                        const char *key,
+                        GNUNET_PEERSTORE_Processor callback,
+                        void *callback_cls);
+
 
 /**
  * Cancel a watch request
@@ -236,7 +249,7 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
  * @param wc handle to the watch request
  */
 void
-GNUNET_PEERSTORE_watch_cancel(struct GNUNET_PEERSTORE_WatchContext *wc);
+GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index f8ec631b937d4f416984cbfcc396511983694e9a..bdd93e63a479578dbabf16141bf0c9f62e2cdc64 100644 (file)
@@ -239,7 +239,9 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
  * @return #GNUNET_YES to continue iteration
  */
 static int
-record_iterator (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+record_iterator (void *cls,
+                 const struct GNUNET_PEERSTORE_Record *record,
+                 const char *emsg)
 {
   struct GNUNET_PEERSTORE_Record *cls_record = cls;
   struct StoreRecordMessage *srm;
@@ -410,7 +412,7 @@ handle_iterate (void *cls, struct GNUNET_SERVER_Client *client,
 
 
 /**
- * Continuation of store_record called by the peerstore plugin 
+ * Continuation of store_record called by the peerstore plugin
  *
  * @param cls closure
  * @param success result
index ef134feef7c7900558502e862464bb0e2697bada..6644464ec69e86a927397cefb6dfdb5a599417e6 100644 (file)
 
 
 GNUNET_NETWORK_STRUCT_BEGIN
+
 /**
  * Message carrying a PEERSTORE record message
  */
-    struct StoreRecordMessage
+struct StoreRecordMessage
 {
 
   /**
@@ -46,16 +47,21 @@ GNUNET_NETWORK_STRUCT_BEGIN
    */
   uint16_t peer_set GNUNET_PACKED;
 
+  /**
+   * Size of the sub_system string
+   * Allocated at position 0 after this struct
+   */
+  uint16_t sub_system_size GNUNET_PACKED;
+
   /**
    * Peer Identity
    */
   struct GNUNET_PeerIdentity peer;
 
   /**
-   * Size of the sub_system string
-   * Allocated at position 0 after this struct
+   * Expiry time of entry
    */
-  uint16_t sub_system_size GNUNET_PACKED;
+  struct GNUNET_TIME_Absolute expiry GNUNET_PACKED;
 
   /**
    * Size of the key string
@@ -69,19 +75,15 @@ GNUNET_NETWORK_STRUCT_BEGIN
    */
   uint16_t value_size GNUNET_PACKED;
 
-  /**
-   * Expiry time of entry
-   */
-  struct GNUNET_TIME_Absolute expiry GNUNET_PACKED;
-
   /**
    * Options, needed only in case of a
    * store operation
    */
-  enum GNUNET_PEERSTORE_StoreOption options GNUNET_PACKED;
+  uint32_t /* enum GNUNET_PEERSTORE_StoreOption */ options GNUNET_PACKED;
 
 };
 
+
 /**
  * Message carrying record key hash
  */
@@ -93,6 +95,11 @@ struct StoreKeyHashMessage
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * Always 0, for alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
   /**
    * Hash of a record key
    */
index 90594f73a061022ea968b79b5176133210251d12..46f170a23f61c48675d56ed55a5a725ec92c9a19 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C)
+     (C) 2013-2014 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
 */
-
 /**
  * @file peerstore/peerstore_api.c
  * @brief API for peerstore
  * @author Omar Tarabai
+ * @author Christian Grothoff
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
@@ -292,15 +292,30 @@ reconnect (struct GNUNET_PEERSTORE_Handle *h);
  * @param cls a 'struct GNUNET_PEERSTORE_WatchContext *'
  */
 static void
-watch_request_sent (void *cls);
+watch_request_sent (void *cls)
+{
+  struct GNUNET_PEERSTORE_WatchContext *wc = cls;
+
+  wc->request_sent = GNUNET_YES;
+  wc->ev = NULL;
+}
+
 
 /**
  * Callback after MQ envelope is sent
  *
- * @param cls a 'struct GNUNET_PEERSTORE_IterateContext *'
+ * @param cls a `struct GNUNET_PEERSTORE_IterateContext *`
  */
 static void
-iterate_request_sent (void *cls);
+iterate_request_sent (void *cls)
+{
+  struct GNUNET_PEERSTORE_IterateContext *ic = cls;
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Iterate request sent to service.\n");
+  ic->iterating = GNUNET_YES;
+  ic->ev = NULL;
+}
 
 
 /**
@@ -724,7 +739,6 @@ handle_iterate_result (void *cls,
   callback_cls = ic->callback_cls;
   if (NULL == msg)              /* Connection error */
   {
-
     if (NULL != callback)
       callback (callback_cls, NULL,
                 _("Error communicating with `PEERSTORE' service."));
@@ -758,23 +772,6 @@ handle_iterate_result (void *cls,
 }
 
 
-/**
- * Callback after MQ envelope is sent
- *
- * @param cls a `struct GNUNET_PEERSTORE_IterateContext *`
- */
-static void
-iterate_request_sent (void *cls)
-{
-  struct GNUNET_PEERSTORE_IterateContext *ic = cls;
-
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Iterate request sent to service.\n");
-  ic->iterating = GNUNET_YES;
-  ic->ev = NULL;
-}
-
-
 /**
  * Called when the iterate request is timedout
  *
@@ -922,21 +919,6 @@ handle_watch_result (void *cls, const struct GNUNET_MessageHeader *msg)
 }
 
 
-/**
- * Callback after MQ envelope is sent
- *
- * @param cls a `struct GNUNET_PEERSTORE_WatchContext *`
- */
-static void
-watch_request_sent (void *cls)
-{
-  struct GNUNET_PEERSTORE_WatchContext *wc = cls;
-
-  wc->request_sent = GNUNET_YES;
-  wc->ev = NULL;
-}
-
-
 /**
  * Cancel a watch request
  *
index e97699fe21bb2f96e7030bfdd445d43c6b1881c7..ad7c701957e34d40e13506598f9178976d34f3a3 100644 (file)
@@ -37,9 +37,9 @@ static struct GNUNET_PeerIdentity p;
 static char *k = "test_peerstore_stress_key";
 static char *v = "test_peerstore_stress_val";
 
-int count = 0;
+static int count = 0;
 
-void
+static void
 disconnect ()
 {
   if (NULL != h)
@@ -48,7 +48,7 @@ disconnect ()
 }
 
 
-void
+static void
 store ()
 {
   GNUNET_PEERSTORE_store (h, ss, &p, k, v, strlen (v) + 1,
@@ -61,7 +61,9 @@ store ()
 
 
 static int
-watch_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+watch_cb (void *cls,
+          const struct GNUNET_PEERSTORE_Record *record,
+          const char *emsg)
 {
   GNUNET_assert (NULL == emsg);
   if (STORES == count)
index 626a020de7db6cfad34e888f1537f2209256927d..5952d45d17db7dec8a27a3f70b262c0cb8eb6d07 100644 (file)
@@ -39,8 +39,11 @@ static char *k3 = "test_peerstore_api_iterate_key3";
 static char *val = "test_peerstore_api_iterate_val";
 static int count = 0;
 
+
 static int
-iter3_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+iter3_cb (void *cls,
+          const struct GNUNET_PEERSTORE_Record *record,
+          const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
@@ -58,7 +61,9 @@ iter3_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
 
 
 static int
-iter2_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+iter2_cb (void *cls,
+          const struct GNUNET_PEERSTORE_Record *record,
+          const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
@@ -76,7 +81,9 @@ iter2_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
 
 
 static int
-iter1_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+iter1_cb (void *cls,
+          const struct GNUNET_PEERSTORE_Record *record,
+          const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
index 06ad3475669780abe038a88d3a12302ef17b2d7a..794a2b04867e9da412d9e8e37d59306d1e767fa6 100644 (file)
@@ -37,10 +37,12 @@ static char *val1 = "test_peerstore_api_store_val1";
 static char *val2 = "test_peerstore_api_store_val2-";
 static char *val3 = "test_peerstore_api_store_val3--";
 
-int count = 0;
+static int count = 0;
 
-int
-test3_cont2 (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+static int
+test3_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
+             const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
@@ -83,8 +85,10 @@ test3 ()
 }
 
 
-int
-test2_cont2 (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+static int
+test2_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
+             const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
@@ -128,8 +132,10 @@ test2 ()
 }
 
 
-int
-test1_cont2 (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+static int
+test1_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
+             const char *emsg)
 {
   if (NULL != emsg)
     return GNUNET_NO;
@@ -172,7 +178,8 @@ test1 ()
 
 
 static void
-run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg,
+run (void *cls,
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
      struct GNUNET_TESTING_Peer *peer)
 {
   h = GNUNET_PEERSTORE_connect (cfg);
index 3803d72c129bb41c95febec73f6007e08a33cdb7..8bd8328f821ab4ee340cccd71031f9a82e8d3d78 100644 (file)
@@ -26,9 +26,9 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_peerstore_service.h"
 
-int ok = 1;
+static int ok = 1;
 
-const struct GNUNET_CONFIGURATION_Handle *cfg;
+static const struct GNUNET_CONFIGURATION_Handle *cfg;
 
 static struct GNUNET_PEERSTORE_Handle *h;
 
@@ -37,8 +37,10 @@ static struct GNUNET_PeerIdentity pid;
 static char *key = "test_peerstore_api_store_key";
 static char *val = "test_peerstore_api_store_val";
 
-int
-iterate_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+static int
+iterate_cb (void *cls,
+            const struct GNUNET_PEERSTORE_Record *record,
+            const char *emsg)
 {
   const char *rec_val;
 
index cb0b80044c1db80037e35757b7f790a46809d4c4..21574774d881cf98ff798e79f59834885520c553 100644 (file)
@@ -365,8 +365,9 @@ dashboard_started (void *cls, struct GNUNET_TESTBED_Operation *op,
  * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop
  */
 static int
-peerstore_watch_cb (void *cls, struct GNUNET_PEERSTORE_Record *record,
-                    char *emsg)
+peerstore_watch_cb (void *cls,
+                    const struct GNUNET_PEERSTORE_Record *record,
+                    const char *emsg)
 {
   struct PeerInfo *peer = cls;
   struct GNUNET_SENSOR_DashboardAnomalyEntry *anomaly;
index b82db4b8ee25bc345654b041dc76261caa7e0eff..45eaaa8c197b4b2bc4f24ac29aff635406daaeeb 100644 (file)
@@ -189,7 +189,9 @@ SENSOR_analysis_stop ()
  * @return #GNUNET_YES
  */
 static int
-sensor_watcher (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+sensor_watcher (void *cls,
+                const struct GNUNET_PEERSTORE_Record *record,
+                const char *emsg)
 {
   struct SensorModel *model = cls;
   double *val;
index 1c19b38f92452d02b8892d5e0a000c374be5c7da..8d69836a0144d52c9e7ac8e1a48441f7469820e2 100644 (file)
@@ -1032,10 +1032,12 @@ handle_anomaly_report (void *cls, const struct GNUNET_PeerIdentity *other,
  * @param cls Closure, ValueInfo struct related to the sensor we are watching
  * @param record PEERSTORE new record, NULL if error
  * @param emsg Error message, NULL if no error
- * @return GNUNET_YES to continue watching
+ * @return #GNUNET_YES to continue watching
  */
 static int
-value_watch_cb (void *cls, struct GNUNET_PEERSTORE_Record *record, char *emsg)
+value_watch_cb (void *cls,
+                const struct GNUNET_PEERSTORE_Record *record,
+                const char *emsg)
 {
   struct ValueInfo *vi = cls;
 
index 947b64bef70fd9939beceff6db56af97c0e8f5e8..acccf39f80aa2263ab8e92860d7a1f690f6b92ce 100644 (file)
@@ -432,8 +432,8 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
 
   saddr = NULL;
   sock_addr = NULL;
-  if ((addrlen < sizeof(struct HttpAddress))
-      || (addrlen != http_common_address_get_size (address)))
+  if ( (addrlen < sizeof(struct HttpAddress)) ||
+       (addrlen != http_common_address_get_size (address)) )
   {
     GNUNET_break(0);
     goto handle_error;