fixes
authorChristian Grothoff <christian@grothoff.org>
Tue, 4 May 2010 16:49:18 +0000 (16:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 4 May 2010 16:49:18 +0000 (16:49 +0000)
src/fs/fs.c
src/fs/fs_download.c
src/transport/plugin_transport_http.c

index 15fe86f7123d6eeb92bc684b0760ee7a8fc64bfc..5b3dd067afbac42234a36a11f3d476b06d68a5c7 100644 (file)
@@ -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))
index c3ab514d96017f88d728667c12b07a9af0b55f2a..6000130c0f6a14853e829dd984c7a733cbad9f00 100644 (file)
@@ -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;
        }
     }
index f706f8cb39d843c829dd2d7d183e7a804e1cf239..fdd7c7a010490358c386137a667d26f6073b6e87 100644 (file)
@@ -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;