NetworkManager r3731 - in trunk: . system-settings/src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3731 - in trunk: . system-settings/src
- Date: Fri, 6 Jun 2008 19:28:53 +0000 (UTC)
Author: dcbw
Date: Fri Jun 6 19:28:53 2008
New Revision: 3731
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3731&view=rev
Log:
2008-06-06 Dan Williams <dcbw redhat com>
* system-settings/src/nm-polkit-helpers.c
- (create_polkit_context): in PolicyKit 0.6, polkit_context_init() will
unref the context if the initialization fails; also avoid spew when
the error isn't set
Modified:
trunk/ChangeLog
trunk/system-settings/src/nm-polkit-helpers.c
Modified: trunk/system-settings/src/nm-polkit-helpers.c
==============================================================================
--- trunk/system-settings/src/nm-polkit-helpers.c (original)
+++ trunk/system-settings/src/nm-polkit-helpers.c Fri Jun 6 19:28:53 2008
@@ -86,10 +86,15 @@
polkit_context_set_io_watch_functions (global_context, pk_io_add_watch, pk_io_remove_watch);
err = NULL;
if (!polkit_context_init (global_context, &err)) {
- g_warning ("Cannot initialize libpolkit: %s", polkit_error_get_error_message (err));
- polkit_error_free (err);
+ g_warning ("Cannot initialize libpolkit: %s",
+ err ? polkit_error_get_error_message (err) : "unknown error");
+ if (err)
+ polkit_error_free (err);
+ /* PK 0.6's polkit_context_init() unrefs the global_context on failure */
+#if (POLKIT_VERSION_MAJOR == 0) && (POLKIT_VERSION_MINOR >= 7)
polkit_context_unref (global_context);
+#endif
global_context = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]