From cad2bba7d809c9f385fd8b85959c09c5e687edb5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 29 May 1998 02:28:33 +0000 Subject: [PATCH] fixed a bug in the flist sending code that caused the flist sending to get out of sync. --- flist.c | 5 +++++ io.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flist.c b/flist.c index 5b6dc602..179e7e7e 100644 --- a/flist.c +++ b/flist.c @@ -169,6 +169,11 @@ void send_file_entry(struct file_struct *file,int f,unsigned base_flags) if (l1 > 0) flags |= SAME_NAME; if (l2 > 255) flags |= LONG_NAME; + /* we must make sure we don't send a zero flags byte or the other + end will terminate the flist transfer */ + if (flags == 0 && !S_ISDIR(file->mode)) flags |= FLAG_DELETE; + if (flags == 0) flags |= LONG_NAME; + write_byte(f,flags); if (flags & SAME_NAME) write_byte(f,l1); diff --git a/io.c b/io.c index 8eb62c38..85ff7424 100644 --- a/io.c +++ b/io.c @@ -145,7 +145,7 @@ static void read_loop(int fd, char *buf, int len) } } -/* read from the file descriptor handing multiplexing - +/* read from the file descriptor handling multiplexing - return number of bytes read never return <= 0 */ static int read_unbuffered(int fd, char *buf, int len) -- 2.34.1