Changeset b5cf742a in mainline for uspace/app/nterm/conn.c


Ignore:
Timestamp:
2013-06-28T16:22:42Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
edf0d27
Parents:
e52b4b5
Message:

cstyle (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nterm/conn.c

    re52b4b5 rb5cf742a  
    103103                goto error;
    104104        }
    105 
     105       
    106106        conn_fd = socket(PF_INET, SOCK_STREAM, 0);
    107107        if (conn_fd < 0)
    108108                goto error;
    109 
     109       
    110110        printf("Connecting to host %s port %u\n", addr_s, ntohs(addr.sin_port));
    111 
     111       
    112112        rc = connect(conn_fd, (struct sockaddr *)&addr, sizeof(addr));
    113113        if (rc != EOK)
    114114                goto error;
    115 
     115       
    116116        rcv_fid = fibril_create(rcv_fibril, NULL);
    117117        if (rcv_fid == 0)
    118118                goto error;
    119 
     119       
    120120        fibril_add_ready(rcv_fid);
    121 
     121       
    122122        return EOK;
    123 
     123       
    124124error:
    125125        if (conn_fd >= 0) {
     
    127127                conn_fd = -1;
    128128        }
    129 
     129       
    130130        return EIO;
    131131}
     
    133133int conn_send(void *data, size_t size)
    134134{
    135         int rc;
    136 
    137         rc = send(conn_fd, data, size, 0);
     135        int rc = send(conn_fd, data, size, 0);
    138136        if (rc != EOK)
    139137                return EIO;
    140 
     138       
    141139        return EOK;
    142140}
Note: See TracChangeset for help on using the changeset viewer.