FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [linux-minidisc] "netmdcli send" does not break on errors

<-- thread -->
<-- date -->
  • From: Thomas Arp <manner.moe@gmx.de>
  • To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • Date: Fri, 23 Sep 2011 22:03:41 +0200
  • Resent-date: Fri, 23 Sep 2011 22:00:15 +0200
  • Resent-from: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • Resent-message-id: <20110923200015.GA3754@physik.fu-berlin.de>
  • Resent-sender: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • Resent-to: linux-minidisc@lists.fu-berlin.de
  • Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors

Am 23/09/2011 21:32, schrieb John Paul Adrian Glaubitz:
On Sep 23, 2011, at 9:32 PM, Thomas Arp wrote:

read is the return code from
libusb_bulk_transfer. So if return code is 0 which means no error,
data size of 0 will be written to the file and 0 will be added to the "done" variable.
We have to use the variable "transferred" to check the data size. So the code must look like this:

read = libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, (int)chunksize,&transferred, 10000);
         if (read>= 0) {
             done += (uint32_t)transferred;
             fwrite(data, (uint32_t)transferred, 1, file
);

This works, please change this. I do not make a patch because i am working on other changes and do not want to rebase yet.
Good point, thanks for finding this. I'm actually the one to blame for this change. It's
a result of the porting from libusb 0.0.1 to 1.0.0. I verified downloads to work, but
not uploads, since I don't have an MZ-RH1 lying around here.

You're definitely right.

I guess uploads didn't work before your fix then? (They shouldn't ;)).

Adrian

Yes, uploads didn´t work before.
But there seems to be another bug. vlc does not play the uploaded LP2 test track, an uploaded SP track plays fine in vlc. Maybe there is incompatible/incorrect data in the wav header? wav header and audio data seems to be stored correctly.

Thomas



<-- thread -->
<-- date -->
  • References:
    • [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Michael Karcher <Michael.Karcher@fu-berlin.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Michael Karcher <Michael.Karcher@fu-berlin.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.de>
    • Re: [linux-minidisc] "netmdcli send" does not break on errors
      • From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • linux-minidisc - September 2011 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal