diff --git a/libisoburn/isoburn.c b/libisoburn/isoburn.c index 5b5e4b15..45bb81fc 100644 --- a/libisoburn/isoburn.c +++ b/libisoburn/isoburn.c @@ -428,16 +428,28 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc, @param flag bit0= this is a regular end, not an abort give up source reference */ -int isoburn_cancel_prepared_write(struct burn_drive *d, int flag) +int isoburn_cancel_prepared_write(struct burn_drive *d, + struct burn_drive *output_drive, int flag) { int ret; - struct isoburn *o; + struct isoburn *o= NULL; - ret= isoburn_find_emulator(&o, d, 0); - if(ret<0 || o==NULL) - return(-1); - if(o->iso_source==NULL) - return(0); + if(output_drive!=NULL) { + ret= isoburn_find_emulator(&o, output_drive, 0); + if(ret<0 || o==NULL) + o= NULL; + else if(o->iso_source==NULL) + o= NULL; + } + if(o==NULL) { + ret= isoburn_find_emulator(&o, d, 0); + if(ret<0) + return(-1); + if(o==NULL) + return(0); + if(o->iso_source==NULL) + return(0); + } if(o->iso_source->read!=NULL) return(0); if(o->iso_source->version<1) @@ -450,9 +462,10 @@ int isoburn_cancel_prepared_write(struct burn_drive *d, int flag) /* API @since 0.1.0 */ -int isoburn_sync_after_write(struct burn_drive *d, int flag) +int isoburn_sync_after_write(struct burn_drive *d, + struct burn_drive *output_drive, int flag) { - return isoburn_cancel_prepared_write(d, 1); + return isoburn_cancel_prepared_write(d, output_drive, 1); } diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index 8ea59d9a..d0044487 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -695,11 +695,14 @@ int isoburn_prepare_new_image(struct burn_drive *in_drive, call described here. @param input_drive The drive resp. in_drive which was used with the preparation call. + @param output_drive The out_drive used with isoburn_prepare_new_image(), + NULL if none. @param flag Bitfield, submit 0 for now. bit0= -reserved for internal use- @return <0 error, 0= no pending preparations detectable, 1 = canceled */ -int isoburn_cancel_prepared_write(struct burn_drive *input_drive, int flag); +int isoburn_cancel_prepared_write(struct burn_drive *input_drive, + struct burn_drive *output_drive, int flag); /** Start writing of the new session. @@ -759,10 +762,13 @@ int isoburn_activate_session(struct burn_drive *drive); threads might appear after the application ended its write procedure. @param input_drive The drive resp. in_drive which was used with the preparation call. + @param output_drive The out_drive used with isoburn_prepare_new_image(), + NULL if none. @param flag Bitfield, submit 0 for now. @return <=0 error , 1 = success */ -int isoburn_sync_after_write(struct burn_drive *input_drive, int flag); +int isoburn_sync_after_write(struct burn_drive *input_drive, + struct burn_drive *output_drive, int flag); #if 0 diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 2598013f..5791a58e 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.02.04.184038" +#define Xorriso_timestamP "2008.02.04.214133" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index dcf85780..e08c245d 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -780,7 +780,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) : img_sectors ), media_space); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); - isoburn_cancel_prepared_write(source_drive, 0); + isoburn_cancel_prepared_write(source_drive, drive, 0); {ret= 0; goto ex;} } @@ -791,7 +791,7 @@ no_track:; Xorriso_process_msg_queues(xorriso,0); sprintf(xorriso->info_text,"Program error : no track in prepared disc"); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0); - isoburn_cancel_prepared_write(source_drive, 0); + isoburn_cancel_prepared_write(source_drive, drive, 0); {ret= -1; goto ex;} } tracks= burn_session_get_tracks(sessions[0], &num_tracks); @@ -846,7 +846,7 @@ no_track:; burn_disc_free(disc); disc= NULL; /* To wait for the end of the libisofs threads and their messages. */ - isoburn_sync_after_write(source_drive, 1); + isoburn_sync_after_write(source_drive, drive, 0); Xorriso_process_msg_queues(xorriso,0); sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");