Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e8369b
)
Receiving an @ERROR line from the server is (I think) always fatal, so
author
Martin Pool
<mbp@samba.org>
Thu, 11 Apr 2002 01:56:35 +0000
(
01:56
+0000)
committer
Martin Pool
<mbp@samba.org>
Thu, 11 Apr 2002 01:56:35 +0000
(
01:56
+0000)
the client should exit upon receiving one and not be surprised that
the socket closes.
clientserver.c
patch
|
blob
|
blame
|
history
diff --git
a/clientserver.c
b/clientserver.c
index
190872d
..
2babcff
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-161,10
+161,14
@@
int start_socket_client(char *host, char *path, int argc, char *argv[])
exit(0);
}
- if (strncmp(line, "@ERROR", 6) == 0)
+ if (strncmp(line, "@ERROR", 6) == 0)
{
rprintf(FERROR,"%s\n", line);
- else
+ /* This is always fatal; the server will now
+ * close the socket. */
+ return RERR_STARTCLIENT;
+ } else {
rprintf(FINFO,"%s\n", line);
+ }
}
kludge_around_eof = False;