aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2017-10-23 04:16:43 +0200
committert3sserakt <t3ss@posteo.de>2017-10-23 04:16:43 +0200
commitb822e98f7ea722f7f0604bd9cef9aa436e7bab7d (patch)
tree841c0282637d7f319e666facab5adc54d69567f5
parent6490b5f31e58e9ec008f8c5ceda28f6054f1bbba (diff)
downloadgnunet-b822e98f7ea722f7f0604bd9cef9aa436e7bab7d.tar.gz
gnunet-b822e98f7ea722f7f0604bd9cef9aa436e7bab7d.zip
added logging
-rw-r--r--src/social/social_api.c6
-rw-r--r--src/util/client.c16
2 files changed, 18 insertions, 4 deletions
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 4b3655de4..923ab5e33 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -1082,9 +1082,11 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
1082void 1082void
1083place_disconnect (struct GNUNET_SOCIAL_Place *plc) 1083place_disconnect (struct GNUNET_SOCIAL_Place *plc)
1084{ 1084{
1085 struct GNUNET_HashCode place_pub_hash;
1086 GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
1085 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1087 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1086 "place_disconnect, plc = %p\n", 1088 "place_disconnect, plc = %s\n",
1087 plc); 1089 GNUNET_h2s (&place_pub_hash));
1088 if (NULL != plc->mq) 1090 if (NULL != plc->mq)
1089 { 1091 {
1090 struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq); 1092 struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq);
diff --git a/src/util/client.c b/src/util/client.c
index 3d74bff33..90bc837d7 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -267,8 +267,13 @@ transmit_ready (void *cls)
267 len - cstate->msg_off); 267 len - cstate->msg_off);
268 if (-1 == ret) 268 if (-1 == ret)
269 { 269 {
270 if (EINTR == errno) 270 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
271 "client: error during sending message of type %u\n", ntohs(cstate->msg->type));
272 if (EINTR == errno){
273 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
274 "client: retrying message of type %u\n", ntohs(cstate->msg->type));
271 goto RETRY; 275 goto RETRY;
276 }
272 GNUNET_MQ_inject_error (cstate->mq, 277 GNUNET_MQ_inject_error (cstate->mq,
273 GNUNET_MQ_ERROR_WRITE); 278 GNUNET_MQ_ERROR_WRITE);
274 return; 279 return;
@@ -277,6 +282,8 @@ transmit_ready (void *cls)
277 cstate->msg_off += ret; 282 cstate->msg_off += ret;
278 if (cstate->msg_off < len) 283 if (cstate->msg_off < len)
279 { 284 {
285 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
286 "client: rescheduling message of type %u\n", ntohs(cstate->msg->type));
280 cstate->send_task 287 cstate->send_task
281 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, 288 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
282 cstate->sock, 289 cstate->sock,
@@ -286,6 +293,8 @@ transmit_ready (void *cls)
286 GNUNET_MQ_impl_send_in_flight (cstate->mq); 293 GNUNET_MQ_impl_send_in_flight (cstate->mq);
287 return; 294 return;
288 } 295 }
296 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
297 "client: sending message of type %u successful\n", ntohs(cstate->msg->type));
289 cstate->msg = NULL; 298 cstate->msg = NULL;
290 GNUNET_MQ_impl_send_continue (cstate->mq); 299 GNUNET_MQ_impl_send_continue (cstate->mq);
291} 300}
@@ -794,8 +803,11 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
794 GNUNET_assert (NULL == cstate->send_task); 803 GNUNET_assert (NULL == cstate->send_task);
795 cstate->msg = msg; 804 cstate->msg = msg;
796 cstate->msg_off = 0; 805 cstate->msg_off = 0;
797 if (NULL == cstate->sock) 806 if (NULL == cstate->sock){
807 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
808 "client: waiting for socket\n");
798 return; /* still waiting for connection */ 809 return; /* still waiting for connection */
810 }
799 cstate->send_task 811 cstate->send_task
800 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, 812 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
801 cstate->sock, 813 cstate->sock,