comparison tcp-accept.c @ 941:5daedffd0769

Set tcp priority as follows: if (connecting || ptys || x11) tos = LOWDELAY; else if (tcp_forwards) tos = 0; else tos = BULK; TCP forwards could be either lowdelay or bulk, hence the default priority.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 16 Jul 2014 22:53:32 +0800
parents dfdb9d9189ff
children c45d65392c1a
comparison
equal deleted inserted replaced
940:e9dfb6d15193 941:5daedffd0769
28 #include "dbutil.h" 28 #include "dbutil.h"
29 #include "session.h" 29 #include "session.h"
30 #include "buffer.h" 30 #include "buffer.h"
31 #include "packet.h" 31 #include "packet.h"
32 #include "listener.h" 32 #include "listener.h"
33 #include "listener.h"
33 #include "runopts.h" 34 #include "runopts.h"
34 35
35 #ifdef DROPBEAR_TCP_ACCEPT 36 #ifdef DROPBEAR_TCP_ACCEPT
36 37
37 static void cleanup_tcp(struct Listener *listener) { 38 static void cleanup_tcp(struct Listener *listener) {
40 41
41 m_free(tcpinfo->sendaddr); 42 m_free(tcpinfo->sendaddr);
42 m_free(tcpinfo->listenaddr); 43 m_free(tcpinfo->listenaddr);
43 m_free(tcpinfo->request_listenaddr); 44 m_free(tcpinfo->request_listenaddr);
44 m_free(tcpinfo); 45 m_free(tcpinfo);
46 }
47
48 int tcp_prio_inithandler(struct Channel* channel)
49 {
50 TRACE(("tcp_prio_inithandler channel %d", channel->index))
51 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
52 return 0;
45 } 53 }
46 54
47 static void tcp_acceptor(struct Listener *listener, int sock) { 55 static void tcp_acceptor(struct Listener *listener, int sock) {
48 56
49 int fd; 57 int fd;