X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftransport%2Ftcp_connection_legacy.c;h=6ecf50b79666e92cc1e3b8b94c291e6a45397bfa;hb=5268a6fed72de00832cf075f480c03fe86952bb6;hp=5b219a467c1966d14332bfed33b53a625ced0f0b;hpb=aa98f144e6db0da5a0a4cad83fe64a80bbab6692;p=oweals%2Fgnunet.git diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c index 5b219a467..6ecf50b79 100644 --- a/src/transport/tcp_connection_legacy.c +++ b/src/transport/tcp_connection_legacy.c @@ -2,20 +2,20 @@ This file is part of GNUnet. Copyright (C) 2009-2013 GNUnet e.V. - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + SPDX-License-Identifier: AGPL3.0-or-later */ /** @@ -1218,8 +1218,10 @@ RETRY: * @param timeout maximum amount of time to wait * @param receiver function to call with received data * @param receiver_cls closure for @a receiver + * @return #GNUNET_SYSERR if @a connection died (receiver was + * called with error) */ -void +int GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, size_t max, struct GNUNET_TIME_Relative timeout, @@ -1241,7 +1243,7 @@ GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, connection->sock, &receive_ready, connection); - return; + return GNUNET_OK; } if ((NULL == connection->dns_active) && (NULL == connection->ap_head) && @@ -1252,8 +1254,9 @@ GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, NULL, 0, NULL, 0, ETIMEDOUT); - return; + return GNUNET_SYSERR; } + return GNUNET_OK; }