From: Ian Jackson Date: Sat, 21 Sep 2019 14:14:03 +0000 (+0100) Subject: comm: comm_notify takes the cc, not just the notify_list X-Git-Tag: v0.5.0~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=eb4e2288a1e3d4547f7fac367788978a3d82f9a4 comm: comm_notify takes the cc, not just the notify_list We're going to want this in a moment. No functional change. Signed-off-by: Ian Jackson --- diff --git a/comm-common.c b/comm-common.c index b855b9d..28580be 100644 --- a/comm-common.c +++ b/comm-common.c @@ -51,9 +51,10 @@ void comm_release_notify(void *commst, void *nst, comm_notify_fn *fn) } } -bool_t comm_notify(struct comm_notify_list *notify, +bool_t comm_notify(struct commcommon *cc, struct buffer_if *buf, const struct comm_addr *ca) { + struct comm_notify_list *notify = &cc->notify; struct comm_notify_entry *n; LIST_FOREACH(n, notify, entry) { diff --git a/comm-common.h b/comm-common.h index 1e86864..a038947 100644 --- a/comm-common.h +++ b/comm-common.h @@ -45,7 +45,7 @@ struct comm_clientinfo *comm_clientinfo_ignore(void *state, dict_t*, void comm_request_notify(void *commst, void *nst, comm_notify_fn *fn); void comm_release_notify(void *commst, void *nst, comm_notify_fn *fn); -bool_t comm_notify(struct comm_notify_list *notify, struct buffer_if *buf, +bool_t comm_notify(struct commcommon*, struct buffer_if *buf, const struct comm_addr *ca); /* Either: returns True, with message delivered and buffer freed. * Or: False, if no-one wanted it - buffer still allocd'd. diff --git a/udp.c b/udp.c index 0d945ac..b9a3860 100644 --- a/udp.c +++ b/udp.c @@ -173,7 +173,7 @@ static void udp_socks_afterpoll(void *state, struct pollfd *fds, int nfds) ca.comm=&cc->ops; ca.ia=from; ca.ix=i; - done=comm_notify(&cc->notify, cc->rbuf, &ca); + done=comm_notify(cc, cc->rbuf, &ca); if (done) { udp_sock_experienced(0,uc,socks,us,0, from.sa.sa_family,0,0);