"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "io.c" between
rsync-3.2.1.tar.gz and rsync-3.2.2.tar.gz

About: rsync is a fast incremental file-copying tool for bringing remote (and local) files into sync.

io.c  (rsync-3.2.1):io.c  (rsync-3.2.2)
skipping to change at line 1242 skipping to change at line 1242
{ {
int maxargs = MAX_ARGS; int maxargs = MAX_ARGS;
int dot_pos = 0, argc = 0, request_len = 0; int dot_pos = 0, argc = 0, request_len = 0;
char **argv, *p; char **argv, *p;
int rl_flags = (rl_nulls ? RL_EOL_NULLS : 0); int rl_flags = (rl_nulls ? RL_EOL_NULLS : 0);
#ifdef ICONV_OPTION #ifdef ICONV_OPTION
rl_flags |= (protect_args && ic_recv != (iconv_t)-1 ? RL_CONVERT : 0); rl_flags |= (protect_args && ic_recv != (iconv_t)-1 ? RL_CONVERT : 0);
#endif #endif
if (!(argv = new_array(char *, maxargs))) argv = new_array(char *, maxargs);
out_of_memory("read_args");
if (mod_name && !protect_args) if (mod_name && !protect_args)
argv[argc++] = "rsyncd"; argv[argc++] = "rsyncd";
if (request_p) if (request_p)
*request_p = NULL; *request_p = NULL;
while (1) { while (1) {
if (read_line(f_in, buf, bufsiz, rl_flags) == 0) if (read_line(f_in, buf, bufsiz, rl_flags) == 0)
break; break;
if (argc == maxargs-1) { if (argc == maxargs-1) {
maxargs += MAX_ARGS; maxargs += MAX_ARGS;
if (!(argv = realloc_array(argv, char *, maxargs))) argv = realloc_array(argv, char *, maxargs);
out_of_memory("read_args");
} }
if (dot_pos) { if (dot_pos) {
if (request_p && request_len < 1024) { if (request_p && request_len < 1024) {
int len = strlen(buf); int len = strlen(buf);
if (request_len) if (request_len)
request_p[0][request_len++] = ' '; request_p[0][request_len++] = ' ';
if (!(*request_p = realloc_array(*request_p, char *request_p = realloc_array(*request_p, char, requ
, request_len + len + 1))) est_len + len + 1);
out_of_memory("read_args");
memcpy(*request_p + request_len, buf, len + 1); memcpy(*request_p + request_len, buf, len + 1);
request_len += len; request_len += len;
} }
if (mod_name) if (mod_name)
glob_expand_module(mod_name, buf, &argv, &argc, & maxargs); glob_expand_module(mod_name, buf, &argv, &argc, & maxargs);
else else
glob_expand(buf, &argv, &argc, &maxargs); glob_expand(buf, &argv, &argc, &maxargs);
} else { } else {
if (!(p = strdup(buf))) p = strdup(buf);
out_of_memory("read_args");
argv[argc++] = p; argv[argc++] = p;
if (*p == '.' && p[1] == '\0') if (*p == '.' && p[1] == '\0')
dot_pos = argc; dot_pos = argc;
} }
} }
argv[argc] = NULL; argv[argc] = NULL;
glob_expand(NULL, NULL, NULL, NULL); glob_expand(NULL, NULL, NULL, NULL);
*argc_p = argc; *argc_p = argc;
 End of changes. 4 change blocks. 
9 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)