[BACK]Return to main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/main.c between version 1.3 and 1.4

version 1.3, 2019/02/10 23:43:31 version 1.4, 2019/02/11 19:18:36
Line 171 
Line 171 
   
         /* Make sure we have the same "hostspec" for all files. */          /* Make sure we have the same "hostspec" for all files. */
   
         if ( ! f->remote) {          if (!f->remote) {
                 if (FARGS_SENDER == f->mode)                  if (FARGS_SENDER == f->mode)
                         for (i = 0; i < f->sourcesz; i++) {                          for (i = 0; i < f->sourcesz; i++) {
                                 if ( ! fargs_is_remote(f->sources[i]))                                  if (!fargs_is_remote(f->sources[i]))
                                         continue;                                          continue;
                                 errx(EXIT_FAILURE, "remote file in "                                  errx(EXIT_FAILURE, "remote file in "
                                         "list of local sources: %s",                                          "list of local sources: %s",
Line 183 
Line 183 
                 if (FARGS_RECEIVER == f->mode)                  if (FARGS_RECEIVER == f->mode)
                         for (i = 0; i < f->sourcesz; i++) {                          for (i = 0; i < f->sourcesz; i++) {
                                 if (fargs_is_remote(f->sources[i]) &&                                  if (fargs_is_remote(f->sources[i]) &&
                                     ! fargs_is_daemon(f->sources[i]))                                      !fargs_is_daemon(f->sources[i]))
                                         continue;                                          continue;
                                 if (fargs_is_daemon(f->sources[i]))                                  if (fargs_is_daemon(f->sources[i]))
                                         errx(EXIT_FAILURE, "remote "                                          errx(EXIT_FAILURE, "remote "
Line 212 
Line 212 
          * Then exit if we're a sender or a local connection.           * Then exit if we're a sender or a local connection.
          */           */
   
         if ( ! f->remote) {          if (!f->remote) {
                 if (NULL == f->host)                  if (NULL == f->host)
                         return f;                          return f;
                 if (FARGS_SENDER == f->mode) {                  if (FARGS_SENDER == f->mode) {
Line 435 
Line 435 
          * So close the connection here so that they don't hang.           * So close the connection here so that they don't hang.
          */           */
   
         if ( ! c) {          if (!c) {
                 close(fds[0]);                  close(fds[0]);
                 fds[0] = -1;                  fds[0] = -1;
         }          }
   
         if (-1 == waitpid(child, &st, 0))          if (-1 == waitpid(child, &st, 0))
                 err(EXIT_FAILURE, "waitpid");                  err(EXIT_FAILURE, "waitpid");
         if ( ! (WIFEXITED(st) && EXIT_SUCCESS == WEXITSTATUS(st)))          if (!(WIFEXITED(st) && EXIT_SUCCESS == WEXITSTATUS(st)))
                 c = 0;                  c = 0;
   
         if (-1 != fds[0])          if (-1 != fds[0])

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4