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: linux-minidisc@lists.fu-berlin.de
  • Date: Fri, 16 Sep 2011 23:31:09 +0200
  • Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors

Am 16/09/2011 22:34, schrieb Thomas Arp:
Hi,
i accidently used a write protected minidisc and a dics with no space left to test netmd download with netmdcli.
The netmdcli send routine does not check if the dics is write prtected or if there is enough space left.
In both cases netmd_secure_send_track(...) fails with "unknown error" but the code doesn´t break.
It tries to set the disc title to the track number from the variable "uint16_t track" which is uninitialized.
In my case trying to set the title for track number 52, but there are only 15 tracks on the disc.
Also it tries to commit a track which is not written.

I think we have to implement some more checking routines before trying to transmit a track:
1. check if disc is write protected
2. calculate the space needed for the track and check if there is enough space left on the disc
3. if netmd_secure_send_track(..) fails, don´t try to set title and commit track, just cleanup/leave secure session and exit

I temporarily edited the output messages to check which commands causes errors.
Downloading to a write protected disc looks like this:

F:\minidisc\linux-minidisc\netmdcli\debug>netmdcli send LP2.wav
Net MD/Hi-MD
Sony MZ-RH1
Raw title: PEARL JAM ALIVE
Disc Title: PEARL JAM ALIVE

netmd_secure_leave_session: No error
netmd_secure_set_track_protection: No error
netmd_secure_enter_session: No error
netmd_secure_send_key_data: No error
netmd_secure_session_key_exchange: No error
netmd_secure_setup_download: No error
netmd_prepare_packets: No error
netmd_secure_send_track: Command rejected
netmd_set_title ("test" to track 52): Not implemented
netmd_exch_message: netmd_poll failed
netmd_secure_commit_track: Command failed, unknown error
netmd_secure_session_key_forget: No error
netmd_secure_leave_session: No error

So we should break the code on NETMD_COMMAND_FAILED_REJECTED errors.

Thomas


<-- thread -->
<-- date -->
  • Follow-Ups:
    • 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: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • References:
    • [linux-minidisc] "netmdcli send" does not break on errors
      • From: Thomas Arp <manner.moe@gmx.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