---- a/Makefile.am
-+++ b/Makefile.am
+Index: hplip-3.20.9/Makefile.am
+===================================================================
+--- hplip-3.20.9.orig/Makefile.am
++++ hplip-3.20.9/Makefile.am
@@ -71,7 +71,7 @@ else
libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
endif
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
---- a/scan/sane/hpaio.c
-+++ b/scan/sane/hpaio.c
-@@ -34,7 +34,6 @@
+Index: hplip-3.20.9/scan/sane/hpaio.c
+===================================================================
+--- hplip-3.20.9.orig/scan/sane/hpaio.c
++++ hplip-3.20.9/scan/sane/hpaio.c
+@@ -34,9 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <cups/cups.h>
#include "hpmud.h"
+-#include "avahiDiscovery.h"
#include "hp_ipp.h"
#include "soap.h"
-@@ -145,98 +144,6 @@ static int GetUriLine(char *buf, char *u
+ #include "soapht.h"
+@@ -146,98 +144,6 @@ static int GetUriLine(char *buf, char *u
return i;
}
static int AddDevice(char *uri)
{
struct hpmud_model_attributes ma;
-@@ -289,7 +196,6 @@ static int DevDiscovery(int localOnly)
+@@ -290,7 +196,6 @@ static int DevDiscovery(int localOnly)
char uri[HPMUD_LINE_SIZE];
char *tail = message;
int i, scan_type, cnt=0, total=0, bytes_read;
char* token = NULL;
enum HPMUD_RESULT stat;
-@@ -304,33 +210,6 @@ static int DevDiscovery(int localOnly)
+@@ -305,39 +210,6 @@ static int DevDiscovery(int localOnly)
total += AddDevice(uri);
}
- memset(message, 0, sizeof(message));
+ //memset(message, 0, sizeof(message));
- /* Look for Network Scan devices if localonly flag if FALSE. */
- if (!localOnly)
- {
- free(cups_printer);
-#ifdef HAVE_LIBNETSNMP
- /* Discover NW scanners using Bonjour*/
-- bytes_read = mdns_probe_nw_scanners(message, sizeof(message), &cnt);
-- token = strtok(message, ";");
-- while (token)
-- {
-- total += AddDevice(token);
-- token = strtok(NULL, ";");
+- //bytes_read = avahi_probe_nw_scanners();
+- if( (avahi_probe_nw_scanners() == AVAHI_STATUS_OK) && (aUriBuf != NULL) )
+- {
+- token = strtok(aUriBuf, ";");
+- while (token)
+- {
+- total += AddDevice(token);
+- token = strtok(NULL, ";");
+- }
+- free(aUriBuf);
+- aUriBuf = NULL;
- }
-#endif
- if(!total)
- SendScanEvent("hpaio:/net/HP_Scan_Devices?ip=1.1.1.1", EVENT_ERROR_NO_PROBED_DEVICES_FOUND);
- }
- }
-
+-
bugout:
return total;
+ }