chiark / gitweb /
udp: Use commcommon->why_unwanted
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Sep 2019 14:21:09 +0000 (15:21 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2019 18:16:17 +0000 (19:16 +0100)
This is the one call site of comm_notify.  (If we had had any comm
that wasn't based on udp.c, that would have needed updating too.)

No overall functional change: nothing ever sets this yet, so we always
use the default message.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
udp.c

diff --git a/udp.c b/udp.c
index b9a3860ac264c70b9797747b32818a41150fc52e..d1ada01f6f1d83eb56dce10336a1b33a552bc927 100644 (file)
--- a/udp.c
+++ b/udp.c
@@ -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);
                }