Changes in uspace/lib/hound/src/protocol.c [cf13b17:c81132d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
rcf13b17 rc81132d 115 115 * @param name Valid string identifier 116 116 * @param record True if the application context wishes to receive data. 117 * @return Valid ID on success, Error code on failure. 118 */ 119 hound_context_id_t hound_service_register_context(hound_sess_t *sess, 120 const char *name, bool record) 117 * 118 * @param[out] id Return context ID. 119 * 120 * @return EOK on success, Error code on failure. 121 */ 122 int hound_service_register_context(hound_sess_t *sess, 123 const char *name, bool record, hound_context_id_t *id) 121 124 { 122 125 assert(sess); … … 126 129 aid_t mid = 127 130 async_send_1(exch, IPC_M_HOUND_CONTEXT_REGISTER, record, &call); 128 int ret = mid ? EOK : EPARTY;131 sysarg_t ret = mid ? EOK : EPARTY; 129 132 130 133 if (ret == EOK) … … 134 137 135 138 if (ret == EOK) 136 async_wait_for(mid, (sysarg_t *)&ret);139 async_wait_for(mid, &ret); 137 140 138 141 async_exchange_end(exch); 139 return ret == EOK ? (hound_context_id_t)IPC_GET_ARG1(call) : ret; 142 if (ret == EOK) { 143 *id = (hound_context_id_t)IPC_GET_ARG1(call); 144 } 145 146 return ret; 140 147 } 141 148 … … 182 189 ipc_call_t res_call; 183 190 aid_t mid = async_send_3(exch, IPC_M_HOUND_GET_LIST, flags, *count, 184 (bool)connection, &res_call);185 186 int ret = EOK;191 connection != NULL, &res_call); 192 193 sysarg_t ret = EOK; 187 194 if (mid && connection) 188 195 ret = async_data_write_start(exch, connection, … … 190 197 191 198 if (ret == EOK) 192 async_wait_for(mid, (sysarg_t*)&ret);199 async_wait_for(mid, &ret); 193 200 194 201 if (ret != EOK) { … … 252 259 ipc_call_t call; 253 260 aid_t id = async_send_0(exch, IPC_M_HOUND_CONNECT, &call); 254 int ret = id ? EOK : EPARTY;261 sysarg_t ret = id ? EOK : EPARTY; 255 262 if (ret == EOK) 256 263 ret = async_data_write_start(exch, source, str_size(source)); 257 264 if (ret == EOK) 258 265 ret = async_data_write_start(exch, sink, str_size(sink)); 259 async_wait_for(id, (sysarg_t*)&ret);266 async_wait_for(id, &ret); 260 267 async_exchange_end(exch); 261 268 return ret; … … 278 285 ipc_call_t call; 279 286 aid_t id = async_send_0(exch, IPC_M_HOUND_DISCONNECT, &call); 280 int ret = id ? EOK : EPARTY;287 sysarg_t ret = id ? EOK : EPARTY; 281 288 if (ret == EOK) 282 289 ret = async_data_write_start(exch, source, str_size(source)); 283 290 if (ret == EOK) 284 291 ret = async_data_write_start(exch, sink, str_size(sink)); 285 async_wait_for(id, (sysarg_t*)&ret);292 async_wait_for(id, &ret); 286 293 async_exchange_end(exch); 287 294 return ENOTSUP;
Note:
See TracChangeset
for help on using the changeset viewer.