From 4a62d80a7e153a121ebc9c52038add668654dd84 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Mon, 21 Jan 2008 15:30:29 +0100 Subject: [PATCH 1/3] Fix bug related to image import. --- src/fs_image.c | 6 +++--- src/tree.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fs_image.c b/src/fs_image.c index 4a91268..1bce4d3 100644 --- a/src/fs_image.c +++ b/src/fs_image.c @@ -2198,9 +2198,9 @@ int iso_image_import(IsoImage *image, IsoDataSource *src, /* recursively add image */ 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; } @@ -2252,7 +2252,7 @@ int iso_image_import(IsoImage *image, IsoDataSource *src, iso_image_set_copyright_file_id(image, data->copyright_file_id); iso_image_set_abstract_file_id(image, data->abstract_file_id); iso_image_set_biblio_file_id(image, data->biblio_file_id); - + if (features != NULL) { features->hasJoliet = data->joliet; features->hasRR = data->rr_version != 0; diff --git a/src/tree.c b/src/tree.c index 386a877..75a6be8 100644 --- a/src/tree.c +++ b/src/tree.c @@ -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) { @@ -608,7 +608,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) From 9cd29fa47f4d4c1de5444e122d03abea26774c83 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Mon, 21 Jan 2008 21:07:02 +0100 Subject: [PATCH 2/3] Fix little bug related with timezone handling. --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index e7efd02..0eeaede 100644 --- a/src/util.c +++ b/src/util.c @@ -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) From d00b66ecf287a0846ec8e8a4480878c311f3ab50 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Tue, 22 Jan 2008 11:22:25 +0100 Subject: [PATCH 3/3] Revert incorrect change of LIBISO_MSGS_PRIO_TOP. --- src/error.h | 5 ++--- src/libiso_msgs.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/error.h b/src/error.h index 6d73cbb..54062c3 100644 --- a/src/error.h +++ b/src/error.h @@ -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 diff --git a/src/libiso_msgs.h b/src/libiso_msgs.h index 94407a0..7c29a91 100644 --- a/src/libiso_msgs.h +++ b/src/libiso_msgs.h @@ -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