Ignore:
Timestamp:
2012-01-21T12:57:55Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eaa0c3f
Parents:
47a89fe (diff), e86b8f0 (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 with mainline

File:
1 edited

Legend:

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

    r47a89fe r86c71de  
    370370}
    371371
     372static 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
    372393int nil_module_message(ipc_callid_t callid, ipc_call_t *call,
    373394    ipc_call_t *answer, size_t *answer_count)
     
    431452       
    432453        case NET_NIL_RECEIVED:
    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                
     454                rc = nildummy_received(IPC_GET_ARG1(*call));
    438455                async_answer_0(callid, (sysarg_t) rc);
    439456                return rc;
Note: See TracChangeset for help on using the changeset viewer.