diff options
author | brian <brian@FreeBSD.org> | 1998-06-07 00:16:37 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-06-07 00:16:37 +0000 |
commit | 047f4ff8900c14c7722d431b0a8531862592f6ca (patch) | |
tree | 75b71321937910c33aa810a955c90a02b9e8f15c /usr.sbin | |
parent | e886c0d520510b5802f18292d53cd24fd79280a7 (diff) | |
download | FreeBSD-src-047f4ff8900c14c7722d431b0a8531862592f6ca.zip FreeBSD-src-047f4ff8900c14c7722d431b0a8531862592f6ca.tar.gz |
Update the write descriptor selection set for our data links
*after* shuffling fragments from the IP queue into the
individual link queues.
This fixes a latency problem pointed out by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index ae7a6c1..d65c322 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.12 1998/05/29 18:33:08 brian Exp $ + * $Id: bundle.c,v 1.13 1998/06/06 20:50:54 brian Exp $ */ #include <sys/param.h> @@ -482,8 +482,6 @@ bundle_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) int result, want, queued, nlinks; result = 0; - for (dl = bundle->links; dl; dl = dl->next) - result += descriptor_UpdateSet(&dl->desc, r, w, e, n); /* If there are aren't many packets queued, look for some more. */ for (nlinks = 0, dl = bundle->links; dl; dl = dl->next) @@ -521,6 +519,10 @@ bundle_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) } } + /* Which links need a select() ? */ + for (dl = bundle->links; dl; dl = dl->next) + result += descriptor_UpdateSet(&dl->desc, r, w, e, n); + /* * This *MUST* be called after the datalink UpdateSet()s as it * might be ``holding'' one of the datalinks (death-row) and |