gvfs r2046 - in trunk: . client



Author: alexl
Date: Thu Oct  9 10:21:03 2008
New Revision: 2046
URL: http://svn.gnome.org/viewvc/gvfs?rev=2046&view=rev

Log:
2008-10-09  Alexander Larsson  <alexl redhat com>

        * client/gdaemonfileinputstream.c:
        (run_sync_state_machine):
	Add some debug spew and avoid crashing in case of code not properly
	setting the GError, as reported on the list.



Modified:
   trunk/ChangeLog
   trunk/client/gdaemonfileinputstream.c

Modified: trunk/client/gdaemonfileinputstream.c
==============================================================================
--- trunk/client/gdaemonfileinputstream.c	(original)
+++ trunk/client/gdaemonfileinputstream.c	Thu Oct  9 10:21:03 2008
@@ -446,8 +446,14 @@
 	    }
 	  else
 	    {
+	      /* We got reports of this crashing with io_error NULL. That shouldn't
+		 happen, so try to spew some debug info and avoid crashing. */
+	      if (io_error == NULL)
+		g_warning ("run_sync_state_machine got error but no GError set. This should not happen. io_op was: %d\n",
+			   io_op);
 	      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-			   _("Error in stream protocol: %s"), io_error->message);
+			   _("Error in stream protocol: %s"),
+			   io_error ? io_error->message : "Unknown error");
 	      g_error_free (io_error);
 	      return FALSE;
 	    }



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