Moved version.h to include/
[yaz-moved-to-github.git] / rfc1006 / rfct.c
index 8bcda3c..c31bce7 100644 (file)
@@ -4,7 +4,13 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: rfct.c,v $
- * Revision 1.3  1995-05-16 09:37:18  quinn
+ * Revision 1.5  1995-05-31 08:29:35  quinn
+ * Nothing significant.
+ *
+ * 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
@@ -249,7 +255,7 @@ int t_open(char *name, int oflag, struct t_info *info)
        cnt->oci[i] = -1;
 
     /*
-     * RFC1006 sets a higher than standard default max TPDU size, but the
+     * RFC1006 sets a higher than standard (TP) default max TPDU size, but the
      * Isode seems to like to negotiate it down. We'll keep it here to be
      * safe. Note that there's no harm in jumping it up. If it's higher
      * than 2048, t_connect won't try to negotiate.
@@ -777,6 +783,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",