Bug fixes and select on FIFOs in wcgi - doesn't really work!
[egate.git] / www / wproto.c
index daaf967..49b82b7 100644 (file)
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wproto.c,v $
- * Revision 1.4  1995/10/31 16:56:25  adam
+ * Revision 1.5  1995/11/02 16:35:37  adam
+ * Bug fixes and select on FIFOs in wcgi - doesn't really work!
+ *
+ * Revision 1.4  1995/10/31  16:56:25  adam
  * Record presentation.
  *
  * Revision 1.3  1995/10/27  15:12:10  adam
@@ -146,6 +149,7 @@ int wo_flush(WCLIENT wc)
            gw_log (GW_LOG_FATAL|GW_LOG_ERRNO, mod, "write response");
            return -1;
        }
+        gw_log (GW_LOG_DEBUG, mod, "wrote %d bytes", wrote);
        if (wc->cache_fd >= 0)
            if (write(wc->cache_fd, wc->outbuffer + wc->outbuffer_offset,
                towrite) < 0)
@@ -271,6 +275,7 @@ int wproto_process(WCLIENT wc, int timeout)
            gw_log (GW_LOG_STAT, mod, 
                     "wproto_process returning 0 after %d second timeout.",
                    timeout);
+            unlink (wc->wf_serverp);
            return 0;
        }
         /* determine handle (fifo or user) */
@@ -306,7 +311,10 @@ int wproto_process(WCLIENT wc, int timeout)
            wo_finish(wc);
        }
        else
+        {
+            unlink (wc->wf_serverp);
            return 1;
+        }
     }
 }