comparison tcp-accept.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 58a74cb829b8
children 572a7aefa188
comparison
equal deleted inserted replaced
1457:32f990cc96b1 1511:5916af64acd4
33 #include "listener.h" 33 #include "listener.h"
34 #include "runopts.h" 34 #include "runopts.h"
35 35
36 #if DROPBEAR_TCP_ACCEPT 36 #if DROPBEAR_TCP_ACCEPT
37 37
38 static void cleanup_tcp(struct Listener *listener) { 38 static void cleanup_tcp(const struct Listener *listener) {
39 39
40 struct TCPListener *tcpinfo = (struct TCPListener*)(listener->typedata); 40 struct TCPListener *tcpinfo = (struct TCPListener*)(listener->typedata);
41 41
42 m_free(tcpinfo->sendaddr); 42 m_free(tcpinfo->sendaddr);
43 m_free(tcpinfo->listenaddr); 43 m_free(tcpinfo->listenaddr);
50 TRACE(("tcp_prio_inithandler channel %d", channel->index)) 50 TRACE(("tcp_prio_inithandler channel %d", channel->index))
51 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE; 51 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
52 return 0; 52 return 0;
53 } 53 }
54 54
55 static void tcp_acceptor(struct Listener *listener, int sock) { 55 static void tcp_acceptor(const struct Listener *listener, int sock) {
56 56
57 int fd; 57 int fd;
58 struct sockaddr_storage sa; 58 struct sockaddr_storage sa;
59 socklen_t len; 59 socklen_t len;
60 char ipstring[NI_MAXHOST], portstring[NI_MAXSERV]; 60 char ipstring[NI_MAXHOST], portstring[NI_MAXSERV];