Changeset 1bc35b5 in mainline for uspace/srv/net/nil/nildummy/nildummy.c
- Timestamp:
- 2012-01-19T08:13:45Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8da56b
- Parents:
- 3ea725e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/nil/nildummy/nildummy.c
r3ea725e r1bc35b5 370 370 } 371 371 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 372 393 int nil_module_message(ipc_callid_t callid, ipc_call_t *call, 373 394 ipc_call_t *answer, size_t *answer_count) … … 431 452 432 453 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)); 438 455 async_answer_0(callid, (sysarg_t) rc); 439 456 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.