Took care of disposal of burn_disc ovbject
This commit is contained in:
parent
a30704318f
commit
2c270d6153
@ -217,21 +217,31 @@ int isoburn_get_min_start_byte(struct burn_drive *d, off_t *start_byte,
|
||||
int flag);
|
||||
|
||||
|
||||
/** Prepare a disc for writing the new session.
|
||||
@param drive The target drive
|
||||
@param disc A burn_disc suitable to pass to isoburn_disc_write().
|
||||
/** Create a disc object for writing the new session from the created or loaded
|
||||
iso_volset which has been manipulated via libisofs, to the same media from
|
||||
where the image was eventually loaded. This struct burn_disc is ready for
|
||||
use by a subsequent call to isoburn_disc_write().
|
||||
After this asynchronous writing has ended and the drive is BURN_DRIVE_IDLE
|
||||
again, the burn_disc object has to be disposed by burn_disc_free().
|
||||
@param drive The combined source and target drive, grabbed with
|
||||
isoburn_drive_scan_and_grab(). .
|
||||
@param disc Returns the newly created burn_disc object.
|
||||
@return <=0 error , 1 = success
|
||||
*/
|
||||
int isoburn_prepare_disc(struct burn_drive *d, struct burn_disc **disc,
|
||||
struct isoburn_source_opts *opts);
|
||||
|
||||
|
||||
/** Prepare a disc for creating a new image from the contents of a previous
|
||||
image volset plus the changes made by user. The generated burn_disc is
|
||||
suitable to be written to any libburn drive. You shouldn't use the same
|
||||
drive you're using as source.
|
||||
/** Create a disc object for producing a new image from a previous image
|
||||
plus the changes made by user. The generated burn_disc is suitable
|
||||
to be written to any other libburn drive. You must not use the same drive
|
||||
for writing as you are using here as source, because data will be
|
||||
read from the source drive while the target drive gets written to.
|
||||
The resulting burn_disc object has to be disposed when all its writing
|
||||
is done and the drive is BURN_DRIVE_IDLE again after asynchronous
|
||||
burn_disc_write().
|
||||
@param d The source drive, grabbed with isoburn_drive_scan_and_grab().
|
||||
@param disc A burn_disc suitable to pass to burn_disc_write.
|
||||
@param disc Returns the newly created burn_disc object.
|
||||
@return <=0 error , 1 = success
|
||||
*/
|
||||
int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2007.10.18.185731"
|
||||
#define Xorriso_timestamP "2007.10.18.221756"
|
||||
|
@ -259,7 +259,7 @@ int Xorriso_write_growing(struct XorrisO *xorriso, int flag)
|
||||
struct isoburn_source_opts sopts;
|
||||
struct burn_drive_info *dinfo;
|
||||
struct burn_drive *drive;
|
||||
struct burn_disc *disc;
|
||||
struct burn_disc *disc= NULL;
|
||||
struct burn_write_opts *burn_options;
|
||||
|
||||
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||
@ -293,19 +293,19 @@ int Xorriso_write_growing(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
sprintf(xorriso->info_text,"Cannot prepare disc");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||
return(0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
goto ex;
|
||||
|
||||
isoburn_disc_write(burn_options, disc);
|
||||
burn_write_opts_free(burn_options);
|
||||
|
||||
ret= Xorriso_pacifier_loop(xorriso, drive, 0);
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
goto ex;
|
||||
|
||||
ret= isoburn_activate_session(drive);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
@ -313,13 +313,15 @@ int Xorriso_write_growing(struct XorrisO *xorriso, int flag)
|
||||
sprintf(xorriso->info_text,
|
||||
"Could not write new set of volume descriptors");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
return(ret);
|
||||
goto ex;
|
||||
}
|
||||
|
||||
/* >>> cleanup disc ? */
|
||||
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(disc!=NULL)
|
||||
burn_disc_free(disc);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
return(1);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user