summaryrefslogtreecommitdiffhomepage
path: root/cli-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-01-25 21:55:25 +0800
committerGitHub <noreply@github.com>2018-01-25 21:55:25 +0800
commite64e25e4d69ddb8f1c7fb8bbdcd09817cae4ca55 (patch)
tree679ecdd500c6355f7b11dbef36c66906065a8ee2 /cli-chansession.c
parentba23b823dcec4203dcee59204f0a7dac1a390d96 (diff)
parent598056d1686127285c389cacbdd20707c350d05a (diff)
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
Diffstat (limited to 'cli-chansession.c')
-rw-r--r--cli-chansession.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cli-chansession.c b/cli-chansession.c
index c2086f2..ded9eac 100644
--- a/cli-chansession.c
+++ b/cli-chansession.c
@@ -35,12 +35,12 @@
#include "chansession.h"
#include "agentfwd.h"
-static void cli_closechansess(struct Channel *channel);
+static void cli_closechansess(const struct Channel *channel);
static int cli_initchansess(struct Channel *channel);
static void cli_chansessreq(struct Channel *channel);
-static void send_chansess_pty_req(struct Channel *channel);
-static void send_chansess_shell_req(struct Channel *channel);
-static void cli_escape_handler(struct Channel *channel, unsigned char* buf, int *len);
+static void send_chansess_pty_req(const struct Channel *channel);
+static void send_chansess_shell_req(const struct Channel *channel);
+static void cli_escape_handler(const struct Channel *channel, const unsigned char* buf, int *len);
static int cli_init_netcat(struct Channel *channel);
static void cli_tty_setup(void);
@@ -83,7 +83,7 @@ out:
/* If the main session goes, we close it up */
-static void cli_closechansess(struct Channel *UNUSED(channel)) {
+static void cli_closechansess(const struct Channel *UNUSED(channel)) {
cli_tty_cleanup(); /* Restore tty modes etc */
/* This channel hasn't gone yet, so we have > 1 */
@@ -270,7 +270,7 @@ void cli_chansess_winchange() {
cli_ses.winchange = 0;
}
-static void send_chansess_pty_req(struct Channel *channel) {
+static void send_chansess_pty_req(const struct Channel *channel) {
char* term = NULL;
@@ -303,7 +303,7 @@ static void send_chansess_pty_req(struct Channel *channel) {
TRACE(("leave send_chansess_pty_req"))
}
-static void send_chansess_shell_req(struct Channel *channel) {
+static void send_chansess_shell_req(const struct Channel *channel) {
char* reqtype = NULL;
@@ -452,7 +452,7 @@ do_escape(unsigned char c) {
}
static
-void cli_escape_handler(struct Channel* UNUSED(channel), unsigned char* buf, int *len) {
+void cli_escape_handler(const struct Channel* UNUSED(channel), const unsigned char* buf, int *len) {
char c;
int skip_char = 0;