gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13597 - gnunet-gtk/src


From: gnunet
Subject: [GNUnet-SVN] r13597 - gnunet-gtk/src
Date: Sun, 7 Nov 2010 00:12:23 +0100

Author: grothoff
Date: 2010-11-07 00:12:23 +0100 (Sun, 07 Nov 2010)
New Revision: 13597

Modified:
   gnunet-gtk/src/fs_event_handler.c
   gnunet-gtk/src/main_window_file_publish.c
   gnunet-gtk/src/main_window_file_search.c
Log:
misc bugfixes

Modified: gnunet-gtk/src/fs_event_handler.c
===================================================================
--- gnunet-gtk/src/fs_event_handler.c   2010-11-06 21:27:07 UTC (rev 13596)
+++ gnunet-gtk/src/fs_event_handler.c   2010-11-06 23:12:23 UTC (rev 13597)
@@ -1371,7 +1371,7 @@
                                                        
EXTRACTOR_METATYPE_ALBUM,
                                                        
EXTRACTOR_METATYPE_COMMENT,
                                                        
EXTRACTOR_METATYPE_SUBJECT,
-                                                       
EXTRACTOR_METATYPE_KEYWORDS
+                                                       
EXTRACTOR_METATYPE_KEYWORDS,
                                                        -1);
   if (desc == NULL)
     desc = GNUNET_strdup (_("no description supplied"));
@@ -1571,7 +1571,7 @@
                                                        
EXTRACTOR_METATYPE_ALBUM,
                                                        
EXTRACTOR_METATYPE_COMMENT,
                                                        
EXTRACTOR_METATYPE_SUBJECT,
-                                                       
EXTRACTOR_METATYPE_KEYWORDS
+                                                       
EXTRACTOR_METATYPE_KEYWORDS,
                                                        -1);
   if (desc == NULL)
     desc = GNUNET_strdup (_("no description supplied"));
@@ -1668,11 +1668,12 @@
                 gpointer user_data)
 {
   struct PublishTab *tab = user_data;
+  struct GNUNET_FS_PublishContext *pc;
 
-  if (tab->pc != NULL)
+  if (NULL != (pc = tab->pc))
     {
-      GNUNET_FS_publish_stop (tab->pc);
       tab->pc = NULL;
+      GNUNET_FS_publish_stop (pc);
     }
 }
 

Modified: gnunet-gtk/src/main_window_file_publish.c
===================================================================
--- gnunet-gtk/src/main_window_file_publish.c   2010-11-06 21:27:07 UTC (rev 
13596)
+++ gnunet-gtk/src/main_window_file_publish.c   2010-11-06 23:12:23 UTC (rev 
13597)
@@ -680,10 +680,13 @@
     }
   ksk_uri = GNUNET_FS_uri_ksk_create_from_meta_data (meta);
   kill_ksk = GNUNET_FS_uri_ksk_create_from_meta_data (md_no_ksk);
-  GNUNET_FS_uri_ksk_get_keywords (kill_ksk,
-                                 &remove_keyword,
-                                 ksk_uri);
-  GNUNET_FS_uri_destroy (kill_ksk);
+  if (kill_ksk != NULL)
+    {
+      GNUNET_FS_uri_ksk_get_keywords (kill_ksk,
+                                     &remove_keyword,
+                                     ksk_uri);
+      GNUNET_FS_uri_destroy (kill_ksk);
+    }
   path = gtk_tree_model_get_path (GTK_TREE_MODEL (ts),
                                  iter);
   row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (ts),
@@ -698,16 +701,26 @@
       GNUNET_FS_uri_ksk_add_keyword (ksk_uri,
                                     GNUNET_FS_DIRECTORY_MIME,
                                     GNUNET_NO);
+      fi = GNUNET_FS_file_information_create_empty_directory 
(GNUNET_GTK_get_fs_handle (),
+                                                             row_reference,
+                                                             ksk_uri,
+                                                             meta,
+                                                             anonymity_level,
+                                                             priority,
+                                                             expiration);
     }
-  fi = GNUNET_FS_file_information_create_from_file (GNUNET_GTK_get_fs_handle 
(),
-                                                   row_reference,
-                                                   filename,
-                                                   ksk_uri,
-                                                   meta,
-                                                   do_index,
-                                                   anonymity_level,
-                                                   priority,
-                                                   expiration);
+  else
+    {
+      fi = GNUNET_FS_file_information_create_from_file 
(GNUNET_GTK_get_fs_handle (),
+                                                       row_reference,
+                                                       filename,
+                                                       ksk_uri,
+                                                       meta,
+                                                       do_index,
+                                                       anonymity_level,
+                                                       priority,
+                                                       expiration);
+    }
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_FS_uri_destroy (ksk_uri);
   if (S_ISDIR (sbuf.st_mode))

Modified: gnunet-gtk/src/main_window_file_search.c
===================================================================
--- gnunet-gtk/src/main_window_file_search.c    2010-11-06 21:27:07 UTC (rev 
13596)
+++ gnunet-gtk/src/main_window_file_search.c    2010-11-06 23:12:23 UTC (rev 
13597)
@@ -179,7 +179,7 @@
                                                               
EXTRACTOR_METATYPE_ALBUM,
                                                               
EXTRACTOR_METATYPE_COMMENT,
                                                               
EXTRACTOR_METATYPE_SUBJECT,
-                                                              
EXTRACTOR_METATYPE_KEYWORDS
+                                                              
EXTRACTOR_METATYPE_KEYWORDS,
                                                               -1);
   gtk_list_store_insert_with_values (ls,
                                     &iter,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]