Commit 39c78774 authored by David Woodhouse's avatar David Woodhouse

Remove static out_pkt

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 598a08c7
......@@ -237,6 +237,7 @@ void openconnect_vpninfo_free(struct openconnect_info *vpninfo)
deflateEnd(&vpninfo->deflate_strm);
free(vpninfo->deflate_pkt);
free(vpninfo->tun_pkt);
free(vpninfo);
}
......
......@@ -47,8 +47,6 @@ int queue_new_packet(struct pkt **q, void *buf, int len)
return 0;
}
static struct pkt *out_pkt;
/* This is here because it's generic and hence can't live in either of the
tun*.c files for specific platforms */
int tun_mainloop(struct openconnect_info *vpninfo, int *timeout)
......@@ -56,6 +54,7 @@ int tun_mainloop(struct openconnect_info *vpninfo, int *timeout)
int work_done = 0;
if (read_fd_monitored(vpninfo, tun)) {
struct pkt *out_pkt = vpninfo->tun_pkt;
while (1) {
int len = vpninfo->ip_info.mtu;
......@@ -84,6 +83,7 @@ int tun_mainloop(struct openconnect_info *vpninfo, int *timeout)
break;
}
}
vpninfo->tun_pkt = out_pkt;
} else if (vpninfo->outgoing_qlen < vpninfo->max_qlen) {
monitor_read_fd(vpninfo, tun);
}
......
......@@ -307,6 +307,8 @@ struct openconnect_info {
struct pkt *current_ssl_pkt;
struct pkt *pending_deflated_pkt;
struct pkt *tun_pkt;
z_stream inflate_strm;
uint32_t inflate_adler32;
z_stream deflate_strm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment