Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/nildummy/nildummy.c

    r1bc35b5 r6d8455d  
    370370}
    371371
    372 static int nildummy_received(nic_device_id_t device_id)
    373 {
    374         void *data;
    375         size_t size;
    376         int rc;
    377 
    378         rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
    379         if (rc != EOK)
    380                 return rc;
    381 
    382         packet_t *packet = packet_get_1_remote(nildummy_globals.net_sess, size);
    383         if (packet == NULL)
    384                 return ENOMEM;
    385 
    386         void *pdata = packet_suffix(packet, size);
    387         memcpy(pdata, data, size);
    388         free(pdata);
    389 
    390         return nil_received_msg_local(device_id, packet);
    391 }
    392 
    393372int nil_module_message(ipc_callid_t callid, ipc_call_t *call,
    394373    ipc_call_t *answer, size_t *answer_count)
     
    452431       
    453432        case NET_NIL_RECEIVED:
    454                 rc = nildummy_received(IPC_GET_ARG1(*call));
     433                rc = packet_translate_remote(nildummy_globals.net_sess, &packet,
     434                    IPC_GET_ARG2(*call));
     435                if (rc == EOK)
     436                        rc = nil_received_msg_local(IPC_GET_ARG1(*call), packet);
     437               
    455438                async_answer_0(callid, (sysarg_t) rc);
    456439                return rc;
Note: See TracChangeset for help on using the changeset viewer.