Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/service.c

    rcde999a r258d77e  
    3737#include <async.h>
    3838#include <errno.h>
    39 #include <str_error.h>
    4039#include <inet/endpoint.h>
    4140#include <inet/inet.h>
     
    433432 * @param rconn_id Place to store ID of new connection
    434433 *
    435  * @return EOK on success or an error code
     434 * @return EOK on success or negative error code
    436435 */
    437436static int tcp_conn_create_impl(tcp_client_t *client, inet_ep2_t *epp,
     
    507506 * @param rlst_id Place to store ID of new listener
    508507 *
    509  * @return EOK on success or an error code
     508 * @return EOK on success or negative error code
    510509*/
    511510static int tcp_listener_create_impl(tcp_client_t *client, inet_ep_t *ep,
     
    578577 * @param conn_id Connection ID
    579578 *
    580  * @return EOK on success or an error code
     579 * @return EOK on success or negative error code
    581580 */
    582581static int tcp_conn_send_fin_impl(tcp_client_t *client, sysarg_t conn_id)
     
    603602 * @param conn_id Connection ID
    604603 *
    605  * @return EOK on success or an error code
     604 * @return EOK on success or negative error code
    606605 */
    607606static int tcp_conn_push_impl(tcp_client_t *client, sysarg_t conn_id)
     
    628627 * @param conn_id Connection ID
    629628 *
    630  * @return EOK on success or an error code
     629 * @return EOK on success or negative error code
    631630 */
    632631static int tcp_conn_reset_impl(tcp_client_t *client, sysarg_t conn_id)
     
    654653 * @param size    Data size in bytes
    655654 *
    656  * @return EOK on success or an error code
     655 * @return EOK on success or negative error code
    657656 */
    658657static int tcp_conn_send_impl(tcp_client_t *client, sysarg_t conn_id,
     
    661660        tcp_cconn_t *cconn;
    662661        int rc;
    663         tcp_error_t trc;
    664662
    665663        rc = tcp_cconn_get(client, conn_id, &cconn);
     
    667665                return rc;
    668666
    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;
    672670
    673671        return EOK;
     
    684682 * @param nrecv   Place to store actual number of bytes received
    685683 *
    686  * @return EOK on success or an error code
     684 * @return EOK on success or negative error code
    687685 */
    688686static int tcp_conn_recv_impl(tcp_client_t *client, sysarg_t conn_id,
     
    692690        xflags_t xflags;
    693691        int rc;
    694         tcp_error_t trc;
    695692
    696693        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl()");
     
    702699        }
    703700
    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) {
    707704                case TCP_EAGAIN:
    708705                        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_impl() - EAGAIN");
     
    712709                        return EOK;
    713710                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);
    715712                        return EIO;
    716713                }
     
    10981095        rc = tcp_conn_recv_impl(client, conn_id, data, size, &rsize);
    10991096        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);
    11011098                async_answer_0(callid, rc);
    11021099                async_answer_0(iid, rc);
     
    12441241/** Initialize TCP service.
    12451242 *
    1246  * @return EOK on success or an error code.
     1243 * @return EOK on success or negative error code.
    12471244 */
    12481245int tcp_service_init(void)
Note: See TracChangeset for help on using the changeset viewer.