aboutsummaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 811bb8e12..6c5e93ce4 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2001, 2002, 2006, 2008, 2009, 2012 Christian Grothoff (and other contributing authors) 3 (C) 2001-2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
@@ -409,7 +409,7 @@ GNUNET_CLIENT_connect (const char *service_name,
409 cfg)) 409 cfg))
410 return NULL; 410 return NULL;
411 connection = do_connect (service_name, cfg, 0); 411 connection = do_connect (service_name, cfg, 0);
412 client = GNUNET_malloc (sizeof (struct GNUNET_CLIENT_Connection)); 412 client = GNUNET_new (struct GNUNET_CLIENT_Connection);
413 client->first_message = GNUNET_YES; 413 client->first_message = GNUNET_YES;
414 client->attempts = 1; 414 client->attempts = 1;
415 client->connection = connection; 415 client->connection = connection;
@@ -536,7 +536,7 @@ receive_helper (void *cls, const void *buf, size_t available,
536 check_complete (client); 536 check_complete (client);
537 /* check for timeout */ 537 /* check for timeout */
538 remaining = GNUNET_TIME_absolute_get_remaining (client->receive_timeout); 538 remaining = GNUNET_TIME_absolute_get_remaining (client->receive_timeout);
539 if (0 == remaining.rel_value) 539 if (0 == remaining.rel_value_us)
540 { 540 {
541 /* signal timeout! */ 541 /* signal timeout! */
542 if (NULL != client->receiver_handler) 542 if (NULL != client->receiver_handler)
@@ -1094,9 +1094,9 @@ client_notify (void *cls, size_t size, void *buf)
1094 if (NULL == buf) 1094 if (NULL == buf)
1095 { 1095 {
1096 delay = GNUNET_TIME_absolute_get_remaining (th->timeout); 1096 delay = GNUNET_TIME_absolute_get_remaining (th->timeout);
1097 delay.rel_value /= 2; 1097 delay.rel_value_us /= 2;
1098 if ((GNUNET_YES != th->auto_retry) || (0 == --th->attempts_left) || 1098 if ((GNUNET_YES != th->auto_retry) || (0 == --th->attempts_left) ||
1099 (delay.rel_value < 1)|| 1099 (delay.rel_value_us < 1)||
1100 (0 != (GNUNET_SCHEDULER_get_reason() & GNUNET_SCHEDULER_REASON_SHUTDOWN))) 1100 (0 != (GNUNET_SCHEDULER_get_reason() & GNUNET_SCHEDULER_REASON_SHUTDOWN)))
1101 { 1101 {
1102 LOG (GNUNET_ERROR_TYPE_DEBUG, 1102 LOG (GNUNET_ERROR_TYPE_DEBUG,