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

@ -28,6 +28,7 @@
#include <ltdl.h>
/* dynamic link library stuff */
static char * libname = "libusb";
static lt_dlhandle dl_handle = NULL;
static const char *dl_error = NULL;
static int (*nut_usb_close)(usb_dev_handle *dev);
@ -57,7 +58,7 @@ int nutscan_load_usb_library()
return 0;
}
dl_handle = lt_dlopenext("libusb");
dl_handle = lt_dlopenext(libname);
if (!dl_handle) {
dl_error = lt_dlerror();
goto err;
@ -106,8 +107,9 @@ int nutscan_load_usb_library()
return 1;
err:
fprintf(stderr, "%s\n", dl_error);
fprintf(stderr, "Cannot load USB library (%s) : %s. USB search disabled.\n", libname, dl_error);
dl_handle = (void *)1;
lt_dlexit();
return 0;
}
/* end of dynamic link library stuff */