Changeset 7aaed09 in mainline for uspace/lib/net/generic/generic.c


Ignore:
Timestamp:
2011-12-18T14:02:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c868e2d
Parents:
3b71e84d (diff), 1761268 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/generic/generic.c

    r3b71e84d r7aaed09  
    104104    nic_device_id_t device_id, uint8_t *address, size_t max_len)
    105105{
    106         if (!address)
    107                 return EBADMEM;
     106        aid_t aid;
     107        ipc_call_t result;
     108       
     109        assert(address != NULL);
    108110       
    109111        /* Request the address */
    110112        async_exch_t *exch = async_exchange_begin(sess);
    111         aid_t aid = async_send_1(exch, message, (sysarg_t) device_id,
    112             NULL);
     113        aid = async_send_1(exch, message, (sysarg_t) device_id, &result);
     114       
     115        sysarg_t ipcrc;
    113116        int rc = async_data_read_start(exch, address, max_len);
    114117        async_exchange_end(exch);
    115118       
    116         sysarg_t result;
    117         async_wait_for(aid, &result);
    118        
    119         if (rc != EOK)
     119        if (rc != EOK) {
     120                async_wait_for(aid, &ipcrc);
    120121                return rc;
    121        
    122         return (int) result;
     122        }
     123       
     124        async_wait_for(aid, &ipcrc);
     125        if (ipcrc == EOK) {
     126                return IPC_GET_ARG1(result);
     127        } else {
     128                return (int) ipcrc;
     129        }
    123130}
    124131
Note: See TracChangeset for help on using the changeset viewer.