Changes in uspace/srv/net/udp/service.c [cde999a:58e8646] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/service.c
rcde999a r58e8646 205 205 * @param rassoc_id Place to store ID of new association 206 206 * 207 * @return EOK on success or anerror code207 * @return EOK on success or negative error code 208 208 */ 209 209 static int udp_assoc_create_impl(udp_client_t *client, inet_ep2_t *epp, … … 305 305 * @param size Message size 306 306 * 307 * @return EOK on success or anerror code307 * @return EOK on success or negative error code 308 308 */ 309 309 static int udp_assoc_send_msg_impl(udp_client_t *client, sysarg_t assoc_id, … … 570 570 571 571 rc = async_data_read_finalize(callid, &enext->epp.remote, 572 max(size, (s ize_t)sizeof(inet_ep_t)));572 max(size, (ssize_t)sizeof(inet_ep_t))); 573 573 if (rc != EOK) { 574 574 async_answer_0(iid, rc); … … 596 596 { 597 597 ipc_callid_t callid; 598 s ize_t msg_size;598 ssize_t msg_size; 599 599 udp_crcv_queue_entry_t *enext; 600 600 void *data; 601 601 size_t size; 602 s ize_t off;602 ssize_t off; 603 603 int rc; 604 604 … … 623 623 msg_size = enext->msg->data_size; 624 624 625 if (off > msg_size) { 626 async_answer_0(callid, EINVAL); 627 async_answer_0(iid, EINVAL); 628 return; 629 } 630 631 rc = async_data_read_finalize(callid, data, min(msg_size - off, size)); 625 rc = async_data_read_finalize(callid, data, max(msg_size - off, 626 (ssize_t)size)); 632 627 if (rc != EOK) { 633 628 async_answer_0(iid, rc); … … 750 745 /** Initialize UDP service. 751 746 * 752 * @return EOK on success or anerror code.747 * @return EOK on success or negative error code. 753 748 */ 754 749 int udp_service_init(void)
Note:
See TracChangeset
for help on using the changeset viewer.