summaryrefslogtreecommitdiff
path: root/backend/net.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:34 +0200
commit2b3e02411ecc09e7d41741b5587655c9b2f955b7 (patch)
treed839746371ecb8ed64ac81d2e37c11fcd25a00ac /backend/net.c
parent787fb1d54ec9ee5fb941ae897fb201feb9cb2fd1 (diff)
parentad38bc6ecb80ddeb562841b33258dd53659b1da6 (diff)
Update upstream source from tag 'upstream/1.0.31'
Update to upstream version '1.0.31' with Debian dir aa7a39fe56343f5e164eec83783f4c923a394865
Diffstat (limited to 'backend/net.c')
-rw-r--r--backend/net.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/backend/net.c b/backend/net.c
index df19192..4ad2e1b 100644
--- a/backend/net.c
+++ b/backend/net.c
@@ -67,7 +67,7 @@
#include <netinet/in.h>
#include <netdb.h> /* OS/2 needs this _after_ <netinet/in.h>, grrr... */
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
# include <avahi-client/client.h>
# include <avahi-client/lookup.h>
@@ -695,7 +695,7 @@ do_authorization (Net_Device * dev, SANE_String resource)
}
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
static void
net_avahi_resolve_callback (AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol,
AvahiResolverEvent event, const char *name, const char *type,
@@ -964,7 +964,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
first_device = NULL;
first_handle = NULL;
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
net_avahi_init ();
#endif /* WITH_AVAHI */
@@ -1044,12 +1044,12 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
continue;
}
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
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);
#endif /* WITH_AVAHI */
}
@@ -1095,12 +1095,12 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
if (host[0] == '\0')
continue;
#endif /* ENABLE_IPV6 */
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
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);
#endif /* WITH_AVAHI */
}
@@ -1132,7 +1132,7 @@ sane_exit (void)
DBG (1, "sane_exit: exiting\n");
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
net_avahi_cleanup ();
#endif /* WITH_AVAHI */
@@ -1518,11 +1518,11 @@ sane_open (SANE_String_Const full_name, SANE_Handle * meta_handle)
DBG (1,
"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);
#endif /* WITH_AVAHI */
status = add_device (nd_name, &dev);
-#ifdef WITH_AVAHI
+#if WITH_AVAHI
avahi_threaded_poll_unlock (avahi_thread);
#endif /* WITH_AVAHI */
if (status != SANE_STATUS_GOOD)