Changes in uspace/lib/packet/generic/packet_server.c [01b87dc5:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/packet/generic/packet_server.c
r01b87dc5 rffa2c8ef 44 44 #include <unistd.h> 45 45 #include <sys/mman.h> 46 47 #include <ipc/ipc.h>48 46 #include <ipc/packet.h> 49 47 #include <ipc/net.h> 50 51 48 #include <net/packet.h> 52 49 #include <net/packet_header.h> … … 292 289 293 290 if (!async_share_in_receive(&callid, &size)) { 294 ipc_answer_0(callid, EINVAL);291 async_answer_0(callid, EINVAL); 295 292 return EINVAL; 296 293 } 297 294 298 295 if (size != packet->length) { 299 ipc_answer_0(callid, ENOMEM);296 async_answer_0(callid, ENOMEM); 300 297 return ENOMEM; 301 298 } … … 322 319 int 323 320 packet_server_message(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer, 324 int *answer_count)321 size_t *answer_count) 325 322 { 326 323 packet_t *packet; … … 333 330 case NET_PACKET_CREATE_1: 334 331 packet = packet_get_local(DEFAULT_ADDR_LEN, DEFAULT_PREFIX, 335 IPC_GET_CONTENT( call), DEFAULT_SUFFIX);332 IPC_GET_CONTENT(*call), DEFAULT_SUFFIX); 336 333 if (!packet) 337 334 return ENOMEM; … … 343 340 case NET_PACKET_CREATE_4: 344 341 packet = packet_get_local( 345 ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN( call)) ?346 IPC_GET_ADDR_LEN( call) : DEFAULT_ADDR_LEN),347 DEFAULT_PREFIX + IPC_GET_PREFIX( call),348 IPC_GET_CONTENT( call),349 DEFAULT_SUFFIX + IPC_GET_SUFFIX( call));342 ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(*call)) ? 343 IPC_GET_ADDR_LEN(*call) : DEFAULT_ADDR_LEN), 344 DEFAULT_PREFIX + IPC_GET_PREFIX(*call), 345 IPC_GET_CONTENT(*call), 346 DEFAULT_SUFFIX + IPC_GET_SUFFIX(*call)); 350 347 if (!packet) 351 348 return ENOMEM; … … 356 353 357 354 case NET_PACKET_GET: 358 packet = pm_find(IPC_GET_ID( call));355 packet = pm_find(IPC_GET_ID(*call)); 359 356 if (!packet_is_valid(packet)) 360 357 return ENOENT; … … 362 359 363 360 case NET_PACKET_GET_SIZE: 364 packet = pm_find(IPC_GET_ID( call));361 packet = pm_find(IPC_GET_ID(*call)); 365 362 if (!packet_is_valid(packet)) 366 363 return ENOENT; … … 370 367 371 368 case NET_PACKET_RELEASE: 372 return packet_release_wrapper(IPC_GET_ID( call));369 return packet_release_wrapper(IPC_GET_ID(*call)); 373 370 } 374 371
Note:
See TracChangeset
for help on using the changeset viewer.