VirtualBox

Changeset 39384 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Nov 21, 2011 2:51:02 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74983
Message:

IPRT/stream-r3: Bugfixes for re-checking/applying stream modes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/stream.cpp

    r39383 r39384  
    447447        pStream->fCurrentCodeSet = RT_BOOL(fCurrentCodeSet);
    448448
     449    /* Re-check mode on next operation. */
     450    if (   fBinary         != -1
     451        || fCurrentCodeSet != -1)
     452    {
     453        pStream->fRecheckMode = true;
     454    }
     455
    449456    rtStrmUnlock(pStream);
    450457
     
    503510        if (fActual != -1 && fExpected != (fActual & (_O_BINARY | _O_TEXT)))
    504511        {
    505             _setmode(fh, fActual & (_O_BINARY | _O_TEXT));
     512            fActual = _setmode(fh, fActual & (_O_BINARY | _O_TEXT));
    506513            pStream->fBinary = !(fActual & _O_TEXT);
    507514        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette