Avoided to enumerate faulty drive objects

ZeroSixEight
Thomas Schmitt 14 years ago
parent 8276611468
commit 2522bebfbd
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 12
      libburn/drive.c

@ -1 +1 @@
#define Cdrskin_timestamP "2009.06.02.162841"
#define Cdrskin_timestamP "2009.06.02.172201"

@ -930,7 +930,7 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
*/
unsigned char scanned[32];
unsigned count = 0;
int i;
int i, ret;
/* ts A61007 : moved up to burn_drive_scan() */
/* a ssert(burn_running); */
@ -994,11 +994,15 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
}
*/
/* ts A90602 : A single call shall do (rather than a loop) */
drive_getcaps(&drive_array[i], &(*drives)[*n_drives]);
(*n_drives)++;
ret = drive_getcaps(&drive_array[i], &(*drives)[*n_drives]);
if (ret > 0)
(*n_drives)++;
scanned[i / 8] |= 1 << (i % 8);
}
if (*drives != NULL && *n_drives == 0) {
free ((char *) *drives);
*drives = NULL;
}
return(1);
}

Loading…
Cancel
Save