From 6c38a5111e0c7c2879527b3589cafa693134d6df Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 18 Oct 2007 14:48:35 +0000 Subject: [PATCH] isoburn_read_volset() now hands out an official volset reference --- src/isofs_wrap.c | 5 +++-- test/xorriso_timestamp.h | 2 +- test/xorrisoburn.c | 7 ++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/isofs_wrap.c b/src/isofs_wrap.c index 9d43d77a..e9363c75 100644 --- a/src/isofs_wrap.c +++ b/src/isofs_wrap.c @@ -137,6 +137,7 @@ int isoburn_read_volset(struct burn_drive *d, struct isoburn_read_opts *read_opt return -3; o->target_volset = *volset; + iso_volset_ref(o->target_volset); /* protects object from premature free */ read_opts->hasRR = ropts.hasRR; read_opts->hasJoliet = ropts.hasJoliet; @@ -211,7 +212,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag) drive= o->drive; /* we can assume 0 as start block for image */ - // TODO what about ms? where we validate valid iso image in ms disc? + /* TODO what about ms? where we validate valid iso image in ms disc? */ ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head, sizeof(o->target_iso_head), &data_count, 1); @@ -240,7 +241,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag) /* sanity check */ if (pvm->vol_desc_type[0] != 1 || pvm->vol_desc_version[0] != 1 || pvm->file_structure_version[0] != 1 ) { - // TODO for now I treat this as a full disc + /* TODO for now I treat this as a full disc */ o->fabricated_disc_status= BURN_DISC_FULL; return 1; } diff --git a/test/xorriso_timestamp.h b/test/xorriso_timestamp.h index 4f166140..8f43302a 100644 --- a/test/xorriso_timestamp.h +++ b/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2007.10.17.225837" +#define Xorriso_timestamP "2007.10.18.144841" diff --git a/test/xorrisoburn.c b/test/xorrisoburn.c index 15810727..d6095a65 100644 --- a/test/xorrisoburn.c +++ b/test/xorrisoburn.c @@ -189,11 +189,8 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag) drive= dinfo[0].drive; isoburn_drive_release(drive,0); - /* >>> this should be an official reference for this pointer which was - handed out by isoburn_read_volset() and attached to invisible - struct isoburn. Then to be processed by: iso_volset_free(volset); - */ - xorriso->in_volset_handle= NULL; /* destroyed by isoburn_drive_release() */ + iso_volset_free((struct iso_volset *) xorriso->in_volset_handle); + xorriso->in_volset_handle= NULL; xorriso->volset_change_pending= 0; burn_drive_info_free(dinfo);