summaryrefslogtreecommitdiffstats
path: root/polyp/pdispatch.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-15 13:15:51 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-15 13:15:51 +0000
commitefc3491f1f1ca42cd776f96ccfb006c53717d2e8 (patch)
treea55f3d43bd4b3cb4063ab870bcc224fba8a05454 /polyp/pdispatch.c
parentc17545108b33162fb186f797b8a408511e9252f4 (diff)
add support for volume manipulation
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@125 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/pdispatch.c')
-rw-r--r--polyp/pdispatch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/polyp/pdispatch.c b/polyp/pdispatch.c
index 9ed91fc5..c46d4f77 100644
--- a/polyp/pdispatch.c
+++ b/polyp/pdispatch.c
@@ -175,13 +175,14 @@ int pa_pdispatch_run(struct pa_pdispatch *pd, struct pa_packet*packet, void *use
if (r)
run_action(pd, r, command, ts);
- } else if (pd->command_table && command < pd->n_commands) {
+ } else if (pd->command_table && (command < pd->n_commands) && pd->command_table[command].proc) {
const struct pa_pdispatch_command *c = pd->command_table+command;
- if (c->proc)
- c->proc(pd, command, tag, ts, userdata);
- } else
+ c->proc(pd, command, tag, ts, userdata);
+ } else {
+ fprintf(stderr, "Recieved unsupported command %u\n", command);
goto finish;
+ }
ret = 0;