chiark / gitweb /
comm: comm_notify takes the cc, not just the notify_list
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Sep 2019 14:14:03 +0000 (15:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2019 18:16:17 +0000 (19:16 +0100)
We're going to want this in a moment.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
comm-common.c
comm-common.h
udp.c

index b855b9d6c0f156d546b9ebc0adcef32127e4ec38..28580be3f3dc5878fe81c8d5935bd72126615e30 100644 (file)
@@ -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) {
index 1e86864e129f5131bafc4e47b2a09f43316ffe5c..a038947109250bc7395665b104dfbbe3cb573d64 100644 (file)
@@ -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 0d945acdb4df07d6f4645262154c042a502af358..b9a3860ac264c70b9797747b32818a41150fc52e 100644 (file)
--- 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);