Changeset 6d74977 in mainline
- Timestamp:
- 2013-04-05T15:38:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 02ead2e
- Parents:
- 1f440f5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
r1f440f5f r6d74977 486 486 ipc_call_t call; 487 487 size_t size = 0; 488 int ret_answer = EOK; 488 489 while (async_data_write_receive_call(&callid, &call, &size) 489 490 || (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN)) { … … 495 496 continue; 496 497 } 498 if (ret_answer != EOK) { 499 async_answer_0(callid, ret_answer); 500 continue; 501 } 497 502 char *buffer = malloc(size); 498 503 if (!buffer) { … … 500 505 continue; 501 506 } 502 int ret = async_data_write_finalize(callid, buffer, size);507 const int ret = async_data_write_finalize(callid, buffer, size); 503 508 if (ret == EOK) { 504 ret = server_iface->stream_data_write(509 ret_answer = server_iface->stream_data_write( 505 510 stream, buffer, size); 506 511 } 507 async_answer_0(callid, ret);508 512 } 509 513 const int ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT … … 519 523 ipc_call_t call; 520 524 size_t size = 0; 525 int ret_answer = EOK; 521 526 while (async_data_read_receive_call(&callid, &call, &size) 522 527 || (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN)) { … … 528 533 continue; 529 534 } 535 if (ret_answer != EOK) { 536 async_answer_0(callid, ret_answer); 537 continue; 538 } 530 539 char *buffer = malloc(size); 531 540 if (!buffer) { … … 535 544 int ret = server_iface->stream_data_read(stream, buffer, size); 536 545 if (ret == EOK) { 537 ret = async_data_read_finalize(callid, buffer, size);538 }539 async_answer_0(callid, ret);546 ret_answer = 547 async_data_read_finalize(callid, buffer, size); 548 } 540 549 } 541 550 const int ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT
Note:
See TracChangeset
for help on using the changeset viewer.