[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.150 and 1.151

version 1.150, 2001/12/20 22:50:24 version 1.151, 2001/12/27 20:39:58
Line 1734 
Line 1734 
   
         /* Get the data. */          /* Get the data. */
         data = packet_get_string(&data_len);          data = packet_get_string(&data_len);
         packet_done();  
   
         if (compat20) {          if (compat20) {
                 if (data_len > c->local_maxpacket) {                  if (data_len > c->local_maxpacket) {
Line 1748 
Line 1747 
                         return;                          return;
                 }                  }
                 c->local_window -= data_len;                  c->local_window -= data_len;
         }else{  
                 packet_integrity_check(plen, 4 + 4 + data_len, type);  
         }          }
           packet_done();
         buffer_append(&c->output, data, data_len);          buffer_append(&c->output, data, data_len);
         xfree(data);          xfree(data);
 }  }
Line 1801 
Line 1799 
         int id;          int id;
         Channel *c;          Channel *c;
   
         packet_integrity_check(plen, 4, type);  
   
         id = packet_get_int();          id = packet_get_int();
           packet_done();
         c = channel_lookup(id);          c = channel_lookup(id);
         if (c == NULL)          if (c == NULL)
                 packet_disconnect("Received ieof for nonexistent channel %d.", id);                  packet_disconnect("Received ieof for nonexistent channel %d.", id);
Line 1823 
Line 1820 
         int id;          int id;
         Channel *c;          Channel *c;
   
         packet_integrity_check(plen, 4, type);  
   
         id = packet_get_int();          id = packet_get_int();
           packet_done();
         c = channel_lookup(id);          c = channel_lookup(id);
         if (c == NULL)          if (c == NULL)
                 packet_disconnect("Received close for nonexistent channel %d.", id);                  packet_disconnect("Received close for nonexistent channel %d.", id);
Line 1861 
Line 1857 
 {  {
         int id = packet_get_int();          int id = packet_get_int();
         Channel *c = channel_lookup(id);          Channel *c = channel_lookup(id);
         packet_integrity_check(plen, 4, type);  
           packet_done();
         if (c == NULL)          if (c == NULL)
                 packet_disconnect("Received oclose for nonexistent channel %d.", id);                  packet_disconnect("Received oclose for nonexistent channel %d.", id);
         chan_rcvd_oclose(c);          chan_rcvd_oclose(c);
Line 1889 
Line 1886 
         int id, remote_id;          int id, remote_id;
         Channel *c;          Channel *c;
   
         if (!compat20)  
                 packet_integrity_check(plen, 4 + 4, type);  
   
         id = packet_get_int();          id = packet_get_int();
         c = channel_lookup(id);          c = channel_lookup(id);
   
Line 1906 
Line 1900 
         if (compat20) {          if (compat20) {
                 c->remote_window = packet_get_int();                  c->remote_window = packet_get_int();
                 c->remote_maxpacket = packet_get_int();                  c->remote_maxpacket = packet_get_int();
                 packet_done();  
                 if (c->cb_fn != NULL && c->cb_event == type) {                  if (c->cb_fn != NULL && c->cb_event == type) {
                         debug2("callback start");                          debug2("callback start");
                         c->cb_fn(c->self, c->cb_arg);                          c->cb_fn(c->self, c->cb_arg);
Line 1915 
Line 1908 
                 debug("channel %d: open confirm rwindow %d rmax %d", c->self,                  debug("channel %d: open confirm rwindow %d rmax %d", c->self,
                     c->remote_window, c->remote_maxpacket);                      c->remote_window, c->remote_maxpacket);
         }          }
           packet_done();
 }  }
   
 static char *  static char *
Line 1940 
Line 1934 
         char *msg = NULL, *lang = NULL;          char *msg = NULL, *lang = NULL;
         Channel *c;          Channel *c;
   
         if (!compat20)  
                 packet_integrity_check(plen, 4, type);  
   
         id = packet_get_int();          id = packet_get_int();
         c = channel_lookup(id);          c = channel_lookup(id);
   
Line 1955 
Line 1946 
                         msg  = packet_get_string(NULL);                          msg  = packet_get_string(NULL);
                         lang = packet_get_string(NULL);                          lang = packet_get_string(NULL);
                 }                  }
                 packet_done();  
                 log("channel %d: open failed: %s%s%s", id,                  log("channel %d: open failed: %s%s%s", id,
                     reason2txt(reason), msg ? ": ": "", msg ? msg : "");                      reason2txt(reason), msg ? ": ": "", msg ? msg : "");
                 if (msg != NULL)                  if (msg != NULL)
Line 1963 
Line 1953 
                 if (lang != NULL)                  if (lang != NULL)
                         xfree(lang);                          xfree(lang);
         }          }
           packet_done();
         /* Free the channel.  This will also close the socket. */          /* Free the channel.  This will also close the socket. */
         channel_free(c);          channel_free(c);
 }  }
Line 2868 
Line 2859 
         int remote_id, sock;          int remote_id, sock;
         char *name;          char *name;
   
         packet_integrity_check(plen, 4, type);  
   
         /* Read the remote channel number from the message. */          /* Read the remote channel number from the message. */
         remote_id = packet_get_int();          remote_id = packet_get_int();
           packet_done();
   
         /*          /*
          * Get a connection to the local authentication agent (this may again           * Get a connection to the local authentication agent (this may again

Legend:
Removed from v.1.150  
changed lines
  Added in v.1.151