gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9574 - in GNUnet/src: setup/gtk util/network util/pseudony


From: gnunet
Subject: [GNUnet-SVN] r9574 - in GNUnet/src: setup/gtk util/network util/pseudonym
Date: Wed, 18 Nov 2009 05:47:40 -0700

Author: grothoff
Date: 2009-11-18 05:47:40 -0700 (Wed, 18 Nov 2009)
New Revision: 9574

Modified:
   GNUnet/src/setup/gtk/glade_support.c
   GNUnet/src/util/network/select.c
   GNUnet/src/util/pseudonym/names.c
Log:
fixes

Modified: GNUnet/src/setup/gtk/glade_support.c
===================================================================
--- GNUnet/src/setup/gtk/glade_support.c        2009-11-18 12:40:43 UTC (rev 
9573)
+++ GNUnet/src/setup/gtk/glade_support.c        2009-11-18 12:47:40 UTC (rev 
9574)
@@ -46,13 +46,15 @@
   mainXML_ = NULL;
 }
 
-char *
+static char *
 get_glade_filename ()
 {
   char *path;
   char *gladeFile;
 
   path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
+  if (path == NULL)
+    return NULL;
   gladeFile = GNUNET_malloc (strlen (path) + 20);
   strcpy (gladeFile, path);
   strcat (gladeFile, "gnunet-setup.glade");
@@ -85,6 +87,8 @@
   GladeXML *ret;
 
   gladeFile = get_glade_filename ();
+  if (gladeFile == NULL)
+    return NULL;
   ret = glade_xml_new (gladeFile, dialog_name, PACKAGE_NAME);
   if (ret == NULL)
     GNUNET_GE_DIE_STRERROR_FILE (NULL,
@@ -121,12 +125,24 @@
   GladeXML *myXML;
 
   gladeFile = get_glade_filename ();
+  if (gladeFile == NULL)
+    {
+      GNUNET_GE_LOG (NULL, 
+                    GNUNET_GE_USER | GNUNET_GE_ADMIN |
+                    GNUNET_GE_FATAL | GNUNET_GE_IMMEDIATE,
+                    _("Could not determine UI definition filename."));
+      GNUNET_GE_ASSERT (NULL, 0);
+      return;
+    }
   myXML = glade_xml_new (gladeFile, name, PACKAGE_NAME);
   if (mainXML_ == NULL)
-    GNUNET_GE_DIE_STRERROR_FILE (NULL,
-                                 GNUNET_GE_USER | GNUNET_GE_ADMIN |
-                                 GNUNET_GE_FATAL | GNUNET_GE_IMMEDIATE,
-                                 "open", gladeFile);
+    {
+      GNUNET_GE_DIE_STRERROR_FILE (NULL,
+                                  GNUNET_GE_USER | GNUNET_GE_ADMIN |
+                                  GNUNET_GE_FATAL | GNUNET_GE_IMMEDIATE,
+                                  "open", gladeFile);
+      return;
+    }
   GNUNET_free (gladeFile);
   glade_xml_signal_autoconnect_full (myXML, &connector, myXML);
   msgSave = glade_xml_get_widget (myXML, name);

Modified: GNUnet/src/util/network/select.c
===================================================================
--- GNUnet/src/util/network/select.c    2009-11-18 12:40:43 UTC (rev 9573)
+++ GNUnet/src/util/network/select.c    2009-11-18 12:47:40 UTC (rev 9574)
@@ -715,7 +715,6 @@
                              "Select %p is preparing to receive %u bytes from 
UDP\n",
                              sh, pending);
 #endif
-              GNUNET_GE_ASSERT (sh->ectx, pending >= 0);
               if (pending >= 65536)
                {
                   GNUNET_GE_LOG (sh->ectx, GNUNET_GE_WARNING | GNUNET_GE_BULK, 

Modified: GNUnet/src/util/pseudonym/names.c
===================================================================
--- GNUnet/src/util/pseudonym/names.c   2009-11-18 12:40:43 UTC (rev 9573)
+++ GNUnet/src/util/pseudonym/names.c   2009-11-18 12:47:40 UTC (rev 9574)
@@ -83,7 +83,7 @@
   len = 0;
   if (GNUNET_OK != GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES))
     {
-      GNUNET_break (0);
+      GNUNET_GE_BREAK (ectx, 0);
       return NULL;
     }
   fd = GNUNET_disk_file_open (ectx, fn, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);





reply via email to

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