diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.117 2001/04/30 11:18:52 markus Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.118 2001/05/04 23:47:34 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -1058,8 +1058,8 @@ ssh_session2_callback(int id, void *arg) | |||
1058 | int | 1058 | int |
1059 | ssh_session2_command(void) | 1059 | ssh_session2_command(void) |
1060 | { | 1060 | { |
1061 | int id, window, packetmax; | 1061 | Channel *c; |
1062 | int in, out, err; | 1062 | int window, packetmax, in, out, err; |
1063 | 1063 | ||
1064 | if (stdin_null_flag) { | 1064 | if (stdin_null_flag) { |
1065 | in = open(_PATH_DEVNULL, O_RDONLY); | 1065 | in = open(_PATH_DEVNULL, O_RDONLY); |
@@ -1086,18 +1086,20 @@ ssh_session2_command(void) | |||
1086 | window *= 2; | 1086 | window *= 2; |
1087 | packetmax *=2; | 1087 | packetmax *=2; |
1088 | } | 1088 | } |
1089 | id = channel_new( | 1089 | c = channel_new( |
1090 | "session", SSH_CHANNEL_OPENING, in, out, err, | 1090 | "session", SSH_CHANNEL_OPENING, in, out, err, |
1091 | window, packetmax, CHAN_EXTENDED_WRITE, | 1091 | window, packetmax, CHAN_EXTENDED_WRITE, |
1092 | xstrdup("client-session"), /*nonblock*/0); | 1092 | xstrdup("client-session"), /*nonblock*/0); |
1093 | if (c == NULL) | ||
1094 | fatal("ssh_session2_command: channel_new failed"); | ||
1093 | 1095 | ||
1094 | debug("channel_new: %d", id); | 1096 | debug3("ssh_session2_command: channel_new: %d", c->self); |
1095 | 1097 | ||
1096 | channel_open(id); | 1098 | channel_open(c->self); |
1097 | channel_register_callback(id, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, | 1099 | channel_register_callback(c->self, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, |
1098 | ssh_session2_callback, (void *)0); | 1100 | ssh_session2_callback, (void *)0); |
1099 | 1101 | ||
1100 | return id; | 1102 | return c->self; |
1101 | } | 1103 | } |
1102 | 1104 | ||
1103 | int | 1105 | int |