[evolution/gnome-2-32] Bug #644301 - Invalid GVariant format in NetworkManager module (cherry picked from commit 3712e3981b
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-32] Bug #644301 - Invalid GVariant format in NetworkManager module (cherry picked from commit 3712e3981b
- Date: Fri, 8 Apr 2011 15:17:17 +0000 (UTC)
commit 76647951b85363ded524bef501092efdb497b486
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 11 14:48:19 2011 +0100
Bug #644301 - Invalid GVariant format in NetworkManager module
(cherry picked from commit 3712e3981b2056401c57c981160c96ff931f612c)
modules/connman/evolution-connman.c | 4 +++-
.../network-manager/evolution-network-manager.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/modules/connman/evolution-connman.c b/modules/connman/evolution-connman.c
index 270f525..be392c6 100644
--- a/modules/connman/evolution-connman.c
+++ b/modules/connman/evolution-connman.c
@@ -107,7 +107,7 @@ connman_check_initial_state (EConnMan *extension)
response = g_dbus_connection_send_message_with_reply_sync (
extension->connection, message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
- if (response != NULL) {
+ if (response != NULL && !g_dbus_message_to_gerror (response, &error)) {
gchar *state = NULL;
GVariant *body = g_dbus_message_get_body (response);
@@ -118,6 +118,8 @@ connman_check_initial_state (EConnMan *extension)
g_warning ("%s: %s", G_STRFUNC, error ? error->message : "Unknown error");
if (error)
g_error_free (error);
+ if (response)
+ g_object_unref (response);
g_object_unref (message);
return;
}
diff --git a/modules/network-manager/evolution-network-manager.c b/modules/network-manager/evolution-network-manager.c
index 60cc0e8..3c85f1e 100644
--- a/modules/network-manager/evolution-network-manager.c
+++ b/modules/network-manager/evolution-network-manager.c
@@ -126,7 +126,7 @@ network_manager_check_initial_state (ENetworkManager *extension)
extension->connection, message,
G_DBUS_SEND_MESSAGE_FLAGS_NONE, 100, NULL, NULL, &error);
- if (response != NULL) {
+ if (response != NULL && !g_dbus_message_to_gerror (response, &error)) {
GVariant *body = g_dbus_message_get_body (response);
g_variant_get (body, "(u)", &state);
@@ -134,6 +134,8 @@ network_manager_check_initial_state (ENetworkManager *extension)
g_warning ("%s: %s", G_STRFUNC, error ? error->message : "Unknown error");
if (error)
g_error_free (error);
+ if (response)
+ g_object_unref (response);
g_object_unref (message);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]