Changes in uspace/lib/hound/src/protocol.c [ca48672:fafb8e5] in mainline
- File:
-
- 1 edited
-
uspace/lib/hound/src/protocol.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
rca48672 rfafb8e5 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda3 2 * Copyright (c) 2012 Jan Vesely 4 3 * All rights reserved. … … 85 84 const char *HOUND_SERVICE = "audio/hound"; 86 85 87 /** Server object */88 static loc_srv_t *hound_srv;89 90 86 /** 91 87 * Start a new audio session. … … 398 394 void *sink; 399 395 400 /* Accept connection if there is a valid iface */396 /* Accept connection if there is a valid iface*/ 401 397 if (server_iface) { 402 398 async_accept_0(icall); … … 551 547 ret = async_data_write_accept(&source, true, 0, 0, 0, 552 548 0); 553 /* read sink name */549 /*read sink name */ 554 550 if (ret == EOK) 555 551 ret = async_data_write_accept(&sink, … … 615 611 case IPC_M_HOUND_STREAM_EXIT: 616 612 case IPC_M_HOUND_STREAM_DRAIN: 617 /* Stream exit/drain is only allowed in stream context */613 /* Stream exit/drain is only allowed in stream context*/ 618 614 async_answer_0(&call, EINVAL); 619 615 break; … … 734 730 errno_t hound_server_register(const char *name, service_id_t *id) 735 731 { 736 errno_t rc;737 738 732 if (!name || !id) 739 733 return EINVAL; 740 734 741 if (hound_srv != NULL) 742 return EBUSY; 743 744 rc = loc_server_register(name, &hound_srv); 745 if (rc != EOK) 746 return rc; 747 748 rc = loc_service_register(hound_srv, HOUND_SERVICE, 749 fallback_port_id, id); 750 if (rc != EOK) { 751 loc_server_unregister(hound_srv); 752 return rc; 753 } 754 755 return EOK; 735 errno_t ret = loc_server_register(name); 736 if (ret != EOK) 737 return ret; 738 739 return loc_service_register(HOUND_SERVICE, id); 756 740 } 757 741 … … 762 746 void hound_server_unregister(service_id_t id) 763 747 { 764 loc_service_unregister(hound_srv, id); 765 loc_server_unregister(hound_srv); 748 loc_service_unregister(id); 766 749 } 767 750
Note:
See TracChangeset
for help on using the changeset viewer.
