[SECNET PATCH 05/14] comm: comm_notify takes the cc, not just the notify_list
Ian Jackson
ijackson at chiark.greenend.org.uk
Sat Sep 21 17:07:50 BST 2019
We're going to want this in a moment.
No functional change.
Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
---
comm-common.c | 3 ++-
comm-common.h | 2 +-
udp.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
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);
--
2.11.0
More information about the sgo-software-discuss
mailing list