[Pkg-utopia-commits] r3720 - in /packages/unstable/avahi/debian: changelog patches/02_avahi_client.patch patches/series
sjoerd at users.alioth.debian.org
sjoerd at users.alioth.debian.org
Sun Aug 15 22:32:01 UTC 2010
Author: sjoerd
Date: Sun Aug 15 22:32:01 2010
New Revision: 3720
URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=3720
Log:
* Added debian/patches/02_avahi_client.patch:
- Let the client check if the daemon is already running instead of just
trying to start it, which doesn't work if there is no service file (the
service file is just meant for systems using system.d) (Closes: #590760)
Added:
packages/unstable/avahi/debian/patches/02_avahi_client.patch
Modified:
packages/unstable/avahi/debian/changelog
packages/unstable/avahi/debian/patches/series
Modified: packages/unstable/avahi/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/changelog?rev=3720&op=diff
==============================================================================
--- packages/unstable/avahi/debian/changelog (original)
+++ packages/unstable/avahi/debian/changelog Sun Aug 15 22:32:01 2010
@@ -1,3 +1,12 @@
+avahi (0.6.27-2) unstable; urgency=low
+
+ * Added debian/patches/02_avahi_client.patch:
+ - Let the client check if the daemon is already running instead of just
+ trying to start it, which doesn't work if there is no service file (the
+ service file is just meant for systems using system.d) (Closes: #590760)
+
+ -- Sjoerd Simons <sjoerd at debian.org> Sun, 15 Aug 2010 23:29:26 +0100
+
avahi (0.6.27-1) unstable; urgency=low
* New upstream release.
Added: packages/unstable/avahi/debian/patches/02_avahi_client.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/patches/02_avahi_client.patch?rev=3720&op=file
==============================================================================
--- packages/unstable/avahi/debian/patches/02_avahi_client.patch (added)
+++ packages/unstable/avahi/debian/patches/02_avahi_client.patch Sun Aug 15 22:32:01 2010
@@ -1,0 +1,69 @@
+From 55c732acd013b6ac979b6e1f5432a301481879ca Mon Sep 17 00:00:00 2001
+From: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
+Date: Sun, 15 Aug 2010 22:56:49 +0100
+Subject: [PATCH] Check if the deamon isn't already running
+
+---
+ avahi-client/client.c | 29 +++++++++++++++++++++++++----
+ 1 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/avahi-client/client.c b/avahi-client/client.c
+index be675ad..c7ece4a 100644
+--- a/avahi-client/client.c
++++ b/avahi-client/client.c
+@@ -478,6 +478,7 @@ static DBusConnection* avahi_dbus_bus_get(DBusError *error) {
+ AvahiClient *avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags, AvahiClientCallback callback, void *userdata, int *ret_error) {
+ AvahiClient *client = NULL;
+ DBusError error;
++ int daemon_running = 0;
+
+ avahi_init_i18n();
+
+@@ -560,12 +561,33 @@ AvahiClient *avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags,
+ if (dbus_error_is_set(&error))
+ goto fail;
+
+- if (!dbus_bus_start_service_by_name(client->bus, AVAHI_DBUS_NAME, 0, NULL, &error)) {
+
+- /* We free the error so its not set, that way the fail target
+- * will return the NO_DAEMON error rather than a DBUS error */
++ /* Check if the process already exists on the bus, otherwise try to start
++ * it. */
++ if (!dbus_bus_name_has_owner (client->bus, AVAHI_DBUS_NAME, &error)) {
++ dbus_error_free(&error);
++ daemon_running = 0;
++ } else {
++ daemon_running = 1;
++ }
++
++ if (!daemon_running &&
++ !dbus_bus_start_service_by_name(client->bus,
++ AVAHI_DBUS_NAME, 0, NULL, &error)) {
+ dbus_error_free(&error);
++ } else {
++ daemon_running = 1;
++ }
+
++ /* Re-check something else didn't start the daemon */
++ if (!daemon_running &&
++ !dbus_bus_name_has_owner (client->bus, AVAHI_DBUS_NAME, &error)) {
++ dbus_error_free(&error);
++ } else {
++ daemon_running = 1;
++ }
++
++ if (!daemon_running) {
+ if (!(flags & AVAHI_CLIENT_NO_FAIL)) {
+
+ if (ret_error)
+@@ -577,7 +599,6 @@ AvahiClient *avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags,
+ /* The user doesn't want this call to fail if the daemon is not
+ * available, so let's return succesfully */
+ client_set_state(client, AVAHI_CLIENT_CONNECTING);
+-
+ } else {
+
+ if (init_server(client, ret_error) < 0)
+--
+1.7.1
+
Modified: packages/unstable/avahi/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/patches/series?rev=3720&op=diff
==============================================================================
--- packages/unstable/avahi/debian/patches/series (original)
+++ packages/unstable/avahi/debian/patches/series Sun Aug 15 22:32:01 2010
@@ -1,2 +1,3 @@
# Debian patches for Avahi
01_avahi-daemon.conf.patch
+02_avahi_client.patch
More information about the Pkg-utopia-commits
mailing list