-static void request_notify(void *commst, void *nst, comm_notify_fn *fn)
-{
- struct udp *st=commst;
- struct udp *cc=st; /* for now */
- struct comm_notify_entry *n;
-
- n=safe_malloc(sizeof(*n),"request_notify");
- n->fn=fn;
- n->state=nst;
- LIST_INSERT_HEAD(&cc->notify, n, entry);
-}
-
-static void release_notify(void *commst, void *nst, comm_notify_fn *fn)
-{
- struct udp *st=commst;
- struct udp *cc=st; /* for now */
- struct comm_notify_entry *n, *t;
-
- /* XXX untested */
- LIST_FOREACH_SAFE(n, &cc->notify, entry, t) {
- if (n->state==nst && n->fn==fn) {
- LIST_REMOVE(n, entry);
- free(n);
- }
- }
-}
-