Ticket #135 (closed bug: fixed)
ISO_ERR_PRIO and error return -1
| Reported by: | scdbackup | Owned by: | vreixo |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | libisofs [old] | Version: | |
| Keywords: | Cc: |
Description
In libisofs/messages.c i read
#define ISO_ERR_PRIO(e) ((e & 0x00F00000) << 8)
which applied to e == -1 would yield a negative priority. Such a message gets queued but then cancelled on delivery by
iso_obtain_msgs("ALL", ...
because LIBISO_MSGS_PRIO_ZERO is 0 and thus higher than undefined negative codes.
A remedy and safety cap would be to change ISO_ERR_PRIO to:
#define ISO_ERR_PRIO(e) ((e & 0x00700000) << 8)
I came to this by a misplaced error simulation. But given the fact that e.g. iso_file_source_open() indeed can return -1, i think the potential to produce undefined severities should be removed.
Change History
Note: See
TracTickets for help on using
tickets.
