Inserted problem messages where libisoburn API produces own failures

This commit is contained in:
2008-02-04 18:47:17 +00:00
parent de2a2025dd
commit 0752efbef1
6 changed files with 86 additions and 36 deletions

View File

@ -298,10 +298,13 @@ int Xorriso_report_iso_error(struct XorrisO *xorriso,
int error_code, iso_sev, min_sev, ret;
char *sev_text_pt, *msg_text_pt= NULL;
/* <<< delete as soon as replacement appears in libisofs */
#define ISO_ERR_CODE(e) (e & 0x0000FFFF)
error_code= 0x00050000;
/* It would have been neat ...
#define ISO_ERR_CODE(e) (e & 0x0000FFFF)
error_code= 0x00050000 | ISO_ERR_CODE(iso_error_code);
*/
if(flag&1)
msg_text_pt= (char *) iso_error_to_msg(iso_error_code);
if(msg_text_pt==NULL)
@ -838,6 +841,10 @@ no_track:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
goto ex;
}
/* Done early to free any reference to the libisofs resources via disc */
if(disc!=NULL)
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);
Xorriso_process_msg_queues(xorriso,0);
@ -1565,12 +1572,15 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
else {
ret= burn_msgs_obtain("ALL", &error_code, xorriso->info_text, &os_errno,
severity);
tunneled= (error_code>=0x00050000 && error_code<0x00060000);
if(error_code>=0x00050000 && error_code<0x00060000)
tunneled= -1; /* "libisofs:" */
if(error_code>=0x00060000 && error_code<0x00070000)
tunneled= 1; /* "libisoburn:" */
}
if(ret<=0)
break;
Xorriso_msgs_submit(xorriso, error_code, xorriso->info_text, os_errno,
severity, ((pass&&!tunneled)+1)<<2);
severity, ((pass+tunneled)+1)<<2);
count++;
}
}