chiark / gitweb /
changelog: start 0.6.8
[secnet.git] / udp.c
diff --git a/udp.c b/udp.c
index 0d945acdb4df07d6f4645262154c042a502af358..d1ada01f6f1d83eb56dce10336a1b33a552bc927 100644 (file)
--- 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);
@@ -186,7 +186,9 @@ static void udp_socks_afterpoll(void *state, struct pollfd *fds, int nfds)
                        /* Manufacture and send NAK packet */
                        source=get_uint32(cc->rbuf->start); /* Us */
                        dest=get_uint32(cc->rbuf->start+4); /* Them */
-                       send_nak(&ca,source,dest,msgtype,cc->rbuf,"unwanted");
+                       send_nak(&ca,source,dest,msgtype,cc->rbuf,
+                                priomsg_getmessage(&cc->why_unwanted,
+                                                   "unwanted"));
                    }
                    BUF_FREE(cc->rbuf);
                }