doveadm-dump-dbox.c (dovecot-2.3.16) | : | doveadm-dump-dbox.c (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 192 | skipping to change at line 192 | |||
{ | { | |||
uoff_t msg_size; | uoff_t msg_size; | |||
if (!dump_msg_hdr(input, hdr_size, &msg_size)) | if (!dump_msg_hdr(input, hdr_size, &msg_size)) | |||
return FALSE; | return FALSE; | |||
i_stream_skip(input, msg_size); | i_stream_skip(input, msg_size); | |||
dump_msg_metadata(input); | dump_msg_metadata(input); | |||
return TRUE; | return TRUE; | |||
} | } | |||
static void cmd_dump_dbox(int argc ATTR_UNUSED, char *argv[]) | static void cmd_dump_dbox(const char *path, const char *const *args ATTR_UNUSED) | |||
{ | { | |||
struct istream *input; | struct istream *input; | |||
int fd; | int fd; | |||
unsigned int hdr_size; | unsigned int hdr_size; | |||
bool ret; | bool ret; | |||
fd = open(argv[1], O_RDONLY); | fd = open(path, O_RDONLY); | |||
if (fd < 0) | if (fd < 0) | |||
i_fatal("open(%s) failed: %m", argv[1]); | i_fatal("open(%s) failed: %m", path); | |||
input = i_stream_create_fd_autoclose(&fd, SIZE_MAX); | input = i_stream_create_fd_autoclose(&fd, SIZE_MAX); | |||
i_stream_set_name(input, argv[1]); | i_stream_set_name(input, path); | |||
hdr_size = dump_file_hdr(input); | hdr_size = dump_file_hdr(input); | |||
do { | do { | |||
printf("\n"); | printf("\n"); | |||
T_BEGIN { | T_BEGIN { | |||
ret = dump_msg(input, hdr_size); | ret = dump_msg(input, hdr_size); | |||
} T_END; | } T_END; | |||
} while (ret); | } while (ret); | |||
i_stream_destroy(&input); | i_stream_destroy(&input); | |||
} | } | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |