[SCM] ladish/master: Add patch to avoid gladish crash when DBus connection has failed.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Wed Sep 17 08:19:17 UTC 2014


The following commit has been merged in the master branch:
commit c6cb96301a173f1349caf03a5665f10c23ff9a50
Author: Alessio Treglia <alessio at debian.org>
Date:   Wed Sep 17 09:12:14 2014 +0100

    Add patch to avoid gladish crash when DBus connection has failed.

diff --git a/debian/patches/0003-dont_crash_when_dbus_fail.patch b/debian/patches/0003-dont_crash_when_dbus_fail.patch
new file mode 100644
index 0000000..93890b1
--- /dev/null
+++ b/debian/patches/0003-dont_crash_when_dbus_fail.patch
@@ -0,0 +1,88 @@
+Origin: https://github.com/LADI/ladish/commit/5fe205f2dc5
+From: Nedko Arnaudov <nedko at arnaudov.name>
+Description: gladish: don't crash when unable connect to dbus
+---
+ gui/dbus.c     |    9 +++++----
+ gui/internal.h |    4 ++--
+ gui/main.c     |    7 +++++--
+ 3 files changed, 12 insertions(+), 8 deletions(-)
+
+--- ladish.orig/gui/dbus.c
++++ ladish/gui/dbus.c
+@@ -2,7 +2,7 @@
+ /*
+  * LADI Session Handler (ladish)
+  *
+- * Copyright (C) 2010,2011 Nedko Arnaudov <nedko at arnaudov.name>
++ * Copyright (C) 2010,2011,2014 Nedko Arnaudov <nedko at arnaudov.name>
+  *
+  **************************************************************************
+  * This file contains D-Bus related code
+@@ -28,7 +28,7 @@
+ #include "../cdbus/helpers.h"
+ #include <dbus/dbus-glib-lowlevel.h>
+ 
+-void dbus_init(void)
++bool dbus_init(void)
+ {
+   dbus_error_init(&cdbus_g_dbus_error);
+ 
+@@ -36,12 +36,13 @@ void dbus_init(void)
+   cdbus_g_dbus_connection = dbus_bus_get(DBUS_BUS_SESSION, &cdbus_g_dbus_error);
+   if (dbus_error_is_set(&cdbus_g_dbus_error))
+   {
+-    //error_msg("dbus_bus_get() failed");
+-    //error_msg(cdbus_g_dbus_error.message);
++    log_error("Cannot connect to session bus: %s", cdbus_g_dbus_error.message);
+     dbus_error_free(&cdbus_g_dbus_error);
++    return false;
+   }
+ 
+   dbus_connection_setup_with_g_main(cdbus_g_dbus_connection, NULL);
++  return true;
+ }
+ 
+ void dbus_uninit(void)
+--- ladish.orig/gui/internal.h
++++ ladish/gui/internal.h
+@@ -2,7 +2,7 @@
+ /*
+  * LADI Session Handler (ladish)
+  *
+- * Copyright (C) 2010 Nedko Arnaudov <nedko at arnaudov.name>
++ * Copyright (C) 2010,2014 Nedko Arnaudov <nedko at arnaudov.name>
+  *
+  **************************************************************************
+  * This file contains declarations of internal stuff used to glue gui modules together
+@@ -30,7 +30,7 @@
+ #include "common.h"
+ 
+ /* dbus.c */
+-void dbus_init(void);
++bool dbus_init(void);
+ void dbus_uninit(void);
+ 
+ /* control.c */
+--- ladish.orig/gui/main.c
++++ ladish/gui/main.c
+@@ -2,7 +2,7 @@
+ /*
+  * LADI Session Handler (ladish)
+  *
+- * Copyright (C) 2008,2009,2010,2011 Nedko Arnaudov <nedko at arnaudov.name>
++ * Copyright (C) 2008,2009,2010,2011,2014 Nedko Arnaudov <nedko at arnaudov.name>
+  *
+  **************************************************************************
+  * This file contains the code that implements main() and other top-level functionality
+@@ -92,7 +92,10 @@ int main(int argc, char** argv)
+ 
+   gtk_init(&argc, &argv);
+ 
+-  dbus_init();
++  if (!dbus_init())
++  {
++    return 1;
++  }
+ 
+   if (!conf_proxy_init())
+   {
diff --git a/debian/patches/series b/debian/patches/series
index 23076f0..30787da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0001-misspelling.patch
 0002-new_laditools.patch
 eglibc-2.17.patch
+0003-dont_crash_when_dbus_fail.patch

-- 
ladish packaging



More information about the pkg-multimedia-commits mailing list