summaryrefslogtreecommitdiffhomepage
path: root/listener.h
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2017-08-19 22:39:53 +0200
committerFrancois Perrad <francois.perrad@gadz.org>2017-08-19 22:39:53 +0200
commit598056d1686127285c389cacbdd20707c350d05a (patch)
treed821ca44d56c707bd3e6fe35f5cb58ff6eb1ccda /listener.h
parent89e64c631ec8dee41ec4de888548d36887b6ec98 (diff)
Pointer parameter could be declared as pointing to const (callback)
Diffstat (limited to 'listener.h')
-rw-r--r--listener.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/listener.h b/listener.h
index e1a620b..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),
@@ -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);