summaryrefslogtreecommitdiff
path: root/server/util
diff options
context:
space:
mode:
Diffstat (limited to 'server/util')
-rw-r--r--server/util/server.c10
-rw-r--r--server/util/util.h1
2 files changed, 11 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;
diff --git a/server/util/util.h b/server/util/util.h
index c784bf58..b3a7c727 100644
--- a/server/util/util.h
+++ b/server/util/util.h
@@ -56,6 +56,7 @@ struct main_context {
/* from server.c */
int server_setup(const char *name, int flags,
+ const char *conf_entry,
struct main_context **main_ctx);
void server_loop(struct main_context *main_ctx);