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

Diff for /src/usr.bin/ssh/channels.c between version 1.84 and 1.85

version 1.84, 2001/01/29 16:55:36 version 1.85, 2001/01/29 19:42:35
Line 546 
Line 546 
         struct sockaddr addr;          struct sockaddr addr;
         int newsock, newch;          int newsock, newch;
         socklen_t addrlen;          socklen_t addrlen;
         char buf[16384], *remote_hostname;          char buf[16384], *remote_ipaddr;
         int remote_port;          int remote_port;
   
         if (FD_ISSET(c->sock, readset)) {          if (FD_ISSET(c->sock, readset)) {
Line 557 
Line 557 
                         error("accept: %.100s", strerror(errno));                          error("accept: %.100s", strerror(errno));
                         return;                          return;
                 }                  }
                 remote_hostname = get_remote_hostname(newsock);                  remote_ipaddr = get_peer_ipaddr(newsock);
                 remote_port = get_peer_port(newsock);                  remote_port = get_peer_port(newsock);
                 snprintf(buf, sizeof buf, "X11 connection from %.200s port %d",                  snprintf(buf, sizeof buf, "X11 connection from %.200s port %d",
                     remote_hostname, remote_port);                      remote_ipaddr, remote_port);
   
                 newch = channel_new("x11",                  newch = channel_new("x11",
                     SSH_CHANNEL_OPENING, newsock, newsock, -1,                      SSH_CHANNEL_OPENING, newsock, newsock, -1,
Line 572 
Line 572 
                         packet_put_int(newch);                          packet_put_int(newch);
                         packet_put_int(c->local_window_max);                          packet_put_int(c->local_window_max);
                         packet_put_int(c->local_maxpacket);                          packet_put_int(c->local_maxpacket);
                         /* originator host and port */                          /* originator ipaddr and port */
                         packet_put_cstring(remote_hostname);                          packet_put_cstring(remote_ipaddr);
                         if (datafellows & SSH_BUG_X11FWD) {                          if (datafellows & SSH_BUG_X11FWD) {
                                 debug("ssh2 x11 bug compat mode");                                  debug("ssh2 x11 bug compat mode");
                         } else {                          } else {
Line 587 
Line 587 
                                 packet_put_string(buf, strlen(buf));                                  packet_put_string(buf, strlen(buf));
                         packet_send();                          packet_send();
                 }                  }
                 xfree(remote_hostname);                  xfree(remote_ipaddr);
         }          }
 }  }
   

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85