diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-21 12:58:42 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-21 23:13:41 +0200 |
commit | a32e79764c4f4c7120d5a8537f9e77920f23b5c6 (patch) | |
tree | 5b85f509bebd351ab1165d30b751e8edc5a0a0c7 /src/pa-sink-ctl.c | |
parent | badb9650df460fa3999ac937958ac05f97eaad88 (diff) | |
download | pa-sink-ctl-a32e79764c4f4c7120d5a8537f9e77920f23b5c6.tar.gz pa-sink-ctl-a32e79764c4f4c7120d5a8537f9e77920f23b5c6.tar.bz2 pa-sink-ctl-a32e79764c4f4c7120d5a8537f9e77920f23b5c6.zip |
Fix ident mistakes introduces by previous mass changes
Variables were substituted by sed, so indentation got messed up.
Diffstat (limited to 'src/pa-sink-ctl.c')
-rw-r--r-- | src/pa-sink-ctl.c | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c index 32d7873..f8a74b8 100644 --- a/src/pa-sink-ctl.c +++ b/src/pa-sink-ctl.c @@ -42,7 +42,7 @@ main(int argc, char** argv) g_printerr("error: pa_context_new() failed.\n"); return -1; } - + // define callback for connection init pa_context_set_state_callback(ctx->context, context_state_callback, ctx); if (pa_context_connect(ctx->context, NULL, PA_CONTEXT_NOAUTOSPAWN, NULL)) { @@ -82,40 +82,39 @@ context_state_callback(pa_context *c, gpointer userdata) ctx->context_ready = FALSE; switch (pa_context_get_state(c)) { - case PA_CONTEXT_CONNECTING: - interface_set_status(ctx, "connecting..."); - break; - case PA_CONTEXT_AUTHORIZING: - interface_set_status(ctx, "authorizing..."); - break; - case PA_CONTEXT_SETTING_NAME: - interface_set_status(ctx, "setting name..."); - break; - - case PA_CONTEXT_READY: - collect_all_info(ctx); - pa_context_set_subscribe_callback(c, subscribe_cb, ctx); - g_assert((ctx->op = pa_context_subscribe(c, (pa_subscription_mask_t) ( - PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SINK_INPUT - ), NULL, NULL))); - ctx->context_ready = TRUE; - interface_set_status(ctx, "ready to process events."); - break; - case PA_CONTEXT_FAILED: - interface_set_status(ctx, "cannot connect!"); - break; - - case PA_CONTEXT_TERMINATED: - g_assert(ctx->op != NULL); - pa_operation_cancel(ctx->op); - pa_operation_unref(ctx->op); - ctx->op = NULL; - interface_set_status(ctx, "connection terminated."); - g_main_loop_quit(ctx->loop); - break; - default: - interface_set_status(ctx, "unknown state"); - break; + case PA_CONTEXT_CONNECTING: + interface_set_status(ctx, "connecting..."); + break; + case PA_CONTEXT_AUTHORIZING: + interface_set_status(ctx, "authorizing..."); + break; + case PA_CONTEXT_SETTING_NAME: + interface_set_status(ctx, "setting name..."); + break; + + case PA_CONTEXT_READY: + collect_all_info(ctx); + pa_context_set_subscribe_callback(c, subscribe_cb, ctx); + pa_subscription_mask_t mask = PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SINK_INPUT; + g_assert((ctx->op = pa_context_subscribe(c, (pa_subscription_mask_t) (mask), NULL, NULL))); + ctx->context_ready = TRUE; + interface_set_status(ctx, "ready to process events."); + break; + case PA_CONTEXT_FAILED: + interface_set_status(ctx, "cannot connect!"); + break; + + case PA_CONTEXT_TERMINATED: + g_assert(ctx->op != NULL); + pa_operation_cancel(ctx->op); + pa_operation_unref(ctx->op); + ctx->op = NULL; + interface_set_status(ctx, "connection terminated."); + g_main_loop_quit(ctx->loop); + break; + default: + interface_set_status(ctx, "unknown state"); + break; } } |