public boolean register(VChannel v) throws RdesktopException {
if (!RDPConnection.conf.use_rdp5) {
return false;
}
if (num_channels >= MAX_CHANNELS) {
throw new RdesktopException("Channel table full. Could not register channel.");
}
channels[num_channels] = v;
v.set_mcs_id(MCS.MCS_GLOBAL_CHANNEL + 1 + num_channels);
num_channels++;