Comment on write queue full situation
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 22 Sep 2008 05:01:16 +0000 (22:01 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 22 Sep 2008 05:01:16 +0000 (22:01 -0700)
tun.c

diff --git a/tun.c b/tun.c
index 7f4cbcf..007ffe9 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -77,6 +77,9 @@ int tun_mainloop(struct anyconnect_info *vpninfo, int *timeout)
                work_done = 1;
        }
 
+       /* The kernel returns -ENOMEM when the queue is full, so theoretically
+          we could handle that and retry... but it doesn't let us poll() for
+          the no-longer-full situation, so let's not bother. */
        while (vpninfo->incoming_queue) {
                struct pkt *this = vpninfo->incoming_queue;
                vpninfo->incoming_queue = this->next;