Changeset 63a3276 in mainline for uspace/srv/sysman/connection_broker.c
- Timestamp:
- 2019-08-06T19:20:35Z (5 years ago)
- Children:
- 3f05ef7
- Parents:
- 72c8f77
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-06-17 23:02:03)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-06 19:20:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/connection_broker.c
r72c8f77 r63a3276 29 29 #include <errno.h> 30 30 #include <ipc/sysman.h> 31 #include <stdlib.h> 31 32 33 #include "configuration.h" 32 34 #include "connection_broker.h" 33 35 #include "log.h" 36 #include "sysman.h" 34 37 35 38 static void sysman_broker_register(ipc_callid_t iid, ipc_call_t *icall) … … 54 57 static void sysman_main_exposee_added(ipc_callid_t iid, ipc_call_t *icall) 55 58 { 56 sysman_log(LVL_DEBUG2, "%s", __func__); 57 async_answer_0(iid, ENOTSUP); 58 // TODO implement 59 char *unit_name = NULL; 60 sysarg_t retval; 61 62 int rc = async_data_write_accept((void **) &unit_name, true, 63 0, 0, 0, NULL); 64 if (rc != EOK) { 65 retval = rc; 66 goto finish; 67 } 68 69 unit_t *unit = configuration_find_unit_by_name(unit_name); 70 if (unit == NULL) { 71 //sysman_log(LVL_NOTE, "Unit '%s' not found.", unit_name); 72 retval = ENOENT; 73 goto finish; 74 } 75 76 // TODO propagate caller task ID 77 sysman_raise_event(&sysman_event_unit_exposee_created, unit); 78 79 retval = EOK; 80 81 finish: 82 async_answer_0(iid, retval); 83 free(unit_name); 59 84 } 60 85 61 86 static void sysman_exposee_added(ipc_callid_t iid, ipc_call_t *icall) 62 87 { 63 sysman_log(LVL_DEBUG2, "%s", __func__); 64 async_answer_0(iid, ENOTSUP); 65 // TODO implement 88 char *exposee = NULL; 89 sysarg_t retval; 90 91 /* Just accept data and further not supported. */ 92 int rc = async_data_write_accept((void **) &exposee, true, 93 0, 0, 0, NULL); 94 if (rc != EOK) { 95 retval = rc; 96 goto finish; 97 } 98 99 //sysman_log(LVL_DEBUG2, "%s(%s)", __func__, exposee); 100 101 retval = ENOTSUP; 102 103 finish: 104 async_answer_0(iid, retval); 105 free(exposee); 66 106 } 67 107
Note:
See TracChangeset
for help on using the changeset viewer.