Gentoo Archives: gentoo-commits

From: "Romain Perier (mrpouet)" <mrpouet@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-session/files: gnome-session-2.26.2-xsmp-stop-throw-error.patch
Date: Thu, 29 Oct 2009 11:11:21
Message-Id: E1N3SuU-0005eg-Vc@stork.gentoo.org
1 mrpouet 09/10/29 11:11:18
2
3 Added: gnome-session-2.26.2-xsmp-stop-throw-error.patch
4 Log:
5 Fix bug #271023, Do not crash when xsmp->priv->conn is NULL for a given GsmXsmpClient, when SMS connection dies. Import from 2.28 dev cycle, new revision.
6 (Portage version: 2.2_rc46/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 gnome-base/gnome-session/files/gnome-session-2.26.2-xsmp-stop-throw-error.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-session/files/gnome-session-2.26.2-xsmp-stop-throw-error.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-session/files/gnome-session-2.26.2-xsmp-stop-throw-error.patch?rev=1.1&content-type=text/plain
13
14 Index: gnome-session-2.26.2-xsmp-stop-throw-error.patch
15 ===================================================================
16 From: Romain Perier <mrpouet@g.o>
17 Date: Wed, 28 Oct 2009 17:20:04 +0100
18 Subject: Avoid a SIGSEGV in xsmp_stop() when the SmsConn object is NULL, in this case we must throw an GError (imported from 2.28 dev cycle)
19
20 When xsmp->priv->conn is NULL in xsmp_end_session() for a given GsmXsmpClient object, it implies
21 that this same object in xsmp_stop() will also have a NULL SmsConn field.
22
23 ---
24 gnome-session/gsm-xsmp-client.c | 7 +++++++
25 1 files changed, 7 insertions(+), 0 deletions(-)
26
27 --- a/gnome-session/gsm-xsmp-client.c
28 +++ b/gnome-session/gsm-xsmp-client.c
29 @@ -702,6 +702,13 @@ xsmp_stop (GsmClient *client,
30
31 g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description);
32
33 + if (xsmp->priv->conn == NULL) {
34 + g_set_error (error,
35 + GSM_CLIENT_ERROR,
36 + GSM_CLIENT_ERROR_NOT_REGISTERED,
37 + "Client is not registered");
38 + return FALSE;
39 + }
40 SmsDie (xsmp->priv->conn);
41
42 return TRUE;