Fixed a failing hunk.
[rsync/rsync-patches.git] / openssl-support.diff
index b1d95eb..c6da87f 100644 (file)
@@ -58,18 +58,18 @@ can't say if I've left any cleanup/compatibility errors in the code.
  extern int keep_partial;
  extern int log_got_error;
  extern char *partial_dir;
-@@ -103,6 +106,11 @@ NORETURN void _exit_cleanup(int code, co
-       in_exit_cleanup = 1;
+@@ -122,6 +125,11 @@ NORETURN void _exit_cleanup(int code, co
+       case 1:
+               cleanup_step++;
  
 +#if HAVE_OPENSSL
-+      if (use_ssl)
-+              end_tls();
++              if (use_ssl)
++                      end_tls();
 +#endif
 +
-       if (verbose > 3) {
-               rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
-                       code, file, line);
+               if (cleanup_child_pid != -1) {
+                       int status;
+                       int pid = wait_process(cleanup_child_pid, &status, WNOHANG);
 --- old/clientserver.c
 +++ new/clientserver.c
 @@ -29,6 +29,9 @@ extern int am_sender;
@@ -334,7 +334,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    {"verbose",         'v', POPT_ARG_NONE,   0, 'v', 0, 0 },
    {"no-verbose",       0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },
    {"no-v",             0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },
-@@ -848,6 +889,12 @@ int parse_arguments(int *argc, const cha
+@@ -851,6 +892,12 @@ int parse_arguments(int *argc, const cha
                                        verbose++;
                                        break;
  
@@ -347,7 +347,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                                default:
                                        rprintf(FERROR,
                                            "rsync: %s: %s (in daemon mode)\n",
-@@ -871,6 +918,17 @@ int parse_arguments(int *argc, const cha
+@@ -874,6 +921,17 @@ int parse_arguments(int *argc, const cha
                                exit_cleanup(RERR_SYNTAX);
                        }
  
@@ -365,7 +365,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        *argv = poptGetArgs(pc);
                        *argc = count_args(*argv);
                        am_starting_up = 0;
-@@ -1082,6 +1140,12 @@ int parse_arguments(int *argc, const cha
+@@ -1085,6 +1143,12 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -378,7 +378,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1358,6 +1422,17 @@ int parse_arguments(int *argc, const cha
+@@ -1361,6 +1425,17 @@ int parse_arguments(int *argc, const cha
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -396,7 +396,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -1775,10 +1850,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1778,10 +1853,27 @@ char *check_for_hostspec(char *s, char *
        char *p;
        int not_host;
        int hostlen;