• Ulrich Sibiller's avatar
    os: fix BigReq ignoring when another request is pending · a736122f
    Ulrich Sibiller authored
    Not sure how it came to this situation, but the following commit is
    partly contained in our version of the code. Some lines had not been
    removed, tough...
    
      commit c80c41767eb101e9dbd8393d8cca7764b4e248a4
      Author: Aaron Plattner <aplattner@nvidia.com>
      Date:   Mon Oct 25 22:01:32 2010 -0700
    
        os: Fix BigReq ignoring when another request is pending
    
        Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of
        BigReq requests that are way too large and handles the case where the
        read() syscall returns a short read.  However, it neglected to handle
        the case where it returns a long read, which happens when the client
        has another request in the queue after the bogus large one.
    
        Handle the long read case by subtracting the smaller of 'needed' and
        'gotnow' from oci->ignoreBytes.  If needed < gotnow, simply subtract
        the two, leaving gotnow equal to the number of extra bytes read.
        Since the code immediately following the (oci->ignoreBytes > 0) block
        tries to handle the next request, advance oci->bufptr immediately
        instead of setting oci->lenLastReq and letting the next call to
        ReadRequestFromClient do it.
    
        Fixes the XTS pChangeKeyboardMapping-3 test.
    
                 CASES TESTS  PASS UNSUP UNTST NOTIU  WARN   FIP  FAIL UNRES  UNIN ABORT
        -Xproto    122   389   367     2    19     0     0     0     1     0     0     0
        +Xproto    122   389   368     2    19     0     0     0     0     0     0     0
    Signed-off-by: 's avatarAaron Plattner <aplattner@nvidia.com>
    Reviewed-by: 's avatarAdam Jackson <ajax@redhat.com>
    Signed-off-by: 's avatarKeith Packard <keithp@keithp.com>
    a736122f
Name
Last commit
Last update
debian Loading commit data...
doc Loading commit data...
etc Loading commit data...
m4 Loading commit data...
nx-X11 Loading commit data...
nxcomp Loading commit data...
nxcompshad Loading commit data...
nxdialog Loading commit data...
nxproxy Loading commit data...
testscripts Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
LICENSE Loading commit data...
LICENSE.nxcomp Loading commit data...
Makefile Loading commit data...
README.NX-development Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
fix-patch-whitespace Loading commit data...
make-changelog.sh Loading commit data...
mesa-quilt Loading commit data...
nx-libs.spec Loading commit data...
regenerate-symbol-docs.sh Loading commit data...
replace.sh Loading commit data...
roll-tarballs.sh Loading commit data...
run-static-analysis.sh Loading commit data...
version.sh Loading commit data...