summaryrefslogtreecommitdiff
path: root/debian/patches/0140-avahi.patch
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-30 14:19:47 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-30 14:19:47 +0200
commit1b9f323ebdbea2385c37bda49b75631e624e0f84 (patch)
treea6cd9229a617b3984eacf6a6539506caf859626c /debian/patches/0140-avahi.patch
parentf03fae67eab67a0f704fce47c7492264f391de62 (diff)
refresh patches
Diffstat (limited to 'debian/patches/0140-avahi.patch')
-rw-r--r--debian/patches/0140-avahi.patch53
1 files changed, 44 insertions, 9 deletions
diff --git a/debian/patches/0140-avahi.patch b/debian/patches/0140-avahi.patch
index ef35e1c..9c993b0 100644
--- a/debian/patches/0140-avahi.patch
+++ b/debian/patches/0140-avahi.patch
@@ -9,45 +9,80 @@ 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
+@@ -771,7 +771,7 @@ net_avahi_browse_callback (AvahiServiceB
+ {
+ case AVAHI_BROWSER_FAILURE:
+ DBG (1, "net_avahi_browse_callback: %s\n", avahi_strerror (avahi_client_errno (avahi_service_browser_get_client (b))));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ return;
+
+ case AVAHI_BROWSER_NEW:
+@@ -836,7 +836,7 @@ net_avahi_callback (AvahiClient *c, Avah
+ if (avahi_browser == NULL)
+ {
+ DBG (1, "net_avahi_callback: could not create service browser: %s\n", avahi_strerror (avahi_client_errno (c)));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ break;
+
+@@ -859,14 +859,14 @@ net_avahi_callback (AvahiClient *c, Avah
+ if (avahi_client == NULL)
+ {
+ DBG (1, "net_avahi_init: could not create Avahi client: %s\n", avahi_strerror (error));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ }
+ else
+ {
+ /* Another error happened - game over */
+ DBG (1, "net_avahi_callback: server connection failure: %s\n", avahi_strerror (error));
+- avahi_threaded_poll_quit (avahi_thread);
++ if (avahi_thread) avahi_threaded_poll_quit (avahi_thread);
+ }
+ break;
+ }
+@@ -1045,12 +1041,12 @@ sane_init (SANE_Int * version_code, SANE
continue;
}
- #ifdef WITH_AVAHI
+ #if 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
+ #if 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
+@@ -1096,12 +1092,12 @@ sane_init (SANE_Int * version_code, SANE
continue;
#endif /* ENABLE_IPV6 */
- #ifdef WITH_AVAHI
+ #if 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
+ #if 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,
+@@ -1519,11 +1520,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
+ #if 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
+ #if WITH_AVAHI
- avahi_threaded_poll_unlock (avahi_thread);
+ if (avahi_thread) avahi_threaded_poll_unlock (avahi_thread);
#endif /* WITH_AVAHI */