lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev WATT-32 fixes for compiling DJGPP lynx


From: Doug Kaufman
Subject: lynx-dev WATT-32 fixes for compiling DJGPP lynx
Date: Sun, 31 Oct 1999 22:35:13 -0800 (PST)

Gisle,
The changes you indicated for watt-32 2.0 dev.rel.6 seem to work to
allow the DJGPP port of lynx to run without the early termination of
downloads. The following is the patch that I applied to the watt-32
distribution from your site. Please let me know if I got any of this
wrong in interpreting your messages. I am copying this to the lynx-dev
and watt-32 mailing lists for the benefit of anyone else compiling
lynx with watt-32. Thanks for the help.
                               Doug

--- src/pctcp.c Thu Sep  9 07:43:20 1999
+++ src/pctcp.c.new     Sun Oct 31 00:14:18 1999
@@ -1078,14 +1078,10 @@
  */
 static int tcp_write (tcp_Socket *s, BYTE *data, UINT len)
 {
-  UINT room;
-
   if (s->state != tcp_StateESTAB)
-     len = 0;
-
-  room = s->maxrdatalen - s->datalen;
-  if (len > room)
-      len = room;
+     return (0);
+ 
+  len = min (len, tcp_MaxTxBufSize - s->datalen);
   if (len > 0)
   {
     memcpy (s->data+s->datalen, data, len);
@@ -1422,9 +1418,7 @@
       cmp_timers(s->rtt_time,schedule_timeout) < 0)
      s->rtt_time = schedule_timeout;
 
-#if 0  /* !! resetting tx-timer */
   s->datatimer = 0;   /* EE 99.08.23 */
-#endif
 }
 
 /*
--- select_c.ori        Fri Aug 13 11:36:58 1999
+++ select.c    Wed Oct 27 22:40:38 1999
@@ -272,7 +272,8 @@
     if (first_loop)
       _sock_debugf (socket, ", udp");
 
-    if (socket->so_state & SS_CANTRCVMORE)
+    if ((socket->so_state & SS_CANTRCVMORE) &&
+        (sock_rbused(sk) == 0))
     {
       _sock_debugf (NULL, ", EPIPE");
       SOCK_ERR (EPIPE);
@@ -311,7 +312,8 @@
   * as call accept() and you won't be blocked instead of call read
   * and you won't be blocked.
   */
-  if (!tcp_tick(sk) || (socket->so_state & SS_CANTRCVMORE))
+  if ((!tcp_tick(sk) || (socket->so_state & SS_CANTRCVMORE)) &&
+      (sock_rbused(sk) == 0))
   {
     _sock_debugf (NULL,", EPIPE");
     SOCK_ERR (EPIPE);

__
Doug Kaufman
Internet: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]