[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.187.2.1 and 1.187.2.2

version 1.187.2.1, 2003/09/16 20:50:42 version 1.187.2.2, 2003/09/16 21:30:49
Line 228 
Line 228 
         if (found == -1) {          if (found == -1) {
                 /* There are no free slots.  Take last+1 slot and expand the array.  */                  /* There are no free slots.  Take last+1 slot and expand the array.  */
                 found = channels_alloc;                  found = channels_alloc;
                 channels_alloc += 10;  
                 if (channels_alloc > 10000)                  if (channels_alloc > 10000)
                         fatal("channel_new: internal error: channels_alloc %d "                          fatal("channel_new: internal error: channels_alloc %d "
                             "too big.", channels_alloc);                              "too big.", channels_alloc);
                   channels = xrealloc(channels,
                       (channels_alloc + 10) * sizeof(Channel *));
                   channels_alloc += 10;
                 debug2("channel: expanding %d", channels_alloc);                  debug2("channel: expanding %d", channels_alloc);
                 channels = xrealloc(channels, channels_alloc * sizeof(Channel *));  
                 for (i = found; i < channels_alloc; i++)                  for (i = found; i < channels_alloc; i++)
                         channels[i] = NULL;                          channels[i] = NULL;
         }          }

Legend:
Removed from v.1.187.2.1  
changed lines
  Added in v.1.187.2.2