aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-05-16 02:24:19 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-05-16 02:24:19 +0100
commitbd7a4f258643bf72d5e97f86f0f2272b381ed1ba (patch)
tree6419b35ae79bb7f9fa60da238d64a5e12d7885f1
parent260123716172d33f44bdc0e4e5422554d139215c (diff)
downloadlibphidget21-bd7a4f258643bf72d5e97f86f0f2272b381ed1ba.tar.gz
Imported Upstream version 2.1.8.20120514upstream/2.1.8.20120514
Diffstat (limited to '')
-rwxr-xr-xconfigure20
-rw-r--r--linux/cusblinux-1.0.c19
-rwxr-xr-xversion.sh2
3 files changed, 21 insertions, 20 deletions
diff --git a/configure b/configure
index 32e9e9d..d57ab46 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for Phidget21 C Library 2.1.8.20120507.
+# Generated by GNU Autoconf 2.64 for Phidget21 C Library 2.1.8.20120514.
#
# Report bugs to <support@phidgets.com>.
#
@@ -698,8 +698,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Phidget21 C Library'
PACKAGE_TARNAME='libphidget'
-PACKAGE_VERSION='2.1.8.20120507'
-PACKAGE_STRING='Phidget21 C Library 2.1.8.20120507'
+PACKAGE_VERSION='2.1.8.20120514'
+PACKAGE_STRING='Phidget21 C Library 2.1.8.20120514'
PACKAGE_BUGREPORT='support@phidgets.com'
PACKAGE_URL='www.phidgets.com'
@@ -1443,7 +1443,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Phidget21 C Library 2.1.8.20120507 to adapt to many kinds of systems.
+\`configure' configures Phidget21 C Library 2.1.8.20120514 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1513,7 +1513,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Phidget21 C Library 2.1.8.20120507:";;
+ short | recursive ) echo "Configuration of Phidget21 C Library 2.1.8.20120514:";;
esac
cat <<\_ACEOF
@@ -1623,7 +1623,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Phidget21 C Library configure 2.1.8.20120507
+Phidget21 C Library configure 2.1.8.20120514
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1901,7 +1901,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Phidget21 C Library $as_me 2.1.8.20120507, which was
+It was created by Phidget21 C Library $as_me 2.1.8.20120514, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -2709,7 +2709,7 @@ fi
# Define the identity of the package.
PACKAGE='libphidget'
- VERSION='2.1.8.20120507'
+ VERSION='2.1.8.20120514'
cat >>confdefs.h <<_ACEOF
@@ -12299,7 +12299,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Phidget21 C Library $as_me 2.1.8.20120507, which was
+This file was extended by Phidget21 C Library $as_me 2.1.8.20120514, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12355,7 +12355,7 @@ Phidget21 C Library home page: <www.phidgets.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-Phidget21 C Library config.status 2.1.8.20120507
+Phidget21 C Library config.status 2.1.8.20120514
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/linux/cusblinux-1.0.c b/linux/cusblinux-1.0.c
index 4b43b1d..204ef53 100644
--- a/linux/cusblinux-1.0.c
+++ b/linux/cusblinux-1.0.c
@@ -261,8 +261,8 @@ static int getLabelString(CPhidgetHandle phid, struct libusb_device_handle *hand
{
case LIBUSB_ERROR_TIMEOUT: //important case?
default:
- LOG(PHIDGET_LOG_INFO, "libusb_get_string_descriptor failed in CUSBGetDeviceCapabilities with error code: %d while reading label\
- - this probably just means the device doesn't support labels, so this is fine.", len);
+ LOG(PHIDGET_LOG_INFO, "libusb_get_string_descriptor failed in CUSBGetDeviceCapabilities with error code: %d while reading label"\
+ " - this probably just means the device doesn't support labels, so this is fine.", len);
}
phid->label[0]='\0';
return EPHIDGET_OK;
@@ -407,7 +407,7 @@ int CUSBBuildList(CPhidgetList **curList) {
}
}
- ssize_t cnt = libusb_get_device_list(NULL, &list);
+ ssize_t cnt = libusb_get_device_list(libusbContext, &list);
if(cnt < 0)
{
LOG(PHIDGET_LOG_ERROR, "libusb_get_device_list failed with error code: %d", cnt);
@@ -456,7 +456,7 @@ int CUSBBuildList(CPhidgetList **curList) {
//LOG(PHIDGET_LOG_DEBUG,"New Device: %s",(char *)Phid_DeviceName[Phid_Device_Def[i].pdd_did]);
libusb_device_handle *handle = NULL;
- if (libusb_open(device, &handle) == 0)
+ if ((ret = libusb_open(device, &handle)) == 0)
{
if (desc.bcdDevice < 0x100)
phid->deviceVersion = desc.bcdDevice * 100;
@@ -478,7 +478,6 @@ int CUSBBuildList(CPhidgetList **curList) {
if((ret = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, string, sizeof(string))) < 0)
{
LOG(PHIDGET_LOG_ERROR, "libusb_get_string_descriptor_ascii failed with error code: %d", ret);
- LOG(PHIDGET_LOG_INFO, "This usually means you need to run as root");
libusb_close(handle);
free(phid);
goto next;
@@ -505,6 +504,8 @@ int CUSBBuildList(CPhidgetList **curList) {
} //if(udev)
else
{
+ LOG(PHIDGET_LOG_WARNING, "libusb_open failed with error code: %d", ret);
+ LOG(PHIDGET_LOG_INFO, "This usually means you need to run as root, or install the udev rules.");
free(phid);
libusb_close(handle);
}
@@ -537,7 +538,7 @@ int CUSBOpenHandle(CPhidgetHandle phid)
int i, j,ret = EPHIDGET_OK;
libusb_device **list = NULL;
- ssize_t cnt = libusb_get_device_list(NULL, &list);
+ ssize_t cnt = libusb_get_device_list(libusbContext, &list);
if(cnt < 0)
{
@@ -565,7 +566,7 @@ int CUSBOpenHandle(CPhidgetHandle phid)
/* the vend/prod matches! */
libusb_device_handle *handle = NULL;
- if (libusb_open(device, &handle) == 0)
+ if ((ret = libusb_open(device, &handle)) == 0)
{
serial = -1;
if (desc.iSerialNumber) {
@@ -573,7 +574,6 @@ int CUSBOpenHandle(CPhidgetHandle phid)
if((ret = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, string, sizeof(string))) < 0)
{
LOG(PHIDGET_LOG_WARNING, "libusb_get_string_descriptor_ascii failed with error code: %d", ret);
- LOG(PHIDGET_LOG_INFO, "This usually means you need to run as root");
libusb_close(handle);
goto next;
}
@@ -643,8 +643,9 @@ int CUSBOpenHandle(CPhidgetHandle phid)
} /* udev open */
else
{
+ LOG(PHIDGET_LOG_WARNING, "libusb_open failed with error code: %d", ret);
+ LOG(PHIDGET_LOG_INFO, "This usually means you need to run as root, or install the udev rules.");
libusb_close(handle);
- LOG(PHIDGET_LOG_WARNING, "usb_open failed - bad permission or what?");
}
} /* vendor/product match */
} /* deviceID matches in table */
diff --git a/version.sh b/version.sh
index 34fc206..46ab9c2 100755
--- a/version.sh
+++ b/version.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-echo -n 2.1.8.20120507
+echo -n 2.1.8.20120514