Changeset b5cf742a in mainline for uspace/lib/c/generic/inetcfg.c
- Timestamp:
- 2013-06-28T16:22:42Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- edf0d27
- Parents:
- e52b4b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inetcfg.c
re52b4b5 rb5cf742a 159 159 *addr_id = IPC_GET_ARG1(answer); 160 160 161 return retval;161 return (int) retval; 162 162 } 163 163 … … 178 178 size_t act_size; 179 179 char name_buf[LOC_NAME_MAXLEN + 1]; 180 181 async_exch_t *exch = async_exchange_begin(inetcfg_sess); 182 180 181 async_exch_t *exch = async_exchange_begin(inetcfg_sess); 182 183 183 ipc_call_t answer; 184 184 aid_t req = async_send_1(exch, INETCFG_ADDR_GET, addr_id, &answer); 185 185 aid_t dreq = async_data_read(exch, name_buf, LOC_NAME_MAXLEN, &dreply); 186 186 async_wait_for(dreq, &dretval); 187 188 async_exchange_end(exch); 189 187 188 async_exchange_end(exch); 189 190 190 if (dretval != EOK) { 191 191 async_forget(req); 192 192 return dretval; 193 193 } 194 194 195 195 sysarg_t retval; 196 196 async_wait_for(req, &retval); 197 197 198 198 if (retval != EOK) 199 return retval;200 199 return (int) retval; 200 201 201 act_size = IPC_GET_ARG2(dreply); 202 202 assert(act_size <= LOC_NAME_MAXLEN); 203 203 204 name_buf[act_size] = '\0'; 204 205 … … 207 208 ainfo->ilink = IPC_GET_ARG3(answer); 208 209 ainfo->name = str_dup(name_buf); 209 210 210 211 return EOK; 211 212 } … … 340 341 341 342 async_exch_t *exch = async_exchange_begin(inetcfg_sess); 342 343 343 344 ipc_call_t answer; 344 345 aid_t req = async_send_1(exch, INETCFG_SROUTE_GET, sroute_id, &answer); 345 346 aid_t dreq = async_data_read(exch, name_buf, LOC_NAME_MAXLEN, &dreply); 346 347 async_wait_for(dreq, &dretval); 347 348 async_exchange_end(exch); 349 348 349 async_exchange_end(exch); 350 350 351 if (dretval != EOK) { 351 352 async_forget(req); 352 353 return dretval; 353 354 } 354 355 355 356 sysarg_t retval; 356 357 async_wait_for(req, &retval); 357 358 358 359 if (retval != EOK) 359 return retval;360 360 return (int) retval; 361 361 362 act_size = IPC_GET_ARG2(dreply); 362 363 assert(act_size <= LOC_NAME_MAXLEN); … … 367 368 inet_addr_unpack(IPC_GET_ARG3(answer), &srinfo->router); 368 369 srinfo->name = str_dup(name_buf); 369 370 370 371 return EOK; 371 372 }
Note:
See TracChangeset
for help on using the changeset viewer.