Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove static out_pkt
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jul 31, 2014
1 parent 598a08c commit 39c7877
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions library.c
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions mainloop.c
Expand Up @@ -47,15 +47,14 @@ 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)
{
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;

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions openconnect-internal.h
Expand Up @@ -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;
Expand Down

0 comments on commit 39c7877

Please sign in to comment.