diff svr-agentfwd.c @ 1461:fb90a5ba84e0

Merge pull request #49 from fperrad/20170812_lint Some linting, const parameters
author Matt Johnston <matt@ucc.asn.au>
date Thu, 25 Jan 2018 21:55:25 +0800
parents 58a74cb829b8
children 79eef94ccea9
line wrap: on
line diff
--- a/svr-agentfwd.c	Tue Jan 23 22:44:18 2018 +0800
+++ b/svr-agentfwd.c	Thu Jan 25 21:55:25 2018 +0800
@@ -45,7 +45,7 @@
 
 static int send_msg_channel_open_agent(int fd);
 static int bindagent(int fd, struct ChanSess * chansess);
-static void agentaccept(struct Listener * listener, int sock);
+static void agentaccept(const struct Listener * listener, int sock);
 
 /* Handles client requests to start agent forwarding, sets up listening socket.
  * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
@@ -100,7 +100,7 @@
 /* accepts a connection on the forwarded socket and opens a new channel for it
  * back to the client */
 /* returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
-static void agentaccept(struct Listener *UNUSED(listener), int sock) {
+static void agentaccept(const struct Listener *UNUSED(listener), int sock) {
 
 	int fd;
 
@@ -118,7 +118,7 @@
 
 /* set up the environment variable pointing to the socket. This is called
  * just before command/shell execution, after dropping privileges */
-void svr_agentset(struct ChanSess * chansess) {
+void svr_agentset(const struct ChanSess * chansess) {
 
 	char *path = NULL;
 	int len;