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

Diff for /src/usr.bin/telnet/commands.c between version 1.77 and 1.78

version 1.77, 2015/11/13 16:53:46 version 1.78, 2015/11/13 17:01:12
Line 429 
Line 429 
 }  }
   
 static int  static int
 togdebug(int unused)  
 {  
     if (net > 0 &&  
         (setsockopt(net, SOL_SOCKET, SO_DEBUG, &debug, sizeof(debug))) == -1) {  
             perror("setsockopt (SO_DEBUG)");  
     }  
     return 1;  
 }  
   
 static int  
 togcrlf(int unused)  togcrlf(int unused)
 {  {
     if (crlf) {      if (crlf) {
Line 605 
Line 595 
                 &localchars,                  &localchars,
                     "recognize certain control characters" },                      "recognize certain control characters" },
     { " ", "", 0, 0 },          /* empty line */      { " ", "", 0, 0 },          /* empty line */
     { "debug",  
         "debugging",  
             togdebug,  
                 &debug,  
                     "turn on socket level debugging" },  
     { "netdata",      { "netdata",
         "printing of hexadecimal network data (debugging)",          "printing of hexadecimal network data (debugging)",
             0,              0,
Line 1897 
Line 1882 
                     sizeof(tos)) < 0 && errno != ENOPROTOOPT)                      sizeof(tos)) < 0 && errno != ENOPROTOOPT)
                         perror("telnet: setsockopt (IPV6_TCLASS) (ignored)");                          perror("telnet: setsockopt (IPV6_TCLASS) (ignored)");
                 break;                  break;
         }  
   
         if (debug) {  
                 int one = 1;  
   
                 if (setsockopt(net, SOL_SOCKET, SO_DEBUG, &one,  
                     sizeof(one)) < 0)  
                         perror("setsockopt (SO_DEBUG)");  
         }          }
   
         if (connect(net, res->ai_addr, res->ai_addrlen) < 0) {          if (connect(net, res->ai_addr, res->ai_addrlen) < 0) {

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78