diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/client.c | 3 | ||||
-rw-r--r-- | src/util/connection.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/util/client.c b/src/util/client.c index 1b28e0577..e098f2183 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -465,6 +465,7 @@ receive_helper (void *cls, const void *buf, size_t available, | |||
465 | void *receive_handler_cls; | 465 | void *receive_handler_cls; |
466 | 466 | ||
467 | GNUNET_assert (GNUNET_NO == client->msg_complete); | 467 | GNUNET_assert (GNUNET_NO == client->msg_complete); |
468 | GNUNET_assert (GNUNET_YES == client->in_receive); | ||
468 | client->in_receive = GNUNET_NO; | 469 | client->in_receive = GNUNET_NO; |
469 | if ((0 == available) || (NULL == client->connection) || (0 != errCode)) | 470 | if ((0 == available) || (NULL == client->connection) || (0 != errCode)) |
470 | { | 471 | { |
@@ -572,9 +573,9 @@ GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *client, | |||
572 | } | 573 | } |
573 | else | 574 | else |
574 | { | 575 | { |
576 | LOG (GNUNET_ERROR_TYPE_DEBUG, "calling GNUNET_CONNECTION_receive\n"); | ||
575 | GNUNET_assert (GNUNET_NO == client->in_receive); | 577 | GNUNET_assert (GNUNET_NO == client->in_receive); |
576 | client->in_receive = GNUNET_YES; | 578 | client->in_receive = GNUNET_YES; |
577 | LOG (GNUNET_ERROR_TYPE_DEBUG, "calling GNUNET_CONNECTION_receive\n"); | ||
578 | GNUNET_CONNECTION_receive (client->connection, GNUNET_SERVER_MAX_MESSAGE_SIZE - 1, | 579 | GNUNET_CONNECTION_receive (client->connection, GNUNET_SERVER_MAX_MESSAGE_SIZE - 1, |
579 | timeout, &receive_helper, client); | 580 | timeout, &receive_helper, client); |
580 | } | 581 | } |
diff --git a/src/util/connection.c b/src/util/connection.c index 1e792adc8..f6182ebbd 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -1064,7 +1064,7 @@ RETRY: | |||
1064 | * | 1064 | * |
1065 | * @param connection connection handle | 1065 | * @param connection connection handle |
1066 | * @param max maximum number of bytes to read | 1066 | * @param max maximum number of bytes to read |
1067 | * @param timeout maximum amount of time to wait (use -1 for "forever") | 1067 | * @param timeout maximum amount of time to wait |
1068 | * @param receiver function to call with received data | 1068 | * @param receiver function to call with received data |
1069 | * @param receiver_cls closure for receiver | 1069 | * @param receiver_cls closure for receiver |
1070 | */ | 1070 | */ |
@@ -1076,6 +1076,7 @@ GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, size_t m | |||
1076 | { | 1076 | { |
1077 | GNUNET_assert ((GNUNET_SCHEDULER_NO_TASK == connection->read_task) && | 1077 | GNUNET_assert ((GNUNET_SCHEDULER_NO_TASK == connection->read_task) && |
1078 | (NULL == connection->receiver)); | 1078 | (NULL == connection->receiver)); |
1079 | GNUNET_assert (NULL != receiver); | ||
1079 | connection->receiver = receiver; | 1080 | connection->receiver = receiver; |
1080 | connection->receiver_cls = receiver_cls; | 1081 | connection->receiver_cls = receiver_cls; |
1081 | connection->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout); | 1082 | connection->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout); |