Merge some bug fixes.

This commit is contained in:
Vreixo Formoso 2008-01-22 22:02:14 +01:00
commit 3530b7d137
5 changed files with 9 additions and 10 deletions

View File

@ -34,7 +34,6 @@
* = 0x1 -> LOW
* = 0x2 -> MEDIUM
* = 0x3 -> HIGH
* = 0x7 -> TOP
* bits 19-16 -> Reserved for future usage (maybe message ranges)
* bits 15-0 -> Error code
*/
@ -52,8 +51,8 @@
*/
#define ISO_NONE 0
/** Operation canceled (ERROR,TOP, -1) */
#define ISO_CANCELED 0xEA70FFFF
/** Operation canceled (ERROR,HIGH, -1) */
#define ISO_CANCELED 0xEA30FFFF
/** Unknown or unexpected fatal error (FATAL,HIGH, -2) */
#define ISO_FATAL_ERROR 0xF030FFFE

View File

@ -2240,7 +2240,7 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
ret = iso_add_dir_src_rec(image, image->root, newroot);
/* error during recursive image addition? */
if (ret <= 0) {
if (ret < 0) {
iso_node_builder_unref(image->builder);
goto import_revert;
}

View File

@ -172,7 +172,7 @@ struct libiso_msgs_item;
#define LIBISO_MSGS_PRIO_LOW 0x10000000
#define LIBISO_MSGS_PRIO_MEDIUM 0x20000000
#define LIBISO_MSGS_PRIO_HIGH 0x30000000
#define LIBISO_MSGS_PRIO_TOP 0x70000000
#define LIBISO_MSGS_PRIO_TOP 0x7ffffffe
/* Do not use this priority for submitting */
#define LIBISO_MSGS_PRIO_NEVER 0x7fffffff

View File

@ -491,7 +491,7 @@ int check_special(IsoImage *image, mode_t mode)
* Recursively add a given directory to the image tree.
*
* @return
* 1 continue, 0 stop, < 0 error
* 1 continue, < 0 error (ISO_CANCELED stop)
*/
int iso_add_dir_src_rec(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
{
@ -607,7 +607,7 @@ dir_rec_continue:;
} /* while */
iso_file_source_close(dir);
return ret;
return ret < 0 ? ret : ISO_SUCCESS;
}
int iso_tree_add_dir_rec(IsoImage *image, IsoDir *parent, const char *dir)

View File

@ -1039,7 +1039,7 @@ time_t iso_datetime_read_7(const uint8_t *buf)
tm.tm_hour = buf[3];
tm.tm_min = buf[4];
tm.tm_sec = buf[5];
return timegm(&tm) - buf[6] * 60 * 15;
return timegm(&tm) - ((int8_t)buf[6]) * 60 * 15;
}
time_t iso_datetime_read_17(const uint8_t *buf)