diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-12-05 12:09:07 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-12-07 14:08:27 +0100 |
commit | 21e252236018ce10958b0623837a48f354d5b155 (patch) | |
tree | 05ff6fcf631dbc147bd232f1eda5d7311acb1daa /include/libssh/session.h | |
parent | 8f887e82c75a92942dea903d9239981f20136efb (diff) | |
download | libssh-21e252236018ce10958b0623837a48f354d5b155.tar.gz libssh-21e252236018ce10958b0623837a48f354d5b155.tar.xz libssh-21e252236018ce10958b0623837a48f354d5b155.zip |
config: Get rid of the dynamic seen array
* This makes the array constant in the session structure, avoiding
allocations and frees while parsing the file
* It also drops passing the seen array to all the functions,
because it is already part of the passed session
* The test cases are adjusted to match these changes
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh/session.h')
-rw-r--r-- | include/libssh/session.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libssh/session.h b/include/libssh/session.h index c846dc47..f0ad951b 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -29,6 +29,7 @@ #include "libssh/auth.h" #include "libssh/channels.h" #include "libssh/poll.h" +#include "libssh/config.h" /* These are the different states a SSH session can be into its life */ enum ssh_session_state_e { @@ -220,7 +221,7 @@ struct ssh_session_struct { int flags; int nodelay; bool config_processed; - uint8_t *options_seen; + uint8_t options_seen[SOC_MAX]; } opts; /* counters */ ssh_counter socket_counter; |