aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_bidirectional_connect.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_bidirectional_connect.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_bidirectional_connect.c')
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index bf8de42e9..aa6f98027 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -150,7 +150,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
150 t = p2; 150 t = p2;
151 GNUNET_assert (t != NULL); 151 GNUNET_assert (t != NULL);
152 152
153 char *ps = strdup (GNUNET_i2s (&p->id)); 153 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
154 154
155 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 155 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
156 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", 156 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
@@ -199,7 +199,7 @@ notify_ready (void *cls, size_t size, void *buf)
199 hdr->size = htons (sizeof (struct GNUNET_MessageHeader)); 199 hdr->size = htons (sizeof (struct GNUNET_MessageHeader));
200 hdr->type = htons (MTYPE); 200 hdr->type = htons (MTYPE);
201 } 201 }
202 char *ps = strdup (GNUNET_i2s (&p2->id)); 202 char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id));
203 203
204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
205 "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n", 205 "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n",
@@ -217,7 +217,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
217 217
218 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 218 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
219 return; 219 return;
220 char *receiver_s = strdup (GNUNET_i2s (&p1->id)); 220 char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
221 221
222 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 222 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
223 "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n", 223 "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
@@ -246,7 +246,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
246 t = p2; 246 t = p2;
247 GNUNET_assert (t != NULL); 247 GNUNET_assert (t != NULL);
248 248
249 char *ps = strdup (GNUNET_i2s (&p->id)); 249 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
250 250
251 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 251 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
252 "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps, 252 "Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps,
@@ -259,7 +259,7 @@ static void
259notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) 259notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
260{ 260{
261 struct PeerContext *p = cls; 261 struct PeerContext *p = cls;
262 char *ps = strdup (GNUNET_i2s (&p->id)); 262 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
263 263
264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
265 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, 265 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
@@ -284,7 +284,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
284 GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc1); 284 GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc1);
285 } 285 }
286 286
287 char *p1_c = strdup (GNUNET_i2s (&p1->id)); 287 char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
288 288
289 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n", 289 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n",
290 p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id)); 290 p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id));
@@ -306,7 +306,7 @@ start_cb (struct PeerContext *p, void *cls)
306 if (started != 2) 306 if (started != 2)
307 return; 307 return;
308 308
309 char *sender_c = strdup (GNUNET_i2s (&p1->id)); 309 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
310 310
311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
312 "Test tries to connect peer %u (`%s') <-> peer %u (`%s')\n", 312 "Test tries to connect peer %u (`%s') <-> peer %u (`%s')\n",