Changeset 6906f61 in mainline
- Timestamp:
- 2012-07-13T21:31:42Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88a37b5
- Parents:
- 43c40a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/hound.c
r43c40a3 r6906f61 161 161 { 162 162 assert(hound); 163 if (!source || !source->name ) {163 if (!source || !source->name || str_cmp(source->name, "default") == 0) { 164 164 log_debug("Invalid source specified."); 165 165 return EINVAL; … … 187 187 { 188 188 assert(hound); 189 if (!sink || !sink->name ) {189 if (!sink || !sink->name || str_cmp(sink->name, "default") == 0) { 190 190 log_debug("Invalid source specified."); 191 191 return EINVAL; … … 242 242 log_verbose("Connecting '%s' to '%s'.", source_name, sink_name); 243 243 fibril_mutex_lock(&hound->list_guard); 244 244 245 audio_source_t *source = 245 find_source_by_name(&hound->sources, source_name); 246 audio_sink_t *sink = find_sink_by_name(&hound->sinks, sink_name); 246 audio_source_list_instance(list_first(&hound->sources)); 247 if (str_cmp(source_name, "default") != 0) 248 source = find_source_by_name(&hound->sources, source_name); 249 250 audio_sink_t *sink = 251 audio_sink_list_instance(list_first(&hound->sinks)); 252 if (str_cmp(sink_name, "default") != 0) 253 sink = find_sink_by_name(&hound->sinks, sink_name); 254 247 255 if (!source || !sink) { 248 256 fibril_mutex_unlock(&hound->list_guard); … … 274 282 assert(fibril_mutex_is_locked(&hound->list_guard)); 275 283 log_verbose("Disconnecting '%s' to '%s'.", source_name, sink_name); 276 audio_sink_t *sink = find_sink_by_name(&hound->sinks, sink_name); 277 audio_source_t *source = sink ? find_source_by_name(&sink->sources, source_name) : NULL; 284 285 audio_sink_t *sink = 286 audio_sink_list_instance(list_first(&hound->sinks)); 287 if (str_cmp(sink_name, "default") != 0) 288 sink = find_sink_by_name(&hound->sinks, sink_name); 289 290 audio_source_t *source = 291 audio_source_list_instance(list_first(&hound->sources)); 292 if (str_cmp(source_name, "default") != 0) 293 source = sink ? find_source_by_name(&sink->sources, source_name) : NULL; 278 294 if (!source || !sink) { 279 295 log_debug("Source (%p), or sink (%p) not found", source, sink);
Note:
See TracChangeset
for help on using the changeset viewer.