[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.192 and 1.193

version 1.192, 2018/08/10 17:15:22 version 1.193, 2018/09/06 13:23:02
Line 564 
Line 564 
                 }                  }
                 /* Allow only one connection at a time, but stay alive. */                  /* Allow only one connection at a time, but stay alive. */
                 for (;;) {                  for (;;) {
                         if (family != AF_UNIX)                          if (family != AF_UNIX) {
                                   if (s != -1)
                                           close(s);
                                 s = local_listen(host, uport, hints);                                  s = local_listen(host, uport, hints);
                           }
                         if (s < 0)                          if (s < 0)
                                 err(1, NULL);                                  err(1, NULL);
                         if (uflag && kflag) {                          if (uflag && kflag) {
Line 622 
Line 625 
                                 }                                  }
                                 close(connfd);                                  close(connfd);
                         }                          }
                         if (family != AF_UNIX)                          if (family == AF_UNIX && uflag) {
                                 close(s);  
                         else if (uflag) {  
                                 if (connect(s, NULL, 0) < 0)                                  if (connect(s, NULL, 0) < 0)
                                         err(1, "connect");                                          err(1, "connect");
                         }                          }

Legend:
Removed from v.1.192  
changed lines
  Added in v.1.193