Browse Source

Merge some bug fixes.

release-1.5.4.branch
Vreixo Formoso 15 years ago
parent
commit
3530b7d137
  1. 5
      src/error.h
  2. 6
      src/fs_image.c
  3. 2
      src/libiso_msgs.h
  4. 4
      src/tree.c
  5. 2
      src/util.c

5
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

6
src/fs_image.c

@ -2238,9 +2238,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;
}
@ -2292,7 +2292,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;

2
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

4
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)
{
@ -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)

2
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)

Loading…
Cancel
Save