summaryrefslogtreecommitdiff
path: root/server/util/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/util/server.c')
-rw-r--r--server/util/server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/util/server.c b/server/util/server.c
index ecd4d9bc..b2d6a3ce 100644
--- a/server/util/server.c
+++ b/server/util/server.c
@@ -225,6 +225,7 @@ static void server_stdin_handler(struct tevent_context *event_ctx,
main server helpers.
*/
int server_setup(const char *name, int flags,
+ const char *conf_entry,
struct main_context **main_ctx)
{
struct tevent_context *event_ctx;
@@ -289,6 +290,15 @@ int server_setup(const char *name, int flags,
return ret;
}
+ /* set debug level if any in conf_entry */
+ ret = confdb_get_int(ctx->confdb_ctx, ctx, conf_entry,
+ "debug-level", debug_level, &debug_level);
+ if (ret != EOK) {
+ DEBUG(0, ("Error reading from confdb (%d) [%s]\n",
+ ret, strerror(ret)));
+ return ret;
+ }
+
if (flags & FLAGS_INTERACTIVE) {
/* terminate when stdin goes away */
stdin_event_flags = TEVENT_FD_READ;