Changes in uspace/srv/net/tcp/service.c [cde999a:258d77e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/service.c
rcde999a r258d77e 37 37 #include <async.h> 38 38 #include <errno.h> 39 #include <str_error.h>40 39 #include <inet/endpoint.h> 41 40 #include <inet/inet.h> … … 433 432 * @param rconn_id Place to store ID of new connection 434 433 * 435 * @return EOK on success or anerror code434 * @return EOK on success or negative error code 436 435 */ 437 436 static int tcp_conn_create_impl(tcp_client_t *client, inet_ep2_t *epp, … … 507 506 * @param rlst_id Place to store ID of new listener 508 507 * 509 * @return EOK on success or anerror code508 * @return EOK on success or negative error code 510 509 */ 511 510 static int tcp_listener_create_impl(tcp_client_t *client, inet_ep_t *ep, … … 578 577 * @param conn_id Connection ID 579 578 * 580 * @return EOK on success or anerror code579 * @return EOK on success or negative error code 581 580 */ 582 581 static int tcp_conn_send_fin_impl(tcp_client_t *client, sysarg_t conn_id) … … 603 602 * @param conn_id Connection ID 604 603 * 605 * @return EOK on success or anerror code604 * @return EOK on success or negative error code 606 605 */ 607 606 static int tcp_conn_push_impl(tcp_client_t *client, sysarg_t conn_id) … … 628 627 * @param conn_id Connection ID 629 628 * 630 * @return EOK on success or anerror code629 * @return EOK on success or negative error code 631 630 */ 632 631 static int tcp_conn_reset_impl(tcp_client_t *client, sysarg_t conn_id) … … 654 653 * @param size Data size in bytes 655 654 * 656 * @return EOK on success or anerror code655 * @return EOK on success or negative error code 657 656 */ 658 657 static int tcp_conn_send_impl(tcp_client_t *client, sysarg_t conn_id, … … 661 660 tcp_cconn_t *cconn; 662 661 int rc; 663 tcp_error_t trc;664 662 665 663 rc = tcp_cconn_get(client, conn_id, &cconn); … … 667 665 return rc; 668 666 669 trc = tcp_uc_send(cconn->conn, data, size, 0);670 if ( trc != TCP_EOK)671 return EIO;667 rc = tcp_uc_send(cconn->conn, data, size, 0); 668 if (rc != EOK) 669 return rc; 672 670 673 671 return EOK; … … 684 682 * @param nrecv Place to store actual number of bytes received 685 683 * 686 * @return EOK on success or anerror code684 * @return EOK on success or negative error code 687 685 */ 688 686 static int tcp_conn_recv_impl(tcp_client_t *client, sysarg_t conn_id, … … 692 690 xflags_t xflags; 693 691 int rc; 694 tcp_error_t trc;695 692 696 693 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl()"); … … 702 699 } 703 700 704 trc = tcp_uc_receive(cconn->conn, data, size, nrecv, &xflags);705 if ( trc != TCP_EOK) {706 switch ( trc) {701 rc = tcp_uc_receive(cconn->conn, data, size, nrecv, &xflags); 702 if (rc != EOK) { 703 switch (rc) { 707 704 case TCP_EAGAIN: 708 705 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl() - EAGAIN"); … … 712 709 return EOK; 713 710 default: 714 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl() - trc=%d", trc);711 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl() - trc=%d", rc); 715 712 return EIO; 716 713 } … … 1098 1095 rc = tcp_conn_recv_impl(client, conn_id, data, size, &rsize); 1099 1096 if (rc != EOK) { 1100 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_wait_srv - recv_impl failed rc=% s", str_error_name(rc));1097 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_wait_srv - recv_impl failed rc=%d", rc); 1101 1098 async_answer_0(callid, rc); 1102 1099 async_answer_0(iid, rc); … … 1244 1241 /** Initialize TCP service. 1245 1242 * 1246 * @return EOK on success or anerror code.1243 * @return EOK on success or negative error code. 1247 1244 */ 1248 1245 int tcp_service_init(void)
Note:
See TracChangeset
for help on using the changeset viewer.