X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=recover-src%2Fextract_list.c;fp=recover-src%2Fextract_list.c;h=9a453cb0fd8de01d3399efe9b7cd872d91c7659f;hb=691567b16c13087b31ee4c2b6d038e57872fae82;hp=1744ad6e37fa73d2e26800c71d454e6dfca46812;hpb=cc7d7b45afc706099acf7ff2490ec5667d370651;p=debian%2Famanda diff --git a/recover-src/extract_list.c b/recover-src/extract_list.c index 1744ad6..9a453cb 100644 --- a/recover-src/extract_list.c +++ b/recover-src/extract_list.c @@ -1,6 +1,7 @@ /* * 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 @@ -1860,7 +1861,7 @@ extract_files_child( /*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 @@ -2718,13 +2719,13 @@ read_amidxtaped_data( 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); @@ -2788,8 +2789,6 @@ read_amidxtaped_data( * 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); } }