Ignore:
File:
1 edited

Legend:

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

    rfbcdeb8 r6b82009  
    6666    packet_id_t packet_id, size_t size)
    6767{
     68        *packet = (packet_t *) as_get_mappable_page(size);
     69       
    6870        async_exch_t *exch = async_exchange_begin(sess);
    6971        ipc_call_t answer;
    7072        aid_t message = async_send_1(exch, NET_PACKET_GET, packet_id, &answer);
    71         int rc = async_share_in_start_0_0(exch, size, (void *) packet);
     73        int rc = async_share_in_start_0_0(exch, *packet, size);
    7274        async_exchange_end(exch);
    7375       
     
    7577        async_wait_for(message, &result);
    7678       
    77         if (rc != EOK)
     79        if (rc != EOK) {
     80                munmap(*packet, size);
    7881                return rc;
    79        
    80         if (packet == (void *) -1)
    81                 return ENOMEM;
     82        }
    8283       
    8384        rc = pm_add(*packet);
     
    114115       
    115116        *packet = pm_find(packet_id);
    116         if (*packet == NULL) {
     117        if (!*packet) {
    117118                async_exch_t *exch = async_exchange_begin(sess);
    118119                sysarg_t size;
     
    129130        }
    130131       
    131         if ((*packet != NULL) && ((*packet)->next)) {
     132        if ((*packet)->next) {
    132133                packet_t *next;
    133134                return packet_translate_remote(sess, &next, (*packet)->next);
Note: See TracChangeset for help on using the changeset viewer.