aboutsummaryrefslogtreecommitdiff
path: root/src/nse/nse_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 13:36:52 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 13:36:52 +0000
commit4a7cbfbe33d22ff22e2885d0eec90fb238bc013a (patch)
treed780afcbb0d40da44322d03713a13f86597e6713 /src/nse/nse_api.c
parent3bff0d50c44e088e121ce00c603d290be41489d8 (diff)
downloadgnunet-4a7cbfbe33d22ff22e2885d0eec90fb238bc013a.tar.gz
gnunet-4a7cbfbe33d22ff22e2885d0eec90fb238bc013a.zip
use LOG macro in nse_api.c
Diffstat (limited to 'src/nse/nse_api.c')
-rw-r--r--src/nse/nse_api.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nse/nse_api.c b/src/nse/nse_api.c
index 476c77c2a..db5e9d117 100644
--- a/src/nse/nse_api.c
+++ b/src/nse/nse_api.c
@@ -35,6 +35,7 @@
35#include "gnunet_nse_service.h" 35#include "gnunet_nse_service.h"
36#include "nse.h" 36#include "nse.h"
37 37
38#define LOG(kind,...) GNUNET_log_from (kind, "nse-api",__VA_ARGS__)
38 39
39/** 40/**
40 * Handle for the service. 41 * Handle for the service.
@@ -119,8 +120,7 @@ message_handler (void *cls, const struct GNUNET_MessageHeader *msg)
119 } 120 }
120 client_msg = (const struct GNUNET_NSE_ClientMessage *) msg; 121 client_msg = (const struct GNUNET_NSE_ClientMessage *) msg;
121 h->recv_cb (h->recv_cb_cls, GNUNET_TIME_absolute_ntoh (client_msg->timestamp), 122 h->recv_cb (h->recv_cb_cls, GNUNET_TIME_absolute_ntoh (client_msg->timestamp),
122 client_msg->size_estimate, 123 client_msg->size_estimate, client_msg->std_deviation);
123 client_msg->std_deviation);
124 GNUNET_CLIENT_receive (h->client, &message_handler, h, 124 GNUNET_CLIENT_receive (h->client, &message_handler, h,
125 GNUNET_TIME_UNIT_FOREVER_REL); 125 GNUNET_TIME_UNIT_FOREVER_REL);
126} 126}
@@ -149,9 +149,9 @@ reschedule_connect (struct GNUNET_NSE_Handle *h)
149 } 149 }
150 150
151#if DEBUG_NSE 151#if DEBUG_NSE
152 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 152 LOG (GNUNET_ERROR_TYPE_DEBUG,
153 "Scheduling task to reconnect to nse service in %llu ms.\n", 153 "Scheduling task to reconnect to nse service in %llu ms.\n",
154 h->reconnect_delay.rel_value); 154 h->reconnect_delay.rel_value);
155#endif 155#endif
156 h->reconnect_task = 156 h->reconnect_task =
157 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h); 157 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
@@ -187,14 +187,14 @@ send_start (void *cls, size_t size, void *buf)
187 { 187 {
188 /* Connect error... */ 188 /* Connect error... */
189#if DEBUG_NSE 189#if DEBUG_NSE
190 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 190 LOG (GNUNET_ERROR_TYPE_DEBUG,
191 "Shutdown while trying to transmit `%s' request.\n", "START"); 191 "Shutdown while trying to transmit `%s' request.\n", "START");
192#endif 192#endif
193 reschedule_connect (h); 193 reschedule_connect (h);
194 return 0; 194 return 0;
195 } 195 }
196#if DEBUG_NSE 196#if DEBUG_NSE
197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting `%s' request.\n", "START"); 197 LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting `%s' request.\n", "START");
198#endif 198#endif
199 GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader)); 199 GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
200 200
@@ -225,8 +225,8 @@ reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
225 return; 225 return;
226 } 226 }
227#if DEBUG_NSE 227#if DEBUG_NSE
228 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 228 LOG (GNUNET_ERROR_TYPE_DEBUG,
229 "Connecting to network size estimation service.\n"); 229 "Connecting to network size estimation service.\n");
230#endif 230#endif
231 GNUNET_assert (h->client == NULL); 231 GNUNET_assert (h->client == NULL);
232 h->client = GNUNET_CLIENT_connect ("nse", h->cfg); 232 h->client = GNUNET_CLIENT_connect ("nse", h->cfg);