Changeset dc5c303 in mainline for uspace/lib/hound/src/protocol.c
- Timestamp:
 - 2023-12-28T13:59:23Z (23 months ago)
 - Children:
 - 6b66de6b
 - Parents:
 - 42c2e65 (diff), f87ff8e (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. - git-author:
 - boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
 - git-committer:
 - GitHub <noreply@…> (2023-12-28 13:59:23)
 - File:
 - 
      
- 1 edited
 
- 
          
  uspace/lib/hound/src/protocol.c (modified) (4 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/lib/hound/src/protocol.c
r42c2e65 rdc5c303 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.
  