crWaitUntilV(pktin);
- if (pktin->type != SSH2_MSG_CHANNEL_SUCCESS) {
- if (pktin->type != SSH2_MSG_CHANNEL_FAILURE) {
- bombout(("Unexpected response to X11 forwarding request:"
- " packet type %d", pktin->type));
- sfree(s);
- crStopV;
- }
- logevent("X11 forwarding refused");
- } else {
+ if (pktin->type == SSH2_MSG_CHANNEL_SUCCESS) {
logevent("X11 forwarding enabled");
ssh->X11_fwd_enabled = TRUE;
- }
+ } else
+ logevent("X11 forwarding refused");
}
sfree(s);
crFinishV;
crWaitUntilV(pktin);
- if (pktin->type != SSH2_MSG_CHANNEL_SUCCESS) {
- if (pktin->type != SSH2_MSG_CHANNEL_FAILURE) {
- bombout(("Unexpected response to agent forwarding request:"
- " packet type %d", pktin->type));
- crStopV;
- }
- logevent("Agent forwarding refused");
- } else {
+ if (pktin->type == SSH2_MSG_CHANNEL_SUCCESS) {
logevent("Agent forwarding enabled");
ssh->agentfwd_enabled = TRUE;
- }
+ } else
+ logevent("Agent forwarding refused");
}
sfree(s);
crFinishV;
crWaitUntilV(pktin);
- if (pktin->type != SSH2_MSG_CHANNEL_SUCCESS) {
- if (pktin->type != SSH2_MSG_CHANNEL_FAILURE) {
- bombout(("Unexpected response to pty request:"
- " packet type %d", pktin->type));
- crStopV;
- }
- c_write_str(ssh, "Server refused to allocate pty\r\n");
- ssh->editing = ssh->echoing = 1;
- } else {
+ if (pktin->type == SSH2_MSG_CHANNEL_SUCCESS) {
logeventf(ssh, "Allocated pty (ospeed %dbps, ispeed %dbps)",
ssh->ospeed, ssh->ispeed);
ssh->got_pty = TRUE;
+ } else {
+ c_write_str(ssh, "Server refused to allocate pty\r\n");
+ ssh->editing = ssh->echoing = 1;
}
} else {
ssh->editing = ssh->echoing = 1;
while (s->env_left > 0) {
crWaitUntilV(pktin);
-
- if (pktin->type != SSH2_MSG_CHANNEL_SUCCESS) {
- if (pktin->type != SSH2_MSG_CHANNEL_FAILURE) {
- bombout(("Unexpected response to environment request:"
- " packet type %d", pktin->type));
- crStopV;
- }
- } else {
+ if (pktin->type == SSH2_MSG_CHANNEL_SUCCESS)
s->env_ok++;
- }
-
s->env_left--;
}