Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a trailing slash to a modname arg that has no path information.
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
cb17438
..
71cb979
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-245,7
+245,7
@@
int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n");
exit_cleanup(RERR_SYNTAX);
}
rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n");
exit_cleanup(RERR_SYNTAX);
}
- if (
list_only &&
strncmp(*argv, modname, modlen) == 0
+ if (strncmp(*argv, modname, modlen) == 0
&& argv[0][modlen] == '\0')
sargs[sargc++] = modname; /* we send "modname/" */
else
&& argv[0][modlen] == '\0')
sargs[sargc++] = modname; /* we send "modname/" */
else
@@
-355,8
+355,12
@@
static int read_arg_from_pipe(int fd, char *buf, int limit)
char *bp = buf, *eob = buf + limit - 1;
while (1) {
char *bp = buf, *eob = buf + limit - 1;
while (1) {
- if (read(fd, bp, 1) != 1)
+ int got = read(fd, bp, 1);
+ if (got != 1) {
+ if (got < 0 && errno == EINTR)
+ continue;
return -1;
return -1;
+ }
if (*bp == '\0')
break;
if (bp < eob)
if (*bp == '\0')
break;
if (bp < eob)
@@
-699,6
+703,10
@@
static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
if (write_batch < 0)
dry_run = 1;
if (write_batch < 0)
dry_run = 1;
+#ifdef ICONV_CONST
+ setup_iconv();
+#endif
+
if (lp_fake_super(i))
am_root = -1;
else if (am_root < 0) /* Treat --fake-super from client as --super. */
if (lp_fake_super(i))
am_root = -1;
else if (am_root < 0) /* Treat --fake-super from client as --super. */