Changeset 1433ecda in mainline for uspace/srv/audio/hound/hound.c
- Timestamp:
- 2018-04-04T15:42:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/hound.c
r47b2d7e3 r1433ecda 111 111 } 112 112 113 static errno_t hound_disconnect_internal(hound_t *hound, const char * source_name, const char*sink_name);113 static errno_t hound_disconnect_internal(hound_t *hound, const char *source_name, const char *sink_name); 114 114 115 115 /** … … 287 287 if (ret != EOK) { 288 288 log_debug("Failed to initialize new audio device: %s", 289 289 str_error(ret)); 290 290 free(dev); 291 291 return ret; … … 517 517 * @return Error code. 518 518 */ 519 errno_t hound_connect(hound_t *hound, const char * source_name, const char*sink_name)519 errno_t hound_connect(hound_t *hound, const char *source_name, const char *sink_name) 520 520 { 521 521 assert(hound); … … 526 526 audio_source_list_instance(list_first(&hound->sources)); 527 527 if (str_cmp(source_name, "default") != 0) 528 528 source = find_source_by_name(&hound->sources, source_name); 529 529 530 530 audio_sink_t *sink = 531 531 audio_sink_list_instance(list_first(&hound->sinks)); 532 532 if (str_cmp(sink_name, "default") != 0) 533 533 sink = find_sink_by_name(&hound->sinks, sink_name); 534 534 535 535 if (!source || !sink) { … … 556 556 * @return Error code. 557 557 */ 558 errno_t hound_disconnect(hound_t *hound, const char * source_name, const char*sink_name)558 errno_t hound_disconnect(hound_t *hound, const char *source_name, const char *sink_name) 559 559 { 560 560 assert(hound); … … 574 574 * This function has to be called with the list_guard lock held. 575 575 */ 576 static errno_t hound_disconnect_internal(hound_t *hound, const char *source_name,577 const char *sink_name)576 static errno_t hound_disconnect_internal(hound_t *hound, const char *source_name, 577 const char *sink_name) 578 578 { 579 579 assert(hound); … … 585 585 if (str_cmp(connection_source_name(conn), source_name) == 0 || 586 586 str_cmp(connection_sink_name(conn), sink_name) == 0) { 587 588 589 590 587 log_debug("Removing %s -> %s", connection_source_name(conn), 588 connection_sink_name(conn)); 589 list_remove(it); 590 connection_destroy(conn); 591 591 } 592 592 }
Note:
See TracChangeset
for help on using the changeset viewer.