pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/mate-session-manager mate-session-manager: simplif...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f0bc3eaf0e4b
branches:  trunk
changeset: 330886:f0bc3eaf0e4b
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Thu Mar 07 01:26:46 2019 +0000

description:
mate-session-manager: simplify patch (NFCI)

I misconstrued a detail about systemd handling code elsewhere in the
file by over-thinking things, and introduced some redundancies here.

diffstat:

 x11/mate-session-manager/distinfo                                 |   4 +-
 x11/mate-session-manager/patches/patch-mate-session_gsm-systemd.c |  16 +++------
 2 files changed, 7 insertions(+), 13 deletions(-)

diffs (66 lines):

diff -r de0f5a54c069 -r f0bc3eaf0e4b x11/mate-session-manager/distinfo
--- a/x11/mate-session-manager/distinfo Wed Mar 06 22:04:55 2019 +0000
+++ b/x11/mate-session-manager/distinfo Thu Mar 07 01:26:46 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2019/03/06 08:14:33 gutteridge Exp $
+$NetBSD: distinfo,v 1.7 2019/03/07 01:26:46 gutteridge Exp $
 
 SHA1 (mate-session-manager-1.22.0.tar.xz) = f23b6cd78b5aa81052e10dde3e9504089a34278f
 RMD160 (mate-session-manager-1.22.0.tar.xz) = 1fbd9219b1da23f0117c80d1e483b64274ec5c00
 SHA512 (mate-session-manager-1.22.0.tar.xz) = 7e5e21e37c7ac55ca7d71302edef9aabeccf39233aec9edfe93a2fdcd4150d039e8121adecebb3d0a4a707eccef0c7afa1b54c5b52b57853242964c7506eeb9a
 Size (mate-session-manager-1.22.0.tar.xz) = 603016 bytes
-SHA1 (patch-mate-session_gsm-systemd.c) = 087b0d7de9b8f23ec0876d3c1d86d12aeb92f933
+SHA1 (patch-mate-session_gsm-systemd.c) = 9399fff5f15d883c60d4f9fef433f7d435883db2
diff -r de0f5a54c069 -r f0bc3eaf0e4b x11/mate-session-manager/patches/patch-mate-session_gsm-systemd.c
--- a/x11/mate-session-manager/patches/patch-mate-session_gsm-systemd.c Wed Mar 06 22:04:55 2019 +0000
+++ b/x11/mate-session-manager/patches/patch-mate-session_gsm-systemd.c Thu Mar 07 01:26:46 2019 +0000
@@ -1,22 +1,19 @@
-$NetBSD: patch-mate-session_gsm-systemd.c,v 1.2 2019/03/06 08:12:36 gutteridge Exp $
+$NetBSD: patch-mate-session_gsm-systemd.c,v 1.3 2019/03/07 01:26:46 gutteridge Exp $
 
 Deal with systemd-only function calls.
 
 --- mate-session/gsm-systemd.c.orig    2019-02-10 13:54:15.000000000 +0000
 +++ mate-session/gsm-systemd.c
-@@ -427,15 +427,25 @@ gsm_systemd_is_last_session_for_user (Gs
+@@ -427,15 +427,19 @@ gsm_systemd_is_last_session_for_user (Gs
          char **sessions = NULL;
          char *session = NULL;
          gboolean is_last_session;
 -        int ret, i;
-+        int ret = 0, i;
++        int ret = 1, i;
  
 +#ifdef HAVE_SYSTEMD
          ret = sd_pid_get_session (getpid (), &session);
 +#endif
-+
-+        if (session == NULL)
-+            return FALSE;
  
          if (ret != 0) {
                  return FALSE;
@@ -25,13 +22,10 @@
 +#ifdef HAVE_SYSTEMD
          ret = sd_uid_get_sessions (getuid (), FALSE, &sessions);
 +#endif
-+
-+        if (sessions == NULL)
-+            return FALSE;
  
          if (ret <= 0) {
                  free (session);
-@@ -450,7 +460,9 @@ gsm_systemd_is_last_session_for_user (Gs
+@@ -450,7 +454,9 @@ gsm_systemd_is_last_session_for_user (Gs
                  if (g_strcmp0 (sessions[i], session) == 0)
                          continue;
  
@@ -41,7 +35,7 @@
  
                  if (ret != 0)
                          continue;
-@@ -461,7 +473,9 @@ gsm_systemd_is_last_session_for_user (Gs
+@@ -461,7 +467,9 @@ gsm_systemd_is_last_session_for_user (Gs
                  }
                  free (state);
  



Home | Main Index | Thread Index | Old Index