[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.26 and 1.27

version 1.26, 2001/06/26 21:57:35 version 1.27, 2001/06/26 23:06:53
Line 174 
Line 174 
   
         if (lflag) {          if (lflag) {
                 int connfd;                  int connfd;
   
                 if ((s = local_listen(host, uport, hints)) < 0)  
                         errx(1, NULL);  
   
                 ret = 0;                  ret = 0;
   
                 /* Allow only one connection at a time, but stay alive */                  /* Allow only one connection at a time, but stay alive */
                 for (;;) {                  for (;;) {
                           if ((s = local_listen(host, uport, hints)) < 0)
                                   errx(1, NULL);
                         /*                          /*
                          * For UDP, we will use recvfrom() initially                           * For UDP, we will use recvfrom() initially
                          * to wait for a caller, then use the regular                           * to wait for a caller, then use the regular
Line 211 
Line 210 
   
                         readwrite(connfd);                          readwrite(connfd);
                         close(connfd);                          close(connfd);
                           close(s);
   
                         if (!kflag)                          if (!kflag)
                                 break;                                  break;
                 }                  }

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27