value__ is uint32_t, use %lu to print
authorLRN <lrn1986@gmail.com>
Tue, 24 Dec 2013 13:26:21 +0000 (13:26 +0000)
committerLRN <lrn1986@gmail.com>
Tue, 24 Dec 2013 13:26:21 +0000 (13:26 +0000)
src/ats/gnunet-service-ats_addresses.c
src/ats/gnunet-service-ats_performance.c
src/ats/gnunet-service-ats_scheduling.c
src/ats/perf_ats_solver.c
src/ats/test_ats_mlp_averaging.c
src/ats/test_ats_simplistic_pref_aging.c
src/ats/test_ats_solver_request_and_delete_address.c

index f52d1d7fda9f28009c1e46601cfecc30e73e7c3d..8e47ae74c4b85fa66e5fcbe3a90baa746bb13112 100644 (file)
@@ -1384,10 +1384,10 @@ eval_sum_bw_used (void *cls, const struct GNUNET_PeerIdentity *id, void *obj)
       }
     }
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "Active address in  %s with (in/out) %u/%u Bps\n",
-                GNUNET_ATS_print_network_type (net),
-                (unsigned int) ntohl (addr->assigned_bw_in.value__),
-                (unsigned int) ntohl (addr->assigned_bw_out.value__));
+        "Active address in  %s with (in/out) %lu/%lu Bps\n",
+        GNUNET_ATS_print_network_type (net),
+        ntohl (addr->assigned_bw_in.value__),
+        ntohl (addr->assigned_bw_out.value__));
   }
   return GNUNET_OK;
 }
@@ -2060,9 +2060,9 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
   else
   {
     GNUNET_log(GNUNET_ERROR_TYPE_INFO,
-        "Sending bandwidth update for peer `%s': %llu %llu\n",
-        GNUNET_i2s (&address->peer), address->assigned_bw_out,
-        address->assigned_bw_out);
+        "Sending bandwidth update for peer `%s': %lu %lu\n",
+        GNUNET_i2s (&address->peer), address->assigned_bw_out.value__,
+        address->assigned_bw_out.value__);
   }
 
   /* *Notify scheduling clients about suggestion */
index a9673821a3fe92bca9555d953e1d687235176fd8..6509dbe9de304ee11e2a2f7f3b04656eda870a0b 100644 (file)
@@ -261,7 +261,7 @@ peerinfo_it (void *cls,
     return;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Callback for peer `%s' plugin `%s' BW out %llu, BW in %llu \n",
+              "Callback for peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
               GNUNET_i2s (id),
               plugin_name,
               ntohl (bandwidth_out.value__),
@@ -405,23 +405,23 @@ req_addr_peerinfo_it (void *cls,
       return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Callback for  %s peer `%s' plugin `%s' BW out %u, BW in %u \n",
+              "Callback for  %s peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
               (active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
               GNUNET_i2s (id),
               plugin_name,
-              (unsigned int) ntohl (bandwidth_out.value__),
-              (unsigned int) ntohl (bandwidth_in.value__));
+              ntohl (bandwidth_out.value__),
+              ntohl (bandwidth_in.value__));
 
   /* Transmit result */
   if ((GNUNET_YES == ai->all) || (GNUNET_YES == active))
   {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Sending result for  %s peer `%s' plugin `%s' BW out %u, BW in %u \n",
+                  "Sending result for  %s peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
                   (active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
                   GNUNET_i2s (id),
                   plugin_name,
-                  (unsigned int) ntohl (bandwidth_out.value__),
-                  (unsigned int) ntohl (bandwidth_in.value__));
+                  ntohl (bandwidth_out.value__),
+                  ntohl (bandwidth_in.value__));
     transmit_req_addr (cls,
         id,
         plugin_name,
index 8a0cf0a8e282f8553e9476c14cb8848abed63c67..13aeb2f02bf5c25795ba4be9a71d0e5de3a046ee 100644 (file)
@@ -146,7 +146,7 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity
   strcpy (&addrp[plugin_addr_len], plugin_name);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "ATS sends quota for peer `%s': (in/out) %u/%u\n",
+              "ATS sends quota for peer `%s': (in/out) %lu/%lu\n",
               GNUNET_i2s (peer), ntohl (bandwidth_in.value__),
               ntohl (bandwidth_out.value__));
 
index 89d0d82e2cd5f76fe1fded278e5d22bd22e41e31..92dfcc0c8c3a62ca8626dc5562bbe83e975d36bb 100644 (file)
@@ -300,7 +300,7 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
     return;
 
   GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
-      "Bandwidth changed addresses %s %p to %llu Bps out / %llu Bps in\n",
+      "Bandwidth changed addresses %s %p to %lu Bps out / %lu Bps in\n",
       GNUNET_i2s (&address->peer),
       address,
       ntohl(address->assigned_bw_out.value__),
index 390f380eae28b22179e8e67b1f0866902c618151..4843e1114efbae4ad5707ea2763f413069068d82 100644 (file)
@@ -218,7 +218,7 @@ check (void *cls, char *const *args, const char *cfgfile,
   GNUNET_assert (GNUNET_OK == ctx.mlp_result);
 
   res[0] = GAS_mlp_get_preferred_address(mlp, addresses, &p[0]);
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Preferred address `%s' outbound bandwidth: %u Bps\n",res[0]->plugin, ntohl(res[0]->assigned_bw_out.value__));
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Preferred address `%s' outbound bandwidth: %lu Bps\n",res[0]->plugin, ntohl(res[0]->assigned_bw_out.value__));
 
   /* Delete an address */
   GNUNET_CONTAINER_multihashmap_remove (addresses, &addr[0].peer.hashPubKey, &addr[0]);
index 0dc89d8ba4690e3a0d88b785fcfe75a7400c2f02..a741ad6bb070c2286b54ab18f08859323fabf89f 100644 (file)
@@ -169,7 +169,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                /* Callback for initial suggestion */
                if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
@@ -180,7 +180,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                }
                if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
@@ -205,7 +205,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                /* Callback due to preference change */
                if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
@@ -222,7 +222,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                }
                if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
@@ -256,7 +256,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                /* Callback due to preference aging */
                if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
@@ -273,7 +273,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
                }
                if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
                {
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %llu/%llu\n",
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
                                                stage,
                                                GNUNET_i2s (&address->peer),
                                                ntohl (bandwidth_in.value__),
index 312a3f2ef3be3ff352149b8247c83cc490b3b8bf..e0b8794338a726424b20d6eb0d89868a7fa9340b 100644 (file)
@@ -159,7 +159,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
     /* Expecting disconnect */
 
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-        "Received sugggestion for peer `%s': %llu %llu\n",
+        "Received sugggestion for peer `%s': %lu %lu\n",
         GNUNET_i2s (&address->peer),
         ntohl(bandwidth_in.value__),
         ntohl(bandwidth_out.value__));