Imported Upstream version 2.6.4

This commit is contained in:
Arnaud Quette 2012-06-01 15:55:19 +02:00
parent fad6ced6f6
commit fefe62b2bd
257 changed files with 6020 additions and 1394 deletions

View file

@ -33,6 +33,7 @@
#include <ltdl.h>
/* dynamic link library stuff */
static char * libname = "libneon";
static lt_dlhandle dl_handle = NULL;
static const char *dl_error = NULL;
@ -63,7 +64,7 @@ int nutscan_load_neon_library()
return 0;
}
dl_handle = lt_dlopenext("libneon");
dl_handle = lt_dlopenext(libname);
if (!dl_handle) {
dl_error = lt_dlerror();
goto err;
@ -93,8 +94,9 @@ int nutscan_load_neon_library()
return 1;
err:
fprintf(stderr, "%s\n", dl_error);
fprintf(stderr, "Cannot load XML library (%s) : %s. XML search disabled.\n", libname, dl_error);
dl_handle = (void *)1;
lt_dlexit();
return 0;
}
@ -210,7 +212,7 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout)
ne_xml_parser *parser = (*nut_ne_xml_create)();
(*nut_ne_xml_push_handler)(parser, startelm_cb,
NULL, NULL, nut_dev);
(*nut_ne_xml_parse)(parser, buf, strlen(buf));
(*nut_ne_xml_parse)(parser, buf, recv_size);
(*nut_ne_xml_destroy)(parser);
nut_dev->driver = strdup("netxml-ups");