/*
This file is part of GNUnet.
- Copyright (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009, 2010 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/fs_publish.c
pi.value.publish.eta = GNUNET_TIME_UNIT_FOREVER_REL;
pi.value.publish.specifics.error.message = emsg;
p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, 0);
- if ((p->is_directory != GNUNET_YES) && (p->filename != NULL) &&
+ if ((p->is_directory != GNUNET_YES) &&
+ (NULL != p->filename) &&
+ (GNUNET_YES == pc->any_done) &&
(p->data.file.do_index == GNUNET_YES))
{
/* run unindex to clean up */
- GNUNET_FS_unindex_start (pc->h, p->filename, NULL);
+ GNUNET_FS_unindex_start (pc->h,
+ p->filename,
+ NULL);
}
}
* the final result.
*
* @param cls our publishing context
- * @param tc scheduler's task context (not used)
*/
static void
-encode_cont (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+encode_cont (void *cls)
{
struct GNUNET_FS_PublishContext *pc = cls;
struct GNUNET_FS_FileInformation *p;
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Indexing block `%s' for offset %llu with index size %u\n",
- GNUNET_h2s (&chk->query), (unsigned long long) offset,
- sizeof (struct OnDemandBlock));
+ GNUNET_h2s (&chk->query),
+ (unsigned long long) offset,
+ (unsigned int) sizeof (struct OnDemandBlock));
odb.offset = GNUNET_htonll (offset);
odb.file_id = p->data.file.file_id;
GNUNET_assert (pc->qre == NULL);
* Main function that performs the upload.
*
* @param cls `struct GNUNET_FS_PublishContext *` identifies the upload
- * @param tc task context
*/
void
-GNUNET_FS_publish_main_ (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+GNUNET_FS_publish_main_ (void *cls)
{
struct GNUNET_FS_PublishContext *pc = cls;
struct GNUNET_FS_ProgressInfo pi;
* @param msg error message on error, otherwise NULL
*/
static void
-finish_reserve (void *cls, int success,
+finish_reserve (void *cls,
+ int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
pc->qre = NULL;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Reservation complete (%d)!\n", success);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Reservation complete (%d)!\n",
+ success);
if ((msg != NULL) || (success <= 0))
{
GNUNET_asprintf (&pc->fi->emsg,
- _("Insufficient space for publishing: %s"),
+ _("Datastore failure: %s"),
msg);
signal_publish_error (pc->fi, pc, pc->fi->emsg);
return;