diff options
author | Simo Sorce <idra@samba.org> | 2008-12-10 12:44:59 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-12-10 12:44:59 -0500 |
commit | 1e4ff482d8d219ffd7a360a7783f29bff9cf9e2f (patch) | |
tree | eaf81e9f695f44a9a41c0f6ca4a1f7754ea40497 /server | |
parent | dd42f1e418addaedbeeff9602520288edf3c7108 (diff) | |
download | sssd-1e4ff482d8d219ffd7a360a7783f29bff9cf9e2f.tar.gz sssd-1e4ff482d8d219ffd7a360a7783f29bff9cf9e2f.tar.bz2 sssd-1e4ff482d8d219ffd7a360a7783f29bff9cf9e2f.zip |
Convert leading tabs to 4 spaces
Diffstat (limited to 'server')
-rw-r--r-- | server/monitor.c | 40 | ||||
-rw-r--r-- | server/util/server.c | 72 |
2 files changed, 56 insertions, 56 deletions
diff --git a/server/monitor.c b/server/monitor.c index 38510f17..81aadf44 100644 --- a/server/monitor.c +++ b/server/monitor.c @@ -887,26 +887,26 @@ int main(int argc, const char *argv[]) struct main_context *main_ctx; int ret; - struct poptOption long_options[] = { - POPT_AUTOHELP + struct poptOption long_options[] = { + POPT_AUTOHELP SSSD_MAIN_OPTS - {"daemon", 'D', POPT_ARG_NONE, &opt_daemon, 0, \ - "Become a daemon (default)", NULL }, \ - {"interactive", 'i', POPT_ARG_NONE, &opt_interactive, 0, \ - "Run interactive (not a daemon)", NULL}, \ - { NULL } - }; - - pc = poptGetContext(argv[0], argc, argv, long_options, 0); - while((opt = poptGetNextOpt(pc)) != -1) { - switch(opt) { - default: - fprintf(stderr, "\nInvalid option %s: %s\n\n", - poptBadOption(pc, 0), poptStrerror(opt)); - poptPrintUsage(pc, stderr, 0); - return 1; - } - } + {"daemon", 'D', POPT_ARG_NONE, &opt_daemon, 0, \ + "Become a daemon (default)", NULL }, \ + {"interactive", 'i', POPT_ARG_NONE, &opt_interactive, 0, \ + "Run interactive (not a daemon)", NULL}, \ + { NULL } + }; + + pc = poptGetContext(argv[0], argc, argv, long_options, 0); + while((opt = poptGetNextOpt(pc)) != -1) { + switch(opt) { + default: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + return 1; + } + } if (opt_daemon && opt_interactive) { fprintf(stderr, "Option -i|--interactive is not allowed together with -D|--daemon\n"); @@ -914,7 +914,7 @@ int main(int argc, const char *argv[]) return 1; } - poptFreeContext(pc); + poptFreeContext(pc); if (opt_daemon) flags |= FLAGS_DAEMON; if (opt_interactive) flags |= FLAGS_INTERACTIVE; diff --git a/server/util/server.c b/server/util/server.c index 6983fcaa..87b2f8c2 100644 --- a/server/util/server.c +++ b/server/util/server.c @@ -237,42 +237,42 @@ static void server_stdin_handler(struct event_context *event_ctx, struct fd_even int server_setup(const char *name, int flags, struct main_context **main_ctx) { - struct event_context *event_ctx; + struct event_context *event_ctx; struct main_context *ctx; - uint16_t stdin_event_flags; - int ret = EOK; + uint16_t stdin_event_flags; + int ret = EOK; debug_prg_name = strdup(name); if (!debug_prg_name) { return ENOMEM; } - setup_signals(); + setup_signals(); - /* we want default permissions on created files to be very strict, - so set our umask to 0177 */ - umask(0177); + /* we want default permissions on created files to be very strict, + so set our umask to 0177 */ + umask(0177); - if (flags & FLAGS_DAEMON) { - DEBUG(3,("Becoming a daemon.\n")); - become_daemon(true); + if (flags & FLAGS_DAEMON) { + DEBUG(3,("Becoming a daemon.\n")); + become_daemon(true); } if (flags & FLAGS_PID_FILE) { - ret = pidfile(PID_PATH, name); + ret = pidfile(PID_PATH, name); if (ret != EOK) { DEBUG(0, ("ERROR: PID File reports daemon already running!\n")); return EEXIST; } - } + } - /* the event context is the top level structure. + /* the event context is the top level structure. * Everything else should hang off that */ - event_ctx = event_context_init(talloc_autofree_context()); - if (event_ctx == NULL) { - DEBUG(0,("The event context initialiaziton failed\n")); - return 1; - } + event_ctx = event_context_init(talloc_autofree_context()); + if (event_ctx == NULL) { + DEBUG(0,("The event context initialiaziton failed\n")); + return 1; + } ctx = talloc(event_ctx, struct main_context); if (ctx == NULL) { @@ -285,22 +285,22 @@ int server_setup(const char *name, int flags, ret = confdb_init(ctx, event_ctx, &ctx->confdb_ctx); if (ret != EOK) { DEBUG(0,("The confdb initialization failed\n")); - return ret; - } + return ret; + } - if (flags & FLAGS_INTERACTIVE) { - /* terminate when stdin goes away */ - stdin_event_flags = EVENT_FD_READ; - } else { - /* stay alive forever */ - stdin_event_flags = 0; - } + if (flags & FLAGS_INTERACTIVE) { + /* terminate when stdin goes away */ + stdin_event_flags = EVENT_FD_READ; + } else { + /* stay alive forever */ + stdin_event_flags = 0; + } - /* catch EOF on stdin */ + /* catch EOF on stdin */ #ifdef SIGTTIN - signal(SIGTTIN, SIG_IGN); + signal(SIGTTIN, SIG_IGN); #endif - event_add_fd(event_ctx, event_ctx, 0, stdin_event_flags, + event_add_fd(event_ctx, event_ctx, 0, stdin_event_flags, server_stdin_handler, discard_const(name)); *main_ctx = ctx; @@ -309,11 +309,11 @@ int server_setup(const char *name, int flags, void server_loop(struct main_context *main_ctx) { - /* wait for events - this is where smbd sits for most of its - life */ - event_loop_wait(main_ctx->event_ctx); + /* wait for events - this is where smbd sits for most of its + life */ + event_loop_wait(main_ctx->event_ctx); - /* as everything hangs off this event context, freeing it - should initiate a clean shutdown of all services */ - talloc_free(main_ctx->event_ctx); + /* as everything hangs off this event context, freeing it + should initiate a clean shutdown of all services */ + talloc_free(main_ctx->event_ctx); } |