Copyright (C) 2001-2016 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
+ 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.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
int notify_in_flight;
cstate->send_task = NULL;
+ if (GNUNET_YES == cstate->in_destroy)
+ return;
pos = (const char *) cstate->msg;
len = ntohs (cstate->msg->size);
GNUNET_assert (cstate->msg_off < len);
struct ClientState *cstate = impl_state;
(void) mq;
+ if (NULL != cstate->dns_active)
+ {
+ GNUNET_RESOLVER_request_cancel (cstate->dns_active);
+ cstate->dns_active = NULL;
+ }
+ if (NULL != cstate->send_task)
+ {
+ GNUNET_SCHEDULER_cancel (cstate->send_task);
+ cstate->send_task = NULL;
+ }
+ if (NULL != cstate->retry_task)
+ {
+ GNUNET_SCHEDULER_cancel (cstate->retry_task);
+ cstate->retry_task = NULL;
+ }
if (GNUNET_SYSERR == cstate->in_destroy)
{
/* defer destruction */
cstate->mq = NULL;
return;
}
- if (NULL != cstate->dns_active)
- GNUNET_RESOLVER_request_cancel (cstate->dns_active);
- if (NULL != cstate->send_task)
- GNUNET_SCHEDULER_cancel (cstate->send_task);
if (NULL != cstate->recv_task)
+ {
GNUNET_SCHEDULER_cancel (cstate->recv_task);
- if (NULL != cstate->retry_task)
- GNUNET_SCHEDULER_cancel (cstate->retry_task);
- if (NULL != cstate->sock){
+ cstate->recv_task = NULL;
+ }
+ if (NULL != cstate->sock)
+ {
LOG (GNUNET_ERROR_TYPE_DEBUG,
"destroying socket: %p\n",
cstate->sock);
&unixpath)) &&
(0 < strlen (unixpath)))
ret = GNUNET_OK;
+ else if ((GNUNET_OK ==
+ GNUNET_CONFIGURATION_have_value (cfg,
+ service_name,
+ "UNIXPATH")))
+ {
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ service_name,
+ "UNIXPATH",
+ _("not a valid filename"));
+ return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */
+ }
GNUNET_free_non_null (unixpath);
#endif
GNUNET_assert (NULL == cstate->send_task);
cstate->msg = msg;
cstate->msg_off = 0;
- if (NULL == cstate->sock){
+ if (NULL == cstate->sock)
+ {
LOG (GNUNET_ERROR_TYPE_DEBUG,
"message of type %u waiting for socket\n",
ntohs(msg->type));
return; /* still waiting for connection */
- }
+ }
cstate->send_task
= GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
cstate->sock,