aboutsummaryrefslogtreecommitdiff
path: root/src/proxy.c
diff options
context:
space:
mode:
authorJulien Dessaux2018-08-26 18:54:19 +0200
committerJulien Dessaux2018-11-02 18:32:59 +0100
commitfecf526ed334c8b987b37a3702e85a08bb7a9e68 (patch)
treeb70f7ba78eb409f12a63c5ac69ef0ba97cf7b269 /src/proxy.c
parentAdded session recording with https://github.com/kilobyte/termrec (diff)
downloadbastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.tar.gz
bastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.tar.bz2
bastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.zip
Began implementing configuration fetching from an sshportal mysql database
Diffstat (limited to 'src/proxy.c')
-rw-r--r--src/proxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/proxy.c b/src/proxy.c
index 5718a8a..7d410db 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include "client.h"
+#include "mysql.h"
#include "proxy.h"
#include "state.h"
@@ -201,6 +202,8 @@ void handle_proxy_session(ssh_event event, ssh_session session, ssh_channel my_c
ssh_callbacks_init(&channel_cb);
ssh_set_channel_callbacks(my_channel, &channel_cb);
+ db_clean(); // we close the mysql connection before the main loop, as to not waste ressources
+
do {
/* Poll the main event which takes care of the sessions and channels */
if (ssh_event_dopoll(event, -1) == SSH_ERROR) {