diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2017-08-19 22:39:53 +0200 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2017-08-19 22:39:53 +0200 |
commit | 598056d1686127285c389cacbdd20707c350d05a (patch) | |
tree | d821ca44d56c707bd3e6fe35f5cb58ff6eb1ccda /listener.h | |
parent | 89e64c631ec8dee41ec4de888548d36887b6ec98 (diff) |
Pointer parameter could be declared as pointing to const (callback)
Diffstat (limited to 'listener.h')
-rw-r--r-- | listener.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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), @@ -52,11 +52,11 @@ void set_listener_fds(fd_set * readfds); 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); |