[BACK]Return to netcat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / nc

Diff for /src/usr.bin/nc/netcat.c between version 1.206 and 1.207

version 1.206, 2019/08/08 16:49:35 version 1.207, 2019/10/17 14:29:24
Line 1259 
Line 1259 
                 if (pfd[POLL_NETIN].fd == -1 && netinbufpos == 0) {                  if (pfd[POLL_NETIN].fd == -1 && netinbufpos == 0) {
                         pfd[POLL_STDOUT].fd = -1;                          pfd[POLL_STDOUT].fd = -1;
                 }                  }
   
                   if (((usetls || Nflag) && (pfd[POLL_NETIN].fd == -1)) ||
                       (usetls && pfd[POLL_NETOUT].fd == -1)) {
                           /*
                            * -N says: shutdown(2) the 'network socket'
                            * after EOF on the input
                            *
                            * for TLS we need to die if either end is
                            * toast, since both reading and writing to
                            * the socket may be necessary for any higher
                            * level tls operation
                            */
                           shutdown(pfd[POLL_NETOUT].fd, SHUT_WR);
                           shutdown(pfd[POLL_NETIN].fd, SHUT_RD);
                           pfd[POLL_NETOUT].fd = -1;
                           pfd[POLL_NETIN].fd = -1;
                   }
         }          }
 }  }
   

Legend:
Removed from v.1.206  
changed lines
  Added in v.1.207