Changeset 241f1985 in mainline for uspace/srv/sysman/connection_broker.c
- Timestamp:
- 2019-08-31T10:45:17Z (5 years ago)
- Children:
- 102f641
- Parents:
- f92b315
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-23 22:04:34)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-31 10:45:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/connection_broker.c
rf92b315 r241f1985 36 36 #include "sysman.h" 37 37 38 static void sysman_broker_register(ipc_call id_t iid, ipc_call_t *icall)38 static void sysman_broker_register(ipc_call_t *icall) 39 39 { 40 40 sysman_log(LVL_DEBUG2, "%s", __func__); 41 async_answer_0(i id, EOK);41 async_answer_0(icall, EOK); 42 42 /* 43 43 * What exactly do here? Similar behavior that has locsrv with … … 48 48 } 49 49 50 static void sysman_ipc_forwarded(ipc_call id_t iid, ipc_call_t *icall)50 static void sysman_ipc_forwarded(ipc_call_t *icall) 51 51 { 52 52 sysman_log(LVL_DEBUG2, "%s", __func__); 53 async_answer_0(i id, ENOTSUP);53 async_answer_0(icall, ENOTSUP); 54 54 // TODO implement 55 55 } 56 56 57 static void sysman_main_exposee_added(ipc_call id_t iid, ipc_call_t *icall)57 static void sysman_main_exposee_added(ipc_call_t *icall) 58 58 { 59 59 char *unit_name = NULL; … … 79 79 80 80 finish: 81 async_answer_0(i id, retval);81 async_answer_0(icall, retval); 82 82 free(unit_name); 83 83 } 84 84 85 static void sysman_exposee_added(ipc_call id_t iid, ipc_call_t *icall)85 static void sysman_exposee_added(ipc_call_t *icall) 86 86 { 87 87 char *exposee = NULL; … … 100 100 101 101 finish: 102 async_answer_0(i id, retval);102 async_answer_0(icall, retval); 103 103 free(exposee); 104 104 } 105 105 106 static void sysman_exposee_removed(ipc_call id_t iid, ipc_call_t *icall)106 static void sysman_exposee_removed(ipc_call_t *icall) 107 107 { 108 108 sysman_log(LVL_DEBUG2, "%s", __func__); 109 async_answer_0(i id, ENOTSUP);109 async_answer_0(icall, ENOTSUP); 110 110 // TODO implement 111 111 } 112 112 113 void sysman_connection_broker(ipc_call id_t iid, ipc_call_t *icall)113 void sysman_connection_broker(ipc_call_t *icall) 114 114 { 115 115 sysman_log(LVL_DEBUG2, "%s", __func__); 116 116 /* First, accept connection */ 117 async_answer_0(i id, EOK);117 async_answer_0(icall, EOK); 118 118 119 119 while (true) { 120 120 ipc_call_t call; 121 ipc_callid_t callid = async_get_call(&call); 122 123 if (!IPC_GET_IMETHOD(call)) { 121 122 if (!async_get_call(&call) || !ipc_get_imethod(&call)) { 124 123 /* Client disconnected */ 125 124 break; 126 125 } 127 126 128 switch ( IPC_GET_IMETHOD(call)) {127 switch (ipc_get_imethod(&call)) { 129 128 case SYSMAN_BROKER_REGISTER: 130 sysman_broker_register( callid,&call);129 sysman_broker_register(&call); 131 130 break; 132 131 case SYSMAN_BROKER_IPC_FWD: 133 sysman_ipc_forwarded( callid,&call);132 sysman_ipc_forwarded(&call); 134 133 break; 135 134 case SYSMAN_BROKER_MAIN_EXP_ADDED: 136 sysman_main_exposee_added( callid,&call);135 sysman_main_exposee_added(&call); 137 136 break; 138 137 case SYSMAN_BROKER_EXP_ADDED: 139 sysman_exposee_added( callid,&call);138 sysman_exposee_added(&call); 140 139 break; 141 140 case SYSMAN_BROKER_EXP_REMOVED: 142 sysman_exposee_removed( callid,&call);141 sysman_exposee_removed(&call); 143 142 break; 144 143 default: 145 async_answer_0( callid, ENOENT);144 async_answer_0(&call, ENOENT); 146 145 } 147 146 }
Note:
See TracChangeset
for help on using the changeset viewer.