channels: replaced bugged lists with ssh_list

(cherry picked from commit 6d8bb956c5)

Conflicts:

	src/channels.c
	src/session.c
This commit is contained in:
Aris Adamantiadis
2011-09-02 13:46:10 +03:00
committed by Andreas Schneider
parent 6f650a61ca
commit 64b125700e
8 changed files with 60 additions and 49 deletions

View File

@@ -48,8 +48,6 @@ enum ssh_channel_state_e {
};
struct ssh_channel_struct {
struct ssh_channel_struct *prev;
struct ssh_channel_struct *next;
ssh_session session; /* SSH_SESSION pointer */
uint32_t local_channel;
uint32_t local_window;

View File

@@ -58,6 +58,7 @@ struct ssh_timestamp {
struct ssh_list *ssh_list_new(void);
void ssh_list_free(struct ssh_list *list);
struct ssh_iterator *ssh_list_get_iterator(const struct ssh_list *list);
struct ssh_iterator *ssh_list_find(const struct ssh_list *list, void *value);
int ssh_list_append(struct ssh_list *list, const void *data);
int ssh_list_prepend(struct ssh_list *list, const void *data);
void ssh_list_remove(struct ssh_list *list, struct ssh_iterator *iterator);

View File

@@ -110,7 +110,7 @@ struct ssh_session_struct {
struct ssh_crypto_struct *current_crypto;
struct ssh_crypto_struct *next_crypto; /* next_crypto is going to be used after a SSH2_MSG_NEWKEYS */
ssh_channel channels; /* linked list of channels */
struct ssh_list *channels; /* linked list of channels */
int maxchannel;
int exec_channel_opened; /* version 1 only. more
info in channels1.c */