Changes in uspace/lib/hound/src/protocol.c [25a179e:cf13b17] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
r25a179e rcf13b17 115 115 * @param name Valid string identifier 116 116 * @param record True if the application context wishes to receive data. 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) 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) 124 121 { 125 122 assert(sess); … … 137 134 138 135 if (ret == EOK) 139 async_wait_for(mid, &ret);136 async_wait_for(mid, (sysarg_t *)&ret); 140 137 141 138 async_exchange_end(exch); 142 if (ret == EOK) { 143 *id = (hound_context_id_t)IPC_GET_ARG1(call); 144 } 145 146 return ret; 139 return ret == EOK ? (hound_context_id_t)IPC_GET_ARG1(call) : ret; 147 140 } 148 141 … … 189 182 ipc_call_t res_call; 190 183 aid_t mid = async_send_3(exch, IPC_M_HOUND_GET_LIST, flags, *count, 191 connection != NULL, &res_call);184 (bool)connection, &res_call); 192 185 193 186 int ret = EOK; … … 197 190 198 191 if (ret == EOK) 199 async_wait_for(mid, &ret);192 async_wait_for(mid, (sysarg_t*)&ret); 200 193 201 194 if (ret != EOK) { … … 264 257 if (ret == EOK) 265 258 ret = async_data_write_start(exch, sink, str_size(sink)); 266 async_wait_for(id, &ret);259 async_wait_for(id, (sysarg_t*)&ret); 267 260 async_exchange_end(exch); 268 261 return ret; … … 290 283 if (ret == EOK) 291 284 ret = async_data_write_start(exch, sink, str_size(sink)); 292 async_wait_for(id, &ret);285 async_wait_for(id, (sysarg_t*)&ret); 293 286 async_exchange_end(exch); 294 287 return ENOTSUP;
Note:
See TracChangeset
for help on using the changeset viewer.