X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=rfc1006%2Frfct.c;fp=rfc1006%2Frfct.c;h=3b2537ea4db4c3a26a7d24395436f279c67619a2;hp=8bcda3c1d61dd9345ac8789135070793804a5721;hb=86927dcf1fb5dbd4d30f2d906ff5ceba7319f142;hpb=dd509bd7c24e5c9f93f0c0072bfb91227142705b diff --git a/rfc1006/rfct.c b/rfc1006/rfct.c index 8bcda3c..3b2537e 100644 --- a/rfc1006/rfct.c +++ b/rfc1006/rfct.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: rfct.c,v $ - * Revision 1.3 1995-05-16 09:37:18 quinn + * Revision 1.4 1995-05-18 13:02:07 quinn + * Smallish. + * + * Revision 1.3 1995/05/16 09:37:18 quinn * Fixed bug * * Revision 1.2 1995/05/02 08:53:09 quinn @@ -777,6 +780,12 @@ static int t_look_wait(int fd, int wait) return T_LISTEN; /* the only possible type of event */ if ((res = read_n(fd, (char*) &head, 6)) < 0) return -1; + if (res == 0) + { + TRC(fprintf(stderr, "Network disconnect\n")); + return cnt->event = T_DISCONNECT; + } + TRC(fprintf(stderr, "t_look got %d bytes\n", res)); if (head.version != RFC_VERSION) { TRC(fprintf(stderr, "Got bad RFC1006 version in t_look: %d.\n",