[gnome-session] [gsm] Check that the XSMP connection exists when stopping a client
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-session] [gsm] Check that the XSMP connection exists when stopping a client
- Date: Wed, 27 Jan 2010 15:30:22 +0000 (UTC)
commit b2214df90d82cf5b588858b1a145e26d0f7c8b87
Author: Romain Perier <mrpouet gentoo org>
Date: Wed Jan 27 16:18:34 2010 +0100
[gsm] Check that the XSMP connection exists when stopping a client
While this should never happen, it currently happens in some cases. A
complete fix will come later, but this change doesn't hurt and is
consistant with what is already done in other functions.
Helps with https://bugzilla.gnome.org/show_bug.cgi?id=598211
gnome-session/gsm-xsmp-client.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/gsm-xsmp-client.c b/gnome-session/gsm-xsmp-client.c
index bc3f77e..8ba1eb7 100644
--- a/gnome-session/gsm-xsmp-client.c
+++ b/gnome-session/gsm-xsmp-client.c
@@ -713,6 +713,14 @@ xsmp_stop (GsmClient *client,
g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description);
+ if (xsmp->priv->conn == NULL) {
+ g_set_error (error,
+ GSM_CLIENT_ERROR,
+ GSM_CLIENT_ERROR_NOT_REGISTERED,
+ "Client is not registered");
+ return FALSE;
+ }
+
SmsDie (xsmp->priv->conn);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]