[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.18 and 1.19

version 1.18, 2000/12/01 02:25:58 version 1.19, 2001/01/16 20:20:48
Line 939 
Line 939 
                                 netretry--;     /* we actually try a coupla                                  netretry--;     /* we actually try a coupla
                                                  * times. */                                                   * times. */
                         if (!netretry) {                          if (!netretry) {
                                 if (o_verbose)  /* normally we don't                                  if (o_verbose > 1)      /* normally we don't
                                                          * care */                                                           * care */
                                         nlog(0, "net timeout");                                          nlog(0, "net timeout");
                                 close(fd);                                  close(fd);
Line 1296 
Line 1296 
                                 if (o_zero && o_udpmode)                                  if (o_zero && o_udpmode)
                                         netfd = udptest(netfd, themaddr);                                          netfd = udptest(netfd, themaddr);
                         if (netfd > 0) {                          if (netfd > 0) {
                                 x = 0;                                  x = errno = 0;
                                 if (o_verbose) {                                  if (o_verbose) {
                                         nlog(0, "%s [%s] %d (%s) open",                                          nlog(0, "%s [%s] %d (%s) open",
                                                 whereto->name,                                                  whereto->name,
Line 1307 
Line 1307 
                                         x = readwrite(netfd);                                          x = readwrite(netfd);
                         } else {                          } else {
                                 x = 1;                                  x = 1;
                                 if ((Single || (o_verbose))                                  if ((Single || (o_verbose > 1))
                                    || (errno != ECONNREFUSED)) {                                     || (errno != ECONNREFUSED)) {
                                         nlog(0, "%s [%s] %d (%s)",                                          nlog(0, "%s [%s] %d (%s)",
                                              whereto->name, whereto->addrs[0],                                               whereto->name, whereto->addrs[0],
Line 1324 
Line 1324 
                     }                      }
                 optind++;                  optind++;
         }          }
           errno = 0;
         nlog(0, "Sent %i Rcvd %i", wrote_net, wrote_out);          if (o_verbose > 1)
                   nlog(0, "Sent %i Rcvd %i", wrote_net, wrote_out);
         if (Single)          if (Single)
                 exit(x);                  exit(x);
         exit(0);          exit(0);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19