/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*NOTREACHED*/
}
- if (ctl_data->file.program != NULL) {
+ if (ctl_data->file.program[0] != '\0') {
if (strcmp(ctl_data->file.program, "APPLICATION") == 0)
dumptype = IS_APPLICATION_API;
#ifdef GNUTAR
g_debug("read header %zd => %d", size, header_size);
if (header_size < 32768) {
- security_stream_read(amidxtaped_streams[DATAFD].fd,
- read_amidxtaped_data, cookie);
+ /* wait to read more data */
return;
} else if (header_size > 32768) {
error("header_size is %d\n", header_size);
}
assert (to_move == size);
+ security_stream_read_cancel(amidxtaped_streams[DATAFD].fd);
/* parse the file header */
fh_init(&ctl_data->file);
parse_file_header(header_buf, &ctl_data->file, (size_t)header_size);
* We ignore errors while writing to the index file.
*/
(void)full_write(ctl_data->child_pipe[1], buf, (size_t)size);
- security_stream_read(amidxtaped_streams[DATAFD].fd,
- read_amidxtaped_data, cookie);
}
}