summaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2013-11-09 23:12:23 +0000
committerGabor X Toth <*@tg-x.net>2013-11-09 23:12:23 +0000
commitd10808d7f17c5f6f1356c22ef0992965cbaf5ce1 (patch)
tree2aa315f5a56ee9fa5853201658390a41f38669ce /src/util/client.c
parent383a9603f7310b3156331a1ed9cc97cc6ed4d3a9 (diff)
downloadgnunet-d10808d7f17c5f6f1356c22ef0992965cbaf5ce1.tar.gz
gnunet-d10808d7f17c5f6f1356c22ef0992965cbaf5ce1.zip
logread: ipc message monitoring
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 0e6cf0a4f..0a8e99f88 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -573,8 +573,8 @@ receive_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
573 char mbuf[msize]; 573 char mbuf[msize];
574 struct GNUNET_MessageHeader *msg = (struct GNUNET_MessageHeader *) mbuf; 574 struct GNUNET_MessageHeader *msg = (struct GNUNET_MessageHeader *) mbuf;
575 575
576 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message of type %u and size %u\n", 576 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message of type %u and size %u from %s service.\n",
577 ntohs (cmsg->type), msize); 577 ntohs (cmsg->type), msize, client->service_name);
578 client->receive_task = GNUNET_SCHEDULER_NO_TASK; 578 client->receive_task = GNUNET_SCHEDULER_NO_TASK;
579 GNUNET_assert (GNUNET_YES == client->msg_complete); 579 GNUNET_assert (GNUNET_YES == client->msg_complete);
580 GNUNET_assert (client->received_pos >= msize); 580 GNUNET_assert (client->received_pos >= msize);
@@ -1148,6 +1148,14 @@ client_notify (void *cls, size_t size, void *buf)
1148 GNUNET_assert (size >= th->size); 1148 GNUNET_assert (size >= th->size);
1149 ret = th->notify (th->notify_cls, size, buf); 1149 ret = th->notify (th->notify_cls, size, buf);
1150 GNUNET_free (th); 1150 GNUNET_free (th);
1151 if (sizeof (struct GNUNET_MessageHeader) <= ret)
1152 {
1153 LOG (GNUNET_ERROR_TYPE_DEBUG,
1154 "Transmitting message of type %u and size %u to %s service.\n",
1155 ntohs (((struct GNUNET_MessageHeader *) buf)->type),
1156 ntohs (((struct GNUNET_MessageHeader *) buf)->size),
1157 client->service_name);
1158 }
1151 return ret; 1159 return ret;
1152} 1160}
1153 1161