summaryrefslogtreecommitdiff
path: root/debian/patches/0140-avahi.patch
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
commit324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch)
treebd2d48a139bfbe869f4f49359b63097931a45e7b /debian/patches/0140-avahi.patch
parent2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff)
parent1edb02101a9306fc711cd422ed507d18165b1691 (diff)
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'debian/patches/0140-avahi.patch')
-rw-r--r--debian/patches/0140-avahi.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/0140-avahi.patch b/debian/patches/0140-avahi.patch
new file mode 100644
index 0000000..89ec3f1
--- /dev/null
+++ b/debian/patches/0140-avahi.patch
@@ -0,0 +1,54 @@
+Description: Avoid assertion failure when net_avahi_init failed
+Author: Andreas Henriksson <andreas@fatal.se>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861112
+Last-Update: 2017-06-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/backend/net.c
+===================================================================
+--- trunk.orig/backend/net.c
++++ trunk/backend/net.c
+@@ -1045,12 +1045,12 @@ sane_init (SANE_Int * version_code, SANE
+ continue;
+ }
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_lock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ DBG (2, "sane_init: trying to add %s\n", device_name);
+ add_device (device_name, 0);
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_unlock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ }
+
+@@ -1096,12 +1096,12 @@ sane_init (SANE_Int * version_code, SANE
+ continue;
+ #endif /* ENABLE_IPV6 */
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_lock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ DBG (2, "sane_init: trying to add %s\n", host);
+ add_device (host, 0);
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_unlock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ }
+ free (copy);
+@@ -1519,11 +1519,11 @@ sane_open (SANE_String_Const full_name,
+ "sane_open: device %s not found, trying to register it anyway\n",
+ nd_name);
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_lock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_lock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ status = add_device (nd_name, &dev);
+ #ifdef WITH_AVAHI
+- avahi_threaded_poll_unlock (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
+ #endif /* WITH_AVAHI */
+ if (status != SANE_STATUS_GOOD)
+ {