Changeset 7c912b6 in mainline for uspace/app/nterm/conn.c


Ignore:
Timestamp:
2012-05-12T09:39:20Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d67e16
Parents:
01a7aa1
Message:

Fix delivery of end-of-connection condition.

File:
1 edited

Legend:

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

    r01a7aa1 r7c912b6  
    3838#include <net/socket.h>
    3939#include <stdio.h>
     40#include <str_error.h>
    4041#include <sys/types.h>
    4142
     
    4647static fid_t rcv_fid;
    4748
    48 #define RECV_BUF_SIZE 1
     49#define RECV_BUF_SIZE 1024
    4950static uint8_t recv_buf[RECV_BUF_SIZE];
    5051
     
    6162        }
    6263
    63         printf("Recv fibril terminated.\n");
     64        if (nr == ENOTCONN)
     65                printf("\n[Other side has closed the connection]\n");
     66        else
     67                printf("'\n[Receive errror (%s)]\n", str_error(nr));
    6468
    6569        return 0;
Note: See TracChangeset for help on using the changeset viewer.