Ignore:
File:
1 edited

Legend:

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

    re882e3a r6b82009  
    3838#include <ipc/services.h>
    3939#include <ipc/net_net.h>
     40
    4041#include <malloc.h>
    41 #include <async.h>
     42
    4243#include <generic.h>
    4344#include <net/modules.h>
     
    9798    size_t count, uint8_t **data)
    9899{
    99         return generic_translate_req(sess, NET_NET_GET_CONF, 0, 0,
     100        return generic_translate_req(sess, NET_NET_GET_DEVICE_CONF, 0, 0,
    100101            *configuration, count, configuration, data);
    101102}
     
    123124 *
    124125 */
    125 int net_get_device_conf_req(async_sess_t *sess, nic_device_id_t device_id,
     126int net_get_device_conf_req(async_sess_t *sess, device_id_t device_id,
    126127    measured_string_t **configuration, size_t count, uint8_t **data)
    127128{
     
    130131}
    131132
    132 int net_get_devices_req(async_sess_t *sess, measured_string_t **devices,
    133     size_t *count, uint8_t **data)
    134 {
    135         if ((!devices) || (!count))
    136                 return EBADMEM;
    137        
    138         async_exch_t *exch = async_exchange_begin(sess);
    139        
    140         int rc = async_req_0_1(exch, NET_NET_GET_DEVICES_COUNT, count);
    141         if (rc != EOK) {
    142                 async_exchange_end(exch);
    143                 return rc;
    144         }
    145        
    146         if (*count == 0) {
    147                 async_exchange_end(exch);
    148                 *data = NULL;
    149                 return EOK;
    150         }
    151        
    152         aid_t message_id = async_send_0(exch, NET_NET_GET_DEVICES, NULL);
    153         rc = measured_strings_return(exch, devices, data, *count);
    154        
    155         async_exchange_end(exch);
    156        
    157         sysarg_t result;
    158         async_wait_for(message_id, &result);
    159        
    160         if ((rc == EOK) && (result != EOK)) {
    161                 free(*devices);
    162                 free(*data);
    163         }
    164        
    165         return (int) result;
    166 }
    167 
    168133/** @}
    169134 */
Note: See TracChangeset for help on using the changeset viewer.