Fix console networking issue
authorAri Johnson <ari@theari.com>
Sun, 24 Jun 2018 20:04:22 +0000 (16:04 -0400)
committerAri Johnson <ari@theari.com>
Sun, 24 Jun 2018 20:04:22 +0000 (16:04 -0400)
src/bsd.c

index 38e428f64ef69180443194da0a8c5cee3eda51ad..53a4f39eeee947184b3278673214db81af655437 100644 (file)
--- a/src/bsd.c
+++ b/src/bsd.c
@@ -2210,10 +2210,8 @@ process_output(DESC *d)
 
   for (qp = &d->output.head; ((cur = *qp) != NULL);) {
 #ifdef COMPILE_CONSOLE
-    if (d->descriptor == 0) {
-      cnt = write(STDOUT_FILENO, cur->start, cur->nchars);
-    }
-#else /* COMPILE_CONSOLE */
+    cnt = write(STDOUT_FILENO, cur->start, cur->nchars);
+#else
 #ifdef HAS_OPENSSL
     if (d->ssl) {
       cnt = 0;
@@ -2223,7 +2221,6 @@ process_output(DESC *d)
        return 1;               /* Need to retry */
     } else {
 #endif
-#endif /* COMPILE_CONSOLE */
       cnt = send(d->descriptor, cur->start, cur->nchars, 0);
       if (cnt < 0) {
 #ifdef WIN32
@@ -2238,11 +2235,10 @@ process_output(DESC *d)
          return 1;
        return 0;
       }
-#ifndef COMPILE_CONSOLE
 #ifdef HAS_OPENSSL
     }
 #endif
-#endif
+#endif /* COMPILE_CONSOLE */
     d->output_size -= cnt;
     d->output_chars += cnt;
     if (cnt == cur->nchars) {