Bug#337317: openct: ifdhandler doesn't find USB device

2005-11-04 Thread Jochen Schulz
Andreas Jellinghaus:

 could you please run
 strace -f  /etc/init.d/openct restart 21 |grep execve

execve(/etc/init.d/openct, [/etc/init.d/openct, restart], [/* 39 vars 
*/]) = 0
[pid 14599] execve(/usr/sbin/openct-control, [/usr/sbin/openct-control, 
shutdown], [/* 37 vars */]) = 0
[pid 14600] execve(/bin/sleep, [sleep, 1], [/* 37 vars */]) = 0
[pid 14603] execve(/usr/sbin/openct-control, [/usr/sbin/openct-control, 
init], [/* 37 vars */]) = 0
[pid 14604] execve(/usr/sbin/ifdhandler, [/usr/sbin/ifdhandler, -H, 
egate, /proc/bus/usb/1/5], [/* 37 vars */]) = 0

 please also show me ldd /usr/sbin/openct-control,
 and dpkg -l |grep libusb (maybe you have a strange libusb
 version).


# ldd /usr/sbin/openct-control
linux-gate.so.1 =  (0xe000)
libopenct.so.1 = /usr/lib/libopenct.so.1 (0xb7fba000)
libltdl.so.3 = /usr/lib/libltdl.so.3 (0xb7fb3000)
libdl.so.2 = /lib/tls/i686/cmov/libdl.so.2 (0xb7faf000)
libusb-0.1.so.4 = /lib/libusb-0.1.so.4 (0xb7fa7000)
libpthread.so.0 = /lib/tls/i686/cmov/libpthread.so.0 (0xb7f94000)
libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7e5c000)
/lib/ld-linux.so.2 (0xb7fd5000)

~# dpkg -l | grep libusb
ii  libusb-0.1-4   0.1.10a-22   userspace USB programming library


 the linux code in openct uses:
 snprintf(device, sizeof(device),
  /proc/bus/usb/%s/%s,
  bus-dirname, dev-filename);
 to set the file name. so most likely your libusb is broken.
 if you can confirm that, please report it to libusb, but 
 keep me cc:'ed.

Hm, don't know. Please prod me in the right direction. :)

J.
-- 
My medicine shelf is my altar.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Bug#337317: openct: ifdhandler doesn't find USB device

2005-11-04 Thread Andreas Jellinghaus
Am Freitag 04 November 2005 09:22 schrieb Jochen Schulz:
 execve(/etc/init.d/openct, [/etc/init.d/openct, restart], [/* 39 vars
 */]) = 0 [pid 14599] execve(/usr/sbin/openct-control,
 [/usr/sbin/openct-control, shutdown], [/* 37 vars */]) = 0 [pid 14600]
 execve(/bin/sleep, [sleep, 1], [/* 37 vars */]) = 0 [pid 14603]
 execve(/usr/sbin/openct-control, [/usr/sbin/openct-control, init],
 [/* 37 vars */]) = 0 [pid 14604] execve(/usr/sbin/ifdhandler,
 [/usr/sbin/ifdhandler, -H, egate, /proc/bus/usb/1/5], [/* 37 vars
 */]) = 0

thanks, that clearly shows openct-control hands the wrong parameter
to ifdhandler.

 ~# dpkg -l | grep libusb
 ii  libusb-0.1-4   0.1.10a-22   userspace USB programming library

that must be unstable or testing, on my debian sarge server I have
an older version.

  the linux code in openct uses:
  snprintf(device, sizeof(device),
   /proc/bus/usb/%s/%s,
   bus-dirname, dev-filename);
  to set the file name. so most likely your libusb is broken.
  if you can confirm that, please report it to libusb, but
  keep me cc:'ed.

 Hm, don't know. Please prod me in the right direction. :)

we need to reassign this bug:
old versions of libusb return as filename and dirname
the filename and dirname in /proc/bus/usb/
so that is fine. the new version returns a string with the
same integer, but not with the proper formatting, so it is
a libusb API breakage, and I think it was not intended
to break openct and other applications.

Regards, Andreas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#337317: openct: ifdhandler doesn't find USB device

2005-11-03 Thread Jochen Schulz
Package: openct
Version: 0.6.6-1
Severity: important

Hi!

ifdhandler (when run from the init script) fails to find my e-gate USB
connector although it is well supported. After plugging in the device, I
get:

# lsusb
[...]
Bus 1 Device 4: ID 0973:0001 Schlumberger

# /etc/init.d/openct restart
#  $ tail -3 /var/log/syslog
Nov  3 21:31:07 localhost ifdhandler[14437]: Unable to open USB device 
/proc/bus/usb/1/4: No such file or directory
Nov  3 21:31:07 localhost ifdhandler[14437]: /proc/bus/usb/1/4: initialization 
failed (driver egate)
Nov  3 21:31:07 localhost ifdhandler[14437]: unable to open reader 
egate@/proc/bus/usb/1/4

Obviously, ifdhandler doesn't format the numbers correctly:

# ifdhandler egate /proc/bus/usb/001/004

works well. I am not a C programmer, but I guess the source of the
problem is somewhere near line 328 in src/ifd/sys-linux.c. It looks like
a simple string formatting issue.

Jochen.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: LANG=en_US, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages openct depends on:
ii  adduser 3.77 Add and remove users and groups
ii  dpkg1.13.11.0.1  package maintenance system for Deb
ii  libc6   2.3.5-7  GNU C Library: Shared libraries an
ii  libltdl31.5.20-2 A system independent dlopen wrappe
ii  libopenct1  0.6.6-1  middleware framework for smart car
ii  libusb-0.1-42:0.1.10a-22 userspace USB programming library

Versions of packages openct recommends:
ii  udev [hotplug]0.071-1/dev/ and hotplug management daemo

-- no debconf information


signature.asc
Description: Digital signature


Bug#337317: openct: ifdhandler doesn't find USB device

2005-11-03 Thread Andreas Jellinghaus
could you please run
strace -f  /etc/init.d/openct restart 21 |grep execve

and let me know of the result? I installed debian openct 0.6.6-1
packages a minute ago, did that and the result is:
execve(/etc/init.d/openct, [/etc/init.d/openct, restart], [/* 32 vars 
*/]) = 0
[pid 23576] execve(/usr/sbin/openct-control, [/usr/sbin/openct-control, 
shutdown], [/* 31 vars */]) = 0
[pid 23577] execve(/bin/sleep, [sleep, 1], [/* 31 vars */]) = 0
[pid 23578] execve(/usr/sbin/openct-control, [/usr/sbin/openct-control, 
init], [/* 31 vars */]) = 0
[pid 23579] execve(/usr/sbin/ifdhandler, [/usr/sbin/ifdhandler, -H, 
egate, /proc/bus/usb/001/002], [/* 31 vars */]) = 0

i.e. everything is fine.

please also show me ldd /usr/sbin/openct-control,
and dpkg -l |grep libusb (maybe you have a strange libusb
version).

the linux code in openct uses:
snprintf(device, sizeof(device),
 /proc/bus/usb/%s/%s,
 bus-dirname, dev-filename);
to set the file name. so most likely your libusb is broken.
if you can confirm that, please report it to libusb, but 
keep me cc:'ed.

Regards, Andreas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]