Commit ca4f8c66 authored by Niels Möller's avatar Niels Möller
Browse files

(make_channel_open_exception): Deleted function.

Rev: src/channel.c:1.141
Rev: src/channel.h:1.90
parent d092cfff
......@@ -71,27 +71,6 @@
CHANNEL_OPEN_FAILURE message is sent.
*/
struct exception *
make_channel_open_exception(uint32_t error_code, const char *msg)
{
#define MAX_ERROR 4
static const char *msgs[MAX_ERROR + 1] = {
"",
"Administratively prohibited",
"Connect failed",
"Unknown channel type",
"Resource shortage"
};
assert(error_code > 0);
assert(error_code <= MAX_ERROR);
#undef MAX_ERROR
return make_exception(EXC_CHANNEL_OPEN, error_code,
msg ? msg : msgs[error_code]);
}
static struct lsh_string *
format_global_failure(void)
{
......@@ -474,7 +453,7 @@ channel_open_confirm(const struct channel_open_info *info,
ssh_connection_activate_channel(info->connection,
info->local_channel_number);
/* FIXME: Doesn't support sending extra arguments with the
/* NOTE: Doesn't support sending extra arguments with the
* confirmation message. */
SSH_CONNECTION_WRITE(info->connection,
......@@ -933,8 +912,8 @@ handle_open_failure(struct ssh_connection *connection,
if (channel)
{
/* FIXME: It would be nice to pass the message on. */
werror("Channel open for channel %i failed: %ps\n", channel_number, length, msg);
werror("Channel open for channel %i failed: %ps\n",
channel_number, length, msg);
CHANNEL_EVENT(channel, CHANNEL_EVENT_DENY);
channel_finished(channel);
......@@ -1334,9 +1313,8 @@ ssh_connection_register_channel(struct ssh_connection *connection,
connection->channels[local_channel_number] = channel;
channel->connection = connection;
/* FIXME: If we keep the local_channel_number attribute,
we can probably use it in more places. */
channel->local_channel_number = local_channel_number;
remember_resource(connection->resources, &channel->super);
}
......
......@@ -27,7 +27,6 @@
#define LSH_CHANNEL_H_INCLUDED
#include "alist.h"
#include "command.h"
#include "connection.h"
#include "parse.h"
#include "server_pty.h"
......@@ -200,9 +199,6 @@ channel_open_new_type(struct ssh_connection *connection,
uint32_t type_length, const uint8_t *type,
const char *format, ...);
struct exception *
make_channel_open_exception(uint32_t error_code, const char *msg);
int
channel_send_request(struct ssh_channel *channel,
uint32_t type_length, const uint8_t *type,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment