X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=comm-common.h;h=45340e4202e8bfe6a05dd906a4a1090e9ee80eec;hb=147b444d6faa9a621e33d653b7a72c29724203c3;hp=1e86864e129f5131bafc4e47b2a09f43316ffe5c;hpb=9c6a8729f6553615786878b382d4d44d2a54eec0;p=secnet.git diff --git a/comm-common.h b/comm-common.h index 1e86864..45340e4 100644 --- a/comm-common.h +++ b/comm-common.h @@ -38,6 +38,7 @@ struct commcommon { /* must be first so that void* is comm_common* */ struct cloc loc; struct comm_notify_list notify; struct buffer_if *rbuf; + struct priomsg why_unwanted; }; struct comm_clientinfo *comm_clientinfo_ignore(void *state, dict_t*, @@ -45,11 +46,12 @@ 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. - * Ie, like comm_notify_fn. */ + * Or: False, if no-one wanted it - buffer still allocd'd; + * in that case, cc->why_unwanted has info + * Ie, roughly like comm_notify_fn. */ void comm_apply(struct commcommon *cc, void *st);