[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21977 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21977 - gnunet-gtk/src/fs |
Date: |
Wed, 13 Jun 2012 18:00:33 +0200 |
Author: grothoff
Date: 2012-06-13 18:00:33 +0200 (Wed, 13 Jun 2012)
New Revision: 21977
Modified:
gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
Log:
-check for possibility that GNUNET_FS_namespace_create fails (#2416)
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2012-06-13
16:00:14 UTC (rev 21976)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2012-06-13
16:00:33 UTC (rev 21977)
@@ -269,13 +269,20 @@
{
GtkListStore *ls = cls;
GtkTreeIter iter;
+ struct GNUNET_FS_Namespace *ns;
+ ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (),
+ name);
+ if (NULL == ns)
+ {
+ GNUNET_break (0);
+ return;
+ }
gtk_list_store_insert_with_values (ls, &iter, -1,
FS_SELECT_PSEUDONYM_NAMESPACE_MC_NAME,
name,
FS_SELECT_PSEUDONYM_NAMESPACE_MC_HANDLE,
- GNUNET_FS_namespace_create
(GNUNET_FS_GTK_get_fs_handle (),
- name),
+ ns,
-1);
}
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c 2012-06-13 16:00:14 UTC
(rev 21976)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_create-pseudonym.c 2012-06-13 16:00:33 UTC
(rev 21977)
@@ -55,7 +55,9 @@
if (NULL != name)
{
ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (), name);
- GNUNET_FS_namespace_delete (ns, GNUNET_NO);
+ GNUNET_break (NULL != ns);
+ if (NULL != ns)
+ GNUNET_FS_namespace_delete (ns, GNUNET_NO);
}
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (G_OBJECT (builder));
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-06-13 16:00:14 UTC
(rev 21976)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-06-13 16:00:33 UTC
(rev 21977)
@@ -2114,6 +2114,11 @@
uc.ts = ts;
uc.ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (), name);
uc.update_called = GNUNET_NO;
+ if (NULL == uc.ns)
+ {
+ GNUNET_break (0);
+ return;
+ }
gtk_tree_store_insert_with_values (ts, &iter, NULL, G_MAXINT,
PSEUDONYM_MC_LOCAL_NAME, name,
PSEUDONYM_MC_NAMESPACE_HANDLE, uc.ns,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21977 - gnunet-gtk/src/fs,
gnunet <=