]> git.tuebingen.mpg.de Git - dss.git/blobdiff - dss.c
Fix some typos.
[dss.git] / dss.c
diff --git a/dss.c b/dss.c
index 27c14b6720d47fc88721c7bd25765affc791daa9..3bcf60d4ba39d083f27bd26cb85998bb7a6eff69 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -185,8 +185,8 @@ static int next_snapshot_is_due(void)
                goto out;
        }
 
-       tv_divide(wanted, &diff, &tmp); /* sleep time betweeen two snapshots */
-       diff.tv_sec = s->completion_time; /* completion time of the the latest snaphot */
+       tv_divide(wanted, &diff, &tmp); /* sleep time between two snapshots */
+       diff.tv_sec = s->completion_time; /* completion time of the latest snapshot */
        diff.tv_usec = 0;
        tv_add(&diff, &tmp, &next_snapshot_time);
        ret = (tv_diff(&now, &next_snapshot_time, &diff) < 0)? 0 : 1;
@@ -641,7 +641,12 @@ static int handle_rsync_exit(int status)
                goto out;
        }
        es = WEXITSTATUS(status);
-       if (es == 13) { /* Errors with program diagnostics */
+       /*
+        * Restart rsync on non-fatal errors:
+        * 12: Error in rsync protocol data stream
+        * 13: Errors with program diagnostics
+        */
+       if (es == 12 || es == 13) {
                DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n",
                        (int)create_pid, es);
                snapshot_creation_status = HS_NEEDS_RESTART;