gnome-session/xsmp-stop.patch
2009-11-02 05:06:56 +00:00

22 lines
936 B
Diff

diff -up gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c
--- gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c.xsmp-stop 2009-10-23 10:47:51.555179151 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-xsmp-client.c 2009-10-23 10:47:10.255456283 -0400
@@ -713,6 +713,17 @@ xsmp_stop (GsmClient *client,
g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description);
+ /*FIXME: What do we do if the client can't be stoped ?
+ * (probably a cleaner solution exists...)
+ */
+ 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;