/*
This file is part of GNUnet.
- Copyright (C) 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011 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
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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @file fs/gnunet-service-fs_lc.c
* Free the given client request.
*
* @param cls the client request to free
- * @param tc task context
*/
static void
-client_request_destroy (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+client_request_destroy (void *cls)
{
struct ClientRequest *cr = cls;
struct GSF_LocalClient *lc;
cr->kill_task = NULL;
lc = cr->lc;
- GNUNET_CONTAINER_DLL_remove (lc->cr_head, lc->cr_tail, cr);
- GSF_pending_request_cancel_ (cr->pr, GNUNET_YES);
+ GNUNET_CONTAINER_DLL_remove (lc->cr_head,
+ lc->cr_tail,
+ cr);
+ GSF_pending_request_cancel_ (cr->pr,
+ GNUNET_YES);
GNUNET_STATISTICS_update (GSF_stats,
- gettext_noop ("# client searches active"), -1,
+ gettext_noop ("# client searches active"),
+ -1,
GNUNET_NO);
GNUNET_free (cr);
}
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queued reply to query `%s' for local client\n",
- GNUNET_h2s (&prd->query), (unsigned int) prd->type);
+ GNUNET_h2s (&prd->query));
if (GNUNET_BLOCK_EVALUATION_OK_LAST != eval)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
return GNUNET_SYSERR;
}
GNUNET_STATISTICS_update (GSF_stats,
- gettext_noop ("# client searches received"), 1,
+ gettext_noop ("# client searches received"),
+ 1,
GNUNET_NO);
sc = (msize - sizeof (struct SearchMessage)) / sizeof (struct GNUNET_HashCode);
sm = (const struct SearchMessage *) message;
(SEARCH_MESSAGE_OPTION_CONTINUED was always set) and that have a
matching query and type */
if ((GNUNET_YES != prd->has_started) &&
- (0 != memcmp (&prd->query, &sm->query, sizeof (struct GNUNET_HashCode))) &&
+ (0 != memcmp (&prd->query,
+ &sm->query,
+ sizeof (struct GNUNET_HashCode))) &&
(prd->type == type))
break;
cr = cr->next;
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Have existing request, merging content-seen lists.\n");
- GSF_pending_request_update_ (cr->pr, (const struct GNUNET_HashCode *) &sm[1], sc);
+ GSF_pending_request_update_ (cr->pr,
+ (const struct GNUNET_HashCode *) &sm[1],
+ sc);
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# client searches updated (merged content seen list)"),
GNUNET_NO);
cr = GNUNET_new (struct ClientRequest);
cr->lc = lc;
- GNUNET_CONTAINER_DLL_insert (lc->cr_head, lc->cr_tail, cr);
+ GNUNET_CONTAINER_DLL_insert (lc->cr_head,
+ lc->cr_tail,
+ cr);
options = GSF_PRO_LOCAL_REQUEST;
if (0 != (SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY & ntohl (sm->options)))
options |= GSF_PRO_LOCAL_ONLY;
{
if (NULL != cr->kill_task)
GNUNET_SCHEDULER_cancel (cr->kill_task);
- client_request_destroy (cr, NULL);
+ client_request_destroy (cr);
}
while (NULL != (res = pos->res_head))
{