From cd477812a2812ea7141bf41d9648cbc5f47c1b19 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 5 Feb 2014 19:00:01 +0000 Subject: [PATCH] Fixed bugs introduced with previous commit --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/spc.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index b88ca901..49daa5f6 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2014.02.05.124803" +#define Cdrskin_timestamP "2014.02.05.185801" diff --git a/libburn/trunk/libburn/spc.c b/libburn/trunk/libburn/spc.c index ec9bc67d..b307a57f 100644 --- a/libburn/trunk/libburn/spc.c +++ b/libburn/trunk/libburn/spc.c @@ -431,6 +431,9 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag) if (*alloc_len < 10) {ret = 0; goto ex;} + if (!(flag & 1)) + mmc_get_configuration(d); + BURN_ALLOC_MEM(msg, char, BURN_DRIVE_ADR_LEN + 160); BURN_ALLOC_MEM(buf, struct buffer, 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]; old_alloc_len = *alloc_len; - *alloc_len = page_length + 10; + *alloc_len = page_length + 10 + block_descr_len; if (flag & 1) {ret = !was_error; goto ex;} 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) m->valid = 1; - mmc_get_configuration(d); - /* ts A61225 : end of MMC-1 , begin of MMC-3 */ if (page_length < 30) /* no write speed descriptors ? */ goto try_mmc_get_performance;