summaryrefslogtreecommitdiffhomepage
path: root/listener.h
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 /listener.h
parentba23b823dcec4203dcee59204f0a7dac1a390d96 (diff)
parent598056d1686127285c389cacbdd20707c350d05a (diff)
Merge pull request #49 from fperrad/20170812_lint
Some linting, const parameters
Diffstat (limited to 'listener.h')
-rw-r--r--listener.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/listener.h b/listener.h
index 15eb331..4a7f5ff 100644
--- a/listener.h
+++ b/listener.h
@@ -35,8 +35,8 @@ struct Listener {
int index; /* index in the array of listeners */
- void (*acceptor)(struct Listener*, int sock);
- void (*cleanup)(struct Listener*);
+ void (*acceptor)(const struct Listener*, int sock);
+ void (*cleanup)(const struct Listener*);
int type; /* CHANNEL_ID_X11, CHANNEL_ID_AGENT,
CHANNEL_ID_TCPDIRECT (for clients),
@@ -47,16 +47,16 @@ struct Listener {
};
void listeners_initialise(void);
-void handle_listeners(fd_set * readfds);
+void handle_listeners(const fd_set * readfds);
void set_listener_fds(fd_set * readfds);
-struct Listener* new_listener(int socks[], unsigned int nsocks,
+struct Listener* new_listener(const int socks[], unsigned int nsocks,
int type, void* typedata,
- void (*acceptor)(struct Listener* listener, int sock),
- void (*cleanup)(struct Listener*));
+ void (*acceptor)(const struct Listener* listener, int sock),
+ void (*cleanup)(const struct Listener*));
-struct Listener * get_listener(int type, void* typedata,
- int (*match)(void*, void*));
+struct Listener * get_listener(int type, const void* typedata,
+ int (*match)(const void*, const void*));
void remove_listener(struct Listener* listener);