From c681caf0b8e6f032b3703b54436fc53969aea598 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 4 May 2010 16:49:18 +0000 Subject: [PATCH] fixes --- src/fs/fs.c | 4 ++-- src/fs/fs_download.c | 11 +++++------ src/transport/plugin_transport_http.c | 17 ++++++++++------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/fs/fs.c b/src/fs/fs.c index 15fe86f71..5b3dd067a 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c @@ -2440,6 +2440,7 @@ deserialize_download (struct GNUNET_FS_Handle *h, cleanup: GNUNET_free_non_null (uris); GNUNET_free_non_null (dr); + GNUNET_free_non_null (emsg); free_download_context (dc); } @@ -2567,7 +2568,6 @@ deserialize_search_file (void *cls, char *ser; char *emsg; struct GNUNET_BIO_ReadHandle *rh; - struct GNUNET_FS_SearchContext *sc; ser = get_serialization_short_name (filename); rh = GNUNET_BIO_read_open (filename); @@ -2580,7 +2580,7 @@ deserialize_search_file (void *cls, } return GNUNET_OK; } - sc = deserialize_search (h, rh, NULL, ser); + (void) deserialize_search (h, rh, NULL, ser); GNUNET_free (ser); if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)) diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index c3ab514d9..6000130c0 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c @@ -305,12 +305,10 @@ schedule_block_download (struct GNUNET_FS_DownloadContext *dc, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); fh = NULL; if ( (dc->old_file_size > off) && - (dc->filename != NULL) ) - { - fh = GNUNET_DISK_file_open (dc->filename, - GNUNET_DISK_OPEN_READ, - GNUNET_DISK_PERM_NONE); - } + (dc->filename != NULL) ) + fh = GNUNET_DISK_file_open (dc->filename, + GNUNET_DISK_OPEN_READ, + GNUNET_DISK_PERM_NONE); if ( (fh != NULL) && (off == GNUNET_DISK_file_seek (fh, @@ -358,6 +356,7 @@ schedule_block_download (struct GNUNET_FS_DownloadContext *dc, { GNUNET_break_op (0); } + GNUNET_break (GNUNET_OK == GNUNET_DISK_file_close (fh)); return; } } diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index f706f8cb3..fdd7c7a01 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -287,14 +287,16 @@ accessHandlerCallback (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Daemon has an incoming `%s' request from \n",method); if ( 0 == strcmp (MHD_HTTP_METHOD_PUT, method) ) - { - /* PUT method here */ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Got PUT Request with size %u \n",upload_data_size); - - // GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# PUT requests"), 1, GNUNET_NO); - } + { + /* PUT method here */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Got PUT Request with size %u \n",upload_data_size); + + // GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# PUT requests"), 1, GNUNET_NO); + } if ( 0 == strcmp (MHD_HTTP_METHOD_GET, method) ) - + { + /* FIXME */ + } return MHD_YES; } @@ -346,6 +348,7 @@ libgnunet_plugin_transport_http_init (void *cls) _ ("Require valid port number for service `%s' in configuration!\n"), "transport-http"); + GNUNET_free (api); return NULL; } use_ipv6 = GNUNET_YES; -- 2.25.1