X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=comm-common.c;h=48041cd8e2fb857a6643165487522673bb093484;hb=147b444d6faa9a621e33d653b7a72c29724203c3;hp=28580be3f3dc5878fe81c8d5935bd72126615e30;hpb=eb4e2288a1e3d4547f7fac367788978a3d82f9a4;p=secnet.git diff --git a/comm-common.c b/comm-common.c index 28580be..48041cd 100644 --- a/comm-common.c +++ b/comm-common.c @@ -57,8 +57,10 @@ bool_t comm_notify(struct commcommon *cc, struct comm_notify_list *notify = &cc->notify; struct comm_notify_entry *n; + priomsg_reset(&cc->why_unwanted); + LIST_FOREACH(n, notify, entry) { - if (n->fn(n->state, buf, ca)) { + if (n->fn(n->state, buf, ca, &cc->why_unwanted)) { return True; } } @@ -76,4 +78,5 @@ void comm_apply(struct commcommon *cc, void *st) cc->ops.release_notify=comm_release_notify; LIST_INIT(&cc->notify); cc->rbuf=NULL; + priomsg_new(&cc->why_unwanted, MAX_NAK_MSG); }