| 3346 |
|
|
| 3347 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 3348 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, local_channel_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, local_channel_num); |
| 3349 |
|
if (c == NULL) { |
| 3350 |
|
#ifdef I18N |
| 3351 |
|
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 3352 |
|
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 3353 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 3354 |
|
#else |
| 3355 |
|
notify_nonfatal_error(pvar,"Could not open new channel. TTSSH is already opening too many channels."); |
| 3356 |
|
#endif |
| 3357 |
|
return; |
| 3358 |
|
} |
| 3359 |
|
|
| 3360 |
msg = buffer_init(); |
msg = buffer_init(); |
| 3361 |
if (msg == NULL) { |
if (msg == NULL) { |
| 6436 |
// changed window size from 64KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 64KB to 32KB. (2006.3.6 yutaka) |
| 6437 |
c = ssh2_channel_new(CHAN_SES_PACKET_DEFAULT, CHAN_SES_PACKET_DEFAULT, TYPE_SHELL, -1); |
c = ssh2_channel_new(CHAN_SES_PACKET_DEFAULT, CHAN_SES_PACKET_DEFAULT, TYPE_SHELL, -1); |
| 6438 |
if (c == NULL) { |
if (c == NULL) { |
| 6439 |
// TODO: error check |
#ifdef I18N |
| 6440 |
|
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 6441 |
|
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 6442 |
|
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 6443 |
|
#else |
| 6444 |
|
notify_fatal_error(pvar,"Could not open new channel. TTSSH is already opening too many channels."); |
| 6445 |
|
#endif |
| 6446 |
return FALSE; |
return FALSE; |
| 6447 |
} |
} |
| 6448 |
// シェルのIDを取っておく |
// シェルのIDを取っておく |
| 7135 |
// channelをアロケートし、必要な情報(remote window size)をここで取っておく。 |
// channelをアロケートし、必要な情報(remote window size)をここで取っておく。 |
| 7136 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 7137 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
| 7138 |
|
if (c == NULL) { |
| 7139 |
|
#ifdef I18N |
| 7140 |
|
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 7141 |
|
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 7142 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 7143 |
|
#else |
| 7144 |
|
notify_nonfatal_error(pvar,"Could not open new channel. TTSSH is already opening too many channels."); |
| 7145 |
|
#endif |
| 7146 |
|
return FALSE; |
| 7147 |
|
} |
| 7148 |
c->remote_id = remote_id; |
c->remote_id = remote_id; |
| 7149 |
c->remote_window = remote_window; |
c->remote_window = remote_window; |
| 7150 |
c->remote_maxpacket = remote_maxpacket; |
c->remote_maxpacket = remote_maxpacket; |
| 7166 |
// channelをアロケートし、必要な情報(remote window size)をここで取っておく。 |
// channelをアロケートし、必要な情報(remote window size)をここで取っておく。 |
| 7167 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 7168 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
| 7169 |
|
if (c == NULL) { |
| 7170 |
|
#ifdef I18N |
| 7171 |
|
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 7172 |
|
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 7173 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 7174 |
|
#else |
| 7175 |
|
notify_nonfatal_error(pvar,"Could not open new channel. TTSSH is already opening too many channels."); |
| 7176 |
|
#endif |
| 7177 |
|
return FALSE; |
| 7178 |
|
} |
| 7179 |
c->remote_id = remote_id; |
c->remote_id = remote_id; |
| 7180 |
c->remote_window = remote_window; |
c->remote_window = remote_window; |
| 7181 |
c->remote_maxpacket = remote_maxpacket; |
c->remote_maxpacket = remote_maxpacket; |
| 7354 |
|
|
| 7355 |
/* |
/* |
| 7356 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 7357 |
|
* Revision 1.74 2007/04/26 11:11:10 maya |
| 7358 |
|
* Fix a bug. |
| 7359 |
|
* |
| 7360 |
* Revision 1.73 2007/04/26 10:18:27 yutakapon |
* Revision 1.73 2007/04/26 10:18:27 yutakapon |
| 7361 |
* port fowardingにおいて、channel close時にSSH2チャネル構造体を解放していなかったバグを修正した。 |
* port fowardingにおいて、channel close時にSSH2チャネル構造体を解放していなかったバグを修正した。 |
| 7362 |
* |
* |