aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf /src/fs/fs_api.c
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
downloadgnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz
gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip
-remove trailing whitespace
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r--src/fs/fs_api.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index c2e2ada3e..04057bc98 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -211,8 +211,8 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
211 /* stop probes if possible */ 211 /* stop probes if possible */
212 num_probes_change = - num_probes_active; 212 num_probes_change = - num_probes_active;
213 num_downloads_change = h->max_parallel_requests - h->active_downloads; 213 num_downloads_change = h->max_parallel_requests - h->active_downloads;
214 } 214 }
215 else 215 else
216 { 216 {
217 /* start all downloads */ 217 /* start all downloads */
218 num_downloads_change = num_downloads_waiting; 218 num_downloads_change = num_downloads_waiting;
@@ -220,7 +220,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
220 num_probes_change = GNUNET_MIN (num_probes_waiting, 220 num_probes_change = GNUNET_MIN (num_probes_waiting,
221 h->max_parallel_requests - (h->active_downloads + num_downloads_waiting)); 221 h->max_parallel_requests - (h->active_downloads + num_downloads_waiting));
222 } 222 }
223 223
224 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 224 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
225 "Changing %d probes and %d downloads\n", 225 "Changing %d probes and %d downloads\n",
226 num_probes_change, 226 num_probes_change,
@@ -232,7 +232,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
232 next = qe->next; 232 next = qe->next;
233 if (GNUNET_FS_QUEUE_PRIORITY_PROBE != qe->priority) 233 if (GNUNET_FS_QUEUE_PRIORITY_PROBE != qe->priority)
234 continue; 234 continue;
235 if (num_probes_change < 0) 235 if (num_probes_change < 0)
236 { 236 {
237 stop_job (qe); 237 stop_job (qe);
238 num_probes_change++; 238 num_probes_change++;
@@ -266,7 +266,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
266 ( (qe->blocks + h->active_blocks <= h->max_parallel_requests) || 266 ( (qe->blocks + h->active_blocks <= h->max_parallel_requests) ||
267 ( (qe->blocks > h->max_parallel_requests) && 267 ( (qe->blocks > h->max_parallel_requests) &&
268 (0 == h->active_downloads) ) ) ) 268 (0 == h->active_downloads) ) ) )
269 { 269 {
270 start_job (qe); 270 start_job (qe);
271 num_downloads_change--; 271 num_downloads_change--;
272 } 272 }
@@ -284,7 +284,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
285 "AD: %u, MP: %u; %d probes and %d downloads to start, will run again in %s\n", 285 "AD: %u, MP: %u; %d probes and %d downloads to start, will run again in %s\n",
286 h->active_downloads, 286 h->active_downloads,
287 h->max_parallel_requests, 287 h->max_parallel_requests,
288 num_probes_change, 288 num_probes_change,
289 num_downloads_change, 289 num_downloads_change,
290 GNUNET_STRINGS_relative_time_to_string (restart_at, GNUNET_YES)); 290 GNUNET_STRINGS_relative_time_to_string (restart_at, GNUNET_YES));
@@ -467,7 +467,7 @@ GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, size_t max, void *buf,
467 return 0; 467 return 0;
468 } 468 }
469 } 469 }
470 if ( (GNUNET_SYSERR == 470 if ( (GNUNET_SYSERR ==
471 GNUNET_DISK_file_seek (fi->fd, offset, GNUNET_DISK_SEEK_SET)) || 471 GNUNET_DISK_file_seek (fi->fd, offset, GNUNET_DISK_SEEK_SET)) ||
472 (-1 == (ret = GNUNET_DISK_file_read (fi->fd, buf, max))) ) 472 (-1 == (ret = GNUNET_DISK_file_read (fi->fd, buf, max))) )
473 { 473 {
@@ -1398,7 +1398,7 @@ cleanup:
1398 * @return NULL if srch was not found in this subtree 1398 * @return NULL if srch was not found in this subtree
1399 */ 1399 */
1400static struct GNUNET_FS_FileInformation * 1400static struct GNUNET_FS_FileInformation *
1401find_file_position (struct GNUNET_FS_FileInformation *pos, 1401find_file_position (struct GNUNET_FS_FileInformation *pos,
1402 const char *srch) 1402 const char *srch)
1403{ 1403{
1404 struct GNUNET_FS_FileInformation *r; 1404 struct GNUNET_FS_FileInformation *r;
@@ -1409,7 +1409,7 @@ find_file_position (struct GNUNET_FS_FileInformation *pos,
1409 return pos; 1409 return pos;
1410 if ( (GNUNET_YES == pos->is_directory) && 1410 if ( (GNUNET_YES == pos->is_directory) &&
1411 (NULL != (r = find_file_position (pos->data.dir.entries, srch))) ) 1411 (NULL != (r = find_file_position (pos->data.dir.entries, srch))) )
1412 return r; 1412 return r;
1413 pos = pos->next; 1413 pos = pos->next;
1414 } 1414 }
1415 return NULL; 1415 return NULL;
@@ -1556,7 +1556,7 @@ deserialize_publish_file (void *cls, const char *filename)
1556 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 1556 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task);
1557 pc->upload_task = 1557 pc->upload_task =
1558 GNUNET_SCHEDULER_add_with_priority 1558 GNUNET_SCHEDULER_add_with_priority
1559 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 1559 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
1560 &GNUNET_FS_publish_main_, pc); 1560 &GNUNET_FS_publish_main_, pc);
1561 } 1561 }
1562 if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)) 1562 if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
@@ -2031,8 +2031,8 @@ cleanup:
2031 if (NULL != wh) 2031 if (NULL != wh)
2032 (void) GNUNET_BIO_write_close (wh); 2032 (void) GNUNET_BIO_write_close (wh);
2033 remove_sync_file_in_dir (sr->h, 2033 remove_sync_file_in_dir (sr->h,
2034 (NULL == sr->sc->psearch_result) 2034 (NULL == sr->sc->psearch_result)
2035 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH 2035 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
2036 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, 2036 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
2037 sr->sc->serialization, sr->serialization); 2037 sr->sc->serialization, sr->serialization);
2038 GNUNET_free (sr->serialization); 2038 GNUNET_free (sr->serialization);
@@ -2057,8 +2057,8 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc)
2057 const char *category; 2057 const char *category;
2058 2058
2059 category = 2059 category =
2060 (NULL == sc->psearch_result) 2060 (NULL == sc->psearch_result)
2061 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH 2061 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
2062 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH; 2062 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH;
2063 if (NULL == sc->serialization) 2063 if (NULL == sc->serialization)
2064 sc->serialization = make_serialization_file_name (sc->h, category); 2064 sc->serialization = make_serialization_file_name (sc->h, category);
@@ -2163,7 +2163,7 @@ deserialize_unindex_file (void *cls, const char *filename)
2163 { 2163 {
2164 GNUNET_break (0); 2164 GNUNET_break (0);
2165 goto cleanup; 2165 goto cleanup;
2166 } 2166 }
2167 uc->state = (enum UnindexState) state; 2167 uc->state = (enum UnindexState) state;
2168 switch (state) 2168 switch (state)
2169 { 2169 {
@@ -2316,8 +2316,8 @@ deserialize_search_result (void *cls, const char *filename)
2316 if (NULL != ser) 2316 if (NULL != ser)
2317 { 2317 {
2318 remove_sync_file_in_dir (sc->h, 2318 remove_sync_file_in_dir (sc->h,
2319 (NULL == sc->psearch_result) 2319 (NULL == sc->psearch_result)
2320 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH 2320 ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
2321 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, 2321 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
2322 sc->serialization, ser); 2322 sc->serialization, ser);
2323 GNUNET_free (ser); 2323 GNUNET_free (ser);