Fixed bugs introduced with previous commit

This commit is contained in:
Thomas Schmitt 2014-02-05 19:00:01 +00:00
parent 7f31c9e985
commit cdbbcbb923
2 changed files with 5 additions and 4 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2014.02.05.124803" #define Cdrskin_timestamP "2014.02.05.185801"

View File

@ -431,6 +431,9 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
if (*alloc_len < 10) if (*alloc_len < 10)
{ret = 0; goto ex;} {ret = 0; goto ex;}
if (!(flag & 1))
mmc_get_configuration(d);
BURN_ALLOC_MEM(msg, char, BURN_DRIVE_ADR_LEN + 160); BURN_ALLOC_MEM(msg, char, BURN_DRIVE_ADR_LEN + 160);
BURN_ALLOC_MEM(buf, struct buffer, 1); BURN_ALLOC_MEM(buf, struct buffer, 1);
BURN_ALLOC_MEM(c, struct command, 1); BURN_ALLOC_MEM(c, struct command, 1);
@ -496,7 +499,7 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
*/ */
page_length = page[1]; page_length = page[1];
old_alloc_len = *alloc_len; old_alloc_len = *alloc_len;
*alloc_len = page_length + 10; *alloc_len = page_length + 10 + block_descr_len;
if (flag & 1) if (flag & 1)
{ret = !was_error; goto ex;} {ret = !was_error; goto ex;}
if (page_length + 10 > old_alloc_len) if (page_length + 10 > old_alloc_len)
@ -549,8 +552,6 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
if (!was_error) if (!was_error)
m->valid = 1; m->valid = 1;
mmc_get_configuration(d);
/* ts A61225 : end of MMC-1 , begin of MMC-3 */ /* ts A61225 : end of MMC-1 , begin of MMC-3 */
if (page_length < 30) /* no write speed descriptors ? */ if (page_length < 30) /* no write speed descriptors ? */
goto try_mmc_get_performance; goto try_mmc_get_performance;