Code

store: Don't return an error if an updated host is too old.
authorSebastian Harl <sh@tokkee.org>
Tue, 11 Dec 2012 08:42:23 +0000 (09:42 +0100)
committerSebastian Harl <sh@tokkee.org>
Tue, 11 Dec 2012 08:42:23 +0000 (09:42 +0100)
This may happen, if multiple backends report the same host (which is perfectly
fine and the desired behavior in fact).

src/core/store.c

index 9528a31..f80c49e 100644 (file)
@@ -191,7 +191,9 @@ sc_store_host(const sc_host_t *host)
                        fprintf(stderr, "store: Cannot update host '%s' - "
                                        "value too old (%"PRIscTIME" < %"PRIscTIME")\n",
                                        host->host_name, last_update, old->host_last_update);
-                       status = -1;
+                       /* don't report an error; the host may be updated by multiple
+                        * backends */
+                       status = 0;
                }
                else {
                        old->host_last_update = last_update;