[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.312 and 1.313

version 1.312, 2011/09/09 22:46:44 version 1.313, 2011/09/10 22:26:34
Line 2816 
Line 2816 
   
 int  int
 channel_cancel_lport_listener(const char *lhost, u_short lport,  channel_cancel_lport_listener(const char *lhost, u_short lport,
     u_short cport, int gateway_ports)      int cport, int gateway_ports)
 {  {
         u_int i;          u_int i;
         int found = 0;          int found = 0;
Line 2826 
Line 2826 
                 Channel *c = channels[i];                  Channel *c = channels[i];
                 if (c == NULL || c->type != SSH_CHANNEL_PORT_LISTENER)                  if (c == NULL || c->type != SSH_CHANNEL_PORT_LISTENER)
                         continue;                          continue;
                 if (c->listening_port != lport || c->host_port != cport)                  if (c->listening_port != lport)
                         continue;                          continue;
                   if (cport == CHANNEL_CANCEL_PORT_STATIC) {
                           /* skip dynamic forwardings */
                           if (c->host_port == 0)
                                   continue;
                   } else {
                           if (c->host_port != cport)
                                   continue;
                   }
                 if ((c->listening_addr == NULL && addr != NULL) ||                  if ((c->listening_addr == NULL && addr != NULL) ||
                     (c->listening_addr != NULL && addr == NULL))                      (c->listening_addr != NULL && addr == NULL))
                         continue;                          continue;

Legend:
Removed from v.1.312  
changed lines
  Added in v.1.313