summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-08-11 10:46:08 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-11 12:29:35 -0400
commit68f2b4f2a90cb6fef3a6ffd88a1aee34c0e91276 (patch)
tree29093311b7243be576fd03604d042aedcda3d87f
parentdd8aaf74198c084fd0aa712d56c4511978f04ebe (diff)
downloadsssd-68f2b4f2a90cb6fef3a6ffd88a1aee34c0e91276.tar.gz
sssd-68f2b4f2a90cb6fef3a6ffd88a1aee34c0e91276.tar.bz2
sssd-68f2b4f2a90cb6fef3a6ffd88a1aee34c0e91276.zip
Fix monitor ping timeout
Our configuration specifies the monitor config timeout as seconds, but we were passing it directly to dbus commands that require milliseconds. Fixing this in get_monitor_config(). Also, the default value of -1 for the timeout resulted in a timeout much too short to be useful, so I'm making it 10s instead. This fix solves the problem where a busy backend (for example, one that is enumerating a large number of LDAP entries) would fail to respond to the ping in time.
-rw-r--r--server/monitor/monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 81012071..ead921c0 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -664,14 +664,17 @@ static int append_data_provider(struct mt_ctx *ctx)
int get_monitor_config(struct mt_ctx *ctx)
{
int ret;
+ int timeout_seconds;
ret = confdb_get_int(ctx->cdb, ctx,
MONITOR_CONF_ENTRY, "sbusTimeout",
- -1, &ctx->service_id_timeout);
+ 10, &timeout_seconds);
if (ret != EOK) {
return ret;
}
+ ctx->service_id_timeout = timeout_seconds * 1000; /* service_id_timeout is in ms */
+
ctx->service_ctx = talloc_new(ctx);
if(!ctx->service_ctx) {
return ENOMEM;