summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-12-09 14:11:09 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-12-09 10:05:18 -0500
commit9fbf84a98519a349198ee1a4c4d0786432de378e (patch)
tree9ccabf0dbe901449639dfcace6cf16e3083d6209 /server
parent95fbf9f5cbc93e4cc9b2ef02ef167f7b7ed8afea (diff)
downloadsssd-9fbf84a98519a349198ee1a4c4d0786432de378e.tar.gz
sssd-9fbf84a98519a349198ee1a4c4d0786432de378e.tar.bz2
sssd-9fbf84a98519a349198ee1a4c4d0786432de378e.zip
Correctly restart server status after the timeout
The macro STATUS_DIFF() was wrong causing the result to always be lower than 0, therefore the timeout was never reached. Fixes: #302
Diffstat (limited to 'server')
-rw-r--r--server/providers/fail_over.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/providers/fail_over.c b/server/providers/fail_over.c
index 8c520324..8288171f 100644
--- a/server/providers/fail_over.c
+++ b/server/providers/fail_over.c
@@ -35,7 +35,7 @@
#include "providers/fail_over.h"
#include "resolv/async_resolv.h"
-#define STATUS_DIFF(p, tv2) ((p)->last_status_change.tv_sec - (tv2).tv_sec)
+#define STATUS_DIFF(p, now) ((now).tv_sec - (p)->last_status_change.tv_sec)
#define SERVER_NAME(s) ((s)->common ? (s)->common->name : "(no name)")
#define DEFAULT_PORT_STATUS PORT_NEUTRAL