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