Changeset 1c6c3e1d in mainline for uspace/lib/hound/src/protocol.c
- Timestamp:
- 2023-10-22T17:55:33Z (20 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 350ec74
- Parents:
- 315d487 (diff), 133461c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
r315d487 r1c6c3e1d 1 1 /* 2 * Copyright (c) 2023 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. … … 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, id); 749 if (rc != EOK) { 750 loc_server_unregister(hound_srv); 751 return rc; 752 } 753 754 return EOK; 740 755 } 741 756 … … 746 761 void hound_server_unregister(service_id_t id) 747 762 { 748 loc_service_unregister(id); 763 loc_service_unregister(hound_srv, id); 764 loc_server_unregister(hound_srv); 749 765 } 750 766
Note:
See TracChangeset
for help on using the changeset viewer.