summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api.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.c
parent48a507423a2f014aeb559ad4e58acd7ab1c8fc41 (diff)
LRN: Use GNUNET_strdup() instead of strdup ()
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r--src/transport/test_transport_api.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index a04017019..dd0704231 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -151,7 +151,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
t = p2;
GNUNET_assert (t != NULL);
- char *ps = strdup (GNUNET_i2s (&p->id));
+ char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
@@ -200,7 +200,7 @@ notify_ready (void *cls, size_t size, void *buf)
hdr->size = htons (sizeof (struct GNUNET_MessageHeader));
hdr->type = htons (MTYPE);
}
- char *ps = strdup (GNUNET_i2s (&p2->id));
+ char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n",
@@ -218,7 +218,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
- char *receiver_s = strdup (GNUNET_i2s (&p1->id));
+ char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
@@ -247,7 +247,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
t = p2;
GNUNET_assert (t != NULL);
- char *ps = strdup (GNUNET_i2s (&p->id));
+ char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %u (`%4s'): peer %u (`%s') connected to me!\n", p->no, ps,
@@ -260,7 +260,7 @@ static void
notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
struct PeerContext *p = cls;
- char *ps = strdup (GNUNET_i2s (&p->id));
+ char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
@@ -275,7 +275,7 @@ static void
testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
{
cc = NULL;
- char *p1_c = strdup (GNUNET_i2s (&p1->id));
+ char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %u (%s) <-> %u (%s)\n",
p1->no, p1_c, p2->no, GNUNET_i2s (&p2->id));
@@ -299,7 +299,7 @@ start_cb (struct PeerContext *p, void *cls)
if (started != 2)
return;
- char *sender_c = strdup (GNUNET_i2s (&p1->id));
+ char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Test tries to connect peer %u (`%s') -> peer %u (`%s')\n",