chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logging: Move "starting" message earlier
[secnet.git]
/
comm-common.c
diff --git
a/comm-common.c
b/comm-common.c
index b855b9d6c0f156d546b9ebc0adcef32127e4ec38..48041cd8e2fb857a6643165487522673bb093484 100644
(file)
--- a/
comm-common.c
+++ b/
comm-common.c
@@
-51,13
+51,16
@@
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 comm
common *cc
,
struct buffer_if *buf, const struct comm_addr *ca)
{
struct buffer_if *buf, const struct comm_addr *ca)
{
+ struct comm_notify_list *notify = &cc->notify;
struct comm_notify_entry *n;
struct comm_notify_entry *n;
+ priomsg_reset(&cc->why_unwanted);
+
LIST_FOREACH(n, notify, entry) {
LIST_FOREACH(n, notify, entry) {
- if (n->fn(n->state, buf, ca)) {
+ if (n->fn(n->state, buf, ca
, &cc->why_unwanted
)) {
return True;
}
}
return True;
}
}
@@
-75,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;
cc->ops.release_notify=comm_release_notify;
LIST_INIT(&cc->notify);
cc->rbuf=NULL;
+ priomsg_new(&cc->why_unwanted, MAX_NAK_MSG);
}
}