qe->h->active_blocks -= qe->blocks;
qe->run_time =
GNUNET_TIME_relative_add (qe->run_time,
- GNUNET_TIME_absolute_get_duration (qe->
- start_time));
+ GNUNET_TIME_absolute_get_duration
+ (qe->start_time));
GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe);
GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail,
qe->h->pending_tail, qe);
/**
* Destroy a top-level activity entry.
- *
+ *
* @param h global fs handle
* @param top top level activity entry
*/
* @param offset offset to read from; it is possible
* that the caller might need to go backwards
* a bit at times
- * @param max maximum number of bytes that should be
+ * @param max maximum number of bytes that should be
* copied to buf; readers are not allowed
* to provide less data unless there is an error;
* a value of "0" will be used at the end to allow
* @param offset offset to read from; it is possible
* that the caller might need to go backwards
* a bit at times
- * @param max maximum number of bytes that should be
+ * @param max maximum number of bytes that should be
* copied to buf; readers are not allowed
* to provide less data unless there is an error;
* a value of "0" will be used at the end to allow
* (for serialization/deserialization).
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param ent entity identifier (or emtpy string for the directory)
* @return NULL on error
*/
* parent operation.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param uni name of the parent operation
* @param ent entity identifier (or emtpy string for the directory)
* @return NULL on error
* Return a read handle for deserialization.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param ent entity identifier (or emtpy string for the directory)
* @return NULL on error
*/
* Return a write handle for serialization.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param ent entity identifier (or emtpy string for the directory)
* @return NULL on error
*/
* Return a write handle for serialization.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param uni name of parent
* @param ent entity identifier (or emtpy string for the directory)
* @return NULL on error
* Remove serialization/deserialization file from disk.
*
* @param h master context
- * @param ext component of the path
- * @param ent entity identifier
+ * @param ext component of the path
+ * @param ent entity identifier
*/
void
GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
* Remove serialization/deserialization file from disk.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param uni parent name
- * @param ent entity identifier
+ * @param ent entity identifier
*/
static void
remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext,
* Remove serialization/deserialization directory from disk.
*
* @param h master context
- * @param ext component of the path
- * @param uni unique name of parent
+ * @param ext component of the path
+ * @param uni unique name of parent
*/
void
GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
* the infromation
* @return NULL on error
*/
-static struct GNUNET_FS_FileInformation *deserialize_file_information (struct
- GNUNET_FS_Handle
- *h,
- const
- char
- *filename);
+static struct GNUNET_FS_FileInformation *
+deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename);
/**
* Given a serialization name (full absolute path), return the
* basename of the file (without the path), which must only
* consist of the 6 random characters.
- *
+ *
* @param fullname name to extract the basename from
* @return copy of the basename, NULL on error
*/
* is enabled and returns NULL if not.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @return NULL on errror
*/
static char *
* is enabled and returns NULL if not.
*
* @param h master context
- * @param ext component of the path
+ * @param ext component of the path
* @param uni name of parent
* @return NULL on errror
*/
(GNUNET_OK !=
GNUNET_BIO_write_string (wh,
(fi->data.dir.entries ==
- NULL) ? NULL : fi->data.dir.entries->
- serialization)))
+ NULL) ? NULL : fi->data.dir.
+ entries->serialization)))
{
GNUNET_break (0);
goto cleanup;
* on disk. Note that all internal FS-operations that change
* publishing structs should already call "sync" internally,
* so this function is likely not useful for clients.
- *
+ *
* @param pc the struct to sync
*/
void
* on disk. Note that all internal FS-operations that change
* publishing structs should already call "sync" internally,
* so this function is likely not useful for clients.
- *
+ *
* @param uc the struct to sync
*/
void
/**
* Serialize a download request.
- *
+ *
* @param wh the 'struct GNUNET_BIO_WriteHandle*'
* @param dr the 'struct DownloadRequest'
* @return GNUNET_YES on success, GNUNET_NO on error
/**
* Read a download request tree.
- *
+ *
* @param rh stream to read from
* @return value the 'struct DownloadRequest', NULL on error
*/
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) ||
(dr->num_children > CHK_PER_INODE) ||
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth == 0)
- && (dr->
- num_children
- > 0)) ||
+ &&
+ (dr->num_children
+ > 0)) ||
((dr->depth > 0) && (dr->num_children == 0)))
{
GNUNET_break (0);
* on disk. Note that all internal FS-operations that change
* publishing structs should already call "sync" internally,
* so this function is likely not useful for clients.
- *
+ *
* @param dc the struct to sync
*/
void
* on disk. Note that all internal FS-operations that change
* publishing structs should already call "sync" internally,
* so this function is likely not useful for clients.
- *
+ *
* @param sr the struct to sync
*/
void
* on disk. Note that all internal FS-operations that change
* publishing structs should already call "sync" internally,
* so this function is likely not useful for clients.
- *
+ *
* @param sc the struct to sync
*/
void
* @param search associated search
* @param serialization name under which the search was serialized
*/
-static void deserialize_download (struct GNUNET_FS_Handle *h,
- struct GNUNET_BIO_ReadHandle *rh,
- struct GNUNET_FS_DownloadContext *parent,
- struct GNUNET_FS_SearchResult *search,
- const char *serialization);
+static void
+deserialize_download (struct GNUNET_FS_Handle *h,
+ struct GNUNET_BIO_ReadHandle *rh,
+ struct GNUNET_FS_DownloadContext *parent,
+ struct GNUNET_FS_SearchResult *search,
+ const char *serialization);
/**
- * Deserialize a search.
+ * Deserialize a search.
*
* @param h overall context
* @param rh file to deserialize from
* @param psearch_result parent search result
* @param serialization name under which the search was serialized
*/
-static struct GNUNET_FS_SearchContext *deserialize_search (struct
- GNUNET_FS_Handle *h,
- struct
- GNUNET_BIO_ReadHandle
- *rh,
- struct
- GNUNET_FS_SearchResult
- *psearch_result,
- const char
- *serialization);
+static struct GNUNET_FS_SearchContext *
+deserialize_search (struct GNUNET_FS_Handle *h,
+ struct GNUNET_BIO_ReadHandle *rh,
+ struct GNUNET_FS_SearchResult *psearch_result,
+ const char *serialization);
/**
* resume the download (put it in the queue). Does this
* recursively for the top-level download and all child
* downloads.
- *
+ *
* @param dc download to resume
*/
static void
*
* @param sc search being resumed
*/
-static void signal_search_resume (struct GNUNET_FS_SearchContext *sc);
+static void
+signal_search_resume (struct GNUNET_FS_SearchContext *sc);
/**
*
* @param sc search context to free
*/
-static void free_search_context (struct GNUNET_FS_SearchContext *sc);
+static void
+free_search_context (struct GNUNET_FS_SearchContext *sc);
/**
/**
- * Deserialize a search.
+ * Deserialize a search.
*
* @param h overall context
* @param rh file to deserialize from
* Setup a connection to the file-sharing service.
*
* @param cfg configuration to use
- * @param client_name unique identifier for this client
+ * @param client_name unique identifier for this client
* @param upcb function to call to notify about FS actions
* @param upcb_cls closure for upcb
* @param flags specific attributes for fs-operations