aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_restart_2peers.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-25 22:15:37 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-25 22:15:37 +0000
commitecdc64b5af16246777bb2a4cab79e203fe462a66 (patch)
tree5add1c039d56c297fd199a2829a3c1453e0f5e38 /src/transport/test_transport_api_restart_2peers.c
parent48a507423a2f014aeb559ad4e58acd7ab1c8fc41 (diff)
downloadgnunet-ecdc64b5af16246777bb2a4cab79e203fe462a66.tar.gz
gnunet-ecdc64b5af16246777bb2a4cab79e203fe462a66.zip
LRN: Use GNUNET_strdup() instead of strdup ()
Diffstat (limited to 'src/transport/test_transport_api_restart_2peers.c')
-rw-r--r--src/transport/test_transport_api_restart_2peers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index dab8f39a6..44a41614f 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -204,7 +204,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
204 t = p2; 204 t = p2;
205 GNUNET_assert (t != NULL); 205 GNUNET_assert (t != NULL);
206 206
207 char *ps = strdup (GNUNET_i2s (&p->id)); 207 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
209 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", 209 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
210 p->no, ps, ntohs (message->type), ntohs (message->size), t->no, 210 p->no, ps, ntohs (message->type), ntohs (message->size), t->no,
@@ -267,7 +267,7 @@ notify_ready (void *cls, size_t size, void *buf)
267 hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); 267 hdr->size = htons (sizeof (struct GNUNET_MessageHeader));
268 hdr->type = htons (MTYPE); 268 hdr->type = htons (MTYPE);
269 } 269 }
270 char *ps = strdup (GNUNET_i2s (&p2->id)); 270 char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id));
271 271
272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
273 "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", 273 "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n",
@@ -285,7 +285,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
285 285
286 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 286 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
287 return; 287 return;
288 char *receiver_s = strdup (GNUNET_i2s (&p1->id)); 288 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
289 289
290 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 290 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
291 "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", 291 "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
@@ -314,7 +314,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
314 t = p2; 314 t = p2;
315 GNUNET_assert (t != NULL); 315 GNUNET_assert (t != NULL);
316 316
317 char *ps = strdup (GNUNET_i2s (&p->id)); 317 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
318 318
319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
320 "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, 320 "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps,
@@ -334,7 +334,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
334 struct PeerContext *p = cls; 334 struct PeerContext *p = cls;
335 335
336 336
337 char *ps = strdup (GNUNET_i2s (&p->id)); 337 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
339 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, 339 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
340 GNUNET_i2s (peer)); 340 GNUNET_i2s (peer));
@@ -349,7 +349,7 @@ static void
349testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) 349testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
350{ 350{
351 cc = NULL; 351 cc = NULL;
352 char *p1_c = strdup (GNUNET_i2s (&p1->id)); 352 char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
353 353
354 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", 354 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n",
355 p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); 355 p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id));
@@ -373,7 +373,7 @@ start_cb (struct PeerContext *p, void *cls)
373 if (started != 2) 373 if (started != 2)
374 return; 374 return;
375 375
376 char *sender_c = strdup (GNUNET_i2s (&p1->id)); 376 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
377 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 377 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
378 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", 378 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n",
379 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); 379 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id));