summaryrefslogtreecommitdiffstats
path: root/polyp/protocol-native.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-20 10:54:31 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-20 10:54:31 +0000
commit6bc53405011e815b95e47a078f89b1a7c0419e56 (patch)
treefae2d0a3fdd1c75074b7981f9c00c7496a2a1afb /polyp/protocol-native.c
parentf9b58fb0eafdc332e500a0851b0506146c2b14cd (diff)
build fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@142 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/protocol-native.c')
-rw-r--r--polyp/protocol-native.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/polyp/protocol-native.c b/polyp/protocol-native.c
index d633c265..c8e5137e 100644
--- a/polyp/protocol-native.c
+++ b/polyp/protocol-native.c
@@ -1154,25 +1154,27 @@ static void command_get_info_list(struct pa_pdispatch *pd, uint32_t command, uin
assert(command == PA_COMMAND_GET_SAMPLE_INFO_LIST);
i = c->protocol->core->scache;
}
-
- for (p = pa_idxset_first(i, &index); p; p = pa_idxset_next(i, &index)) {
- if (command == PA_COMMAND_GET_SINK_INFO_LIST)
- sink_fill_tagstruct(reply, p);
- else if (command == PA_COMMAND_GET_SOURCE_INFO_LIST)
- source_fill_tagstruct(reply, p);
- else if (command == PA_COMMAND_GET_CLIENT_INFO_LIST)
- client_fill_tagstruct(reply, p);
- else if (command == PA_COMMAND_GET_MODULE_INFO_LIST)
- module_fill_tagstruct(reply, p);
- else if (command == PA_COMMAND_GET_SINK_INPUT_INFO_LIST)
- sink_input_fill_tagstruct(reply, p);
- else if (command == PA_COMMAND_GET_SOURCE_OUTPUT_INFO_LIST)
- source_output_fill_tagstruct(reply, p);
- else {
- assert(command == PA_COMMAND_GET_SAMPLE_INFO_LIST);
- scache_fill_tagstruct(reply, p);
+
+ if (i) {
+ for (p = pa_idxset_first(i, &index); p; p = pa_idxset_next(i, &index)) {
+ if (command == PA_COMMAND_GET_SINK_INFO_LIST)
+ sink_fill_tagstruct(reply, p);
+ else if (command == PA_COMMAND_GET_SOURCE_INFO_LIST)
+ source_fill_tagstruct(reply, p);
+ else if (command == PA_COMMAND_GET_CLIENT_INFO_LIST)
+ client_fill_tagstruct(reply, p);
+ else if (command == PA_COMMAND_GET_MODULE_INFO_LIST)
+ module_fill_tagstruct(reply, p);
+ else if (command == PA_COMMAND_GET_SINK_INPUT_INFO_LIST)
+ sink_input_fill_tagstruct(reply, p);
+ else if (command == PA_COMMAND_GET_SOURCE_OUTPUT_INFO_LIST)
+ source_output_fill_tagstruct(reply, p);
+ else {
+ assert(command == PA_COMMAND_GET_SAMPLE_INFO_LIST);
+ scache_fill_tagstruct(reply, p);
+ }
}
- }
+ }
pa_pstream_send_tagstruct(c->pstream, reply);
}