diff options
Diffstat (limited to 'src/pulsecore/cli.c')
-rw-r--r-- | src/pulsecore/cli.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c index 9fff7347..b3c639f8 100644 --- a/src/pulsecore/cli.c +++ b/src/pulsecore/cli.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of PulseAudio. @@ -59,7 +57,8 @@ struct pa_cli { pa_client *client; - int fail, kill_requested, defer_kill; + pa_bool_t fail, kill_requested; + int defer_kill; }; static void line_callback(pa_ioline *line, const char *s, void *userdata); @@ -81,19 +80,20 @@ pa_cli* pa_cli_new(pa_core *core, pa_iochannel *io, pa_module *m) { pa_assert_se(c->client = pa_client_new(core, __FILE__, cname)); c->client->kill = client_kill; c->client->userdata = c; - c->client->owner = m; + c->client->module = m; pa_ioline_set_callback(c->line, line_callback, c); pa_ioline_puts(c->line, "Welcome to PulseAudio! Use \"help\" for usage information.\n"PROMPT); - c->fail = c->kill_requested = c->defer_kill = 0; + c->fail = c->kill_requested = FALSE; + c->defer_kill = 0; return c; } void pa_cli_free(pa_cli *c) { pa_assert(c); - + pa_ioline_close(c->line); pa_ioline_unref(c->line); pa_client_free(c->client); @@ -102,13 +102,13 @@ void pa_cli_free(pa_cli *c) { static void client_kill(pa_client *client) { pa_cli *c; - + pa_assert(client); pa_assert_se(c = client->userdata); pa_log_debug("CLI client killed."); if (c->defer_kill) - c->kill_requested = 1; + c->kill_requested = TRUE; else { if (c->eof_callback) c->eof_callback(c, c->userdata); @@ -119,7 +119,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { pa_strbuf *buf; pa_cli *c = userdata; char *p; - + pa_assert(line); pa_assert(c); @@ -147,7 +147,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { void pa_cli_set_eof_callback(pa_cli *c, void (*cb)(pa_cli*c, void *userdata), void *userdata) { pa_assert(c); - + c->eof_callback = cb; c->userdata = userdata; } |