VirtualBox

Ignore:
Timestamp:
Jan 23, 2012 6:38:18 PM (13 years ago)
Author:
vboxsync
Message:

GuestCtrl: Request (IPC) changes, bugfixes, fixed handle leaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlIO.cpp

    r39791 r39843  
    2121 ******************************************************************************/
    2222#include "GuestCtrlImplPrivate.h"
    23 
     23#ifdef DEBUG
     24# include "Logging.h"
     25# include <iprt/file.h>
     26#endif /* DEBUG */
    2427
    2528/******************************************************************************
     
    6467    m_mapPairs.clear();
    6568}
     69
     70#ifdef DEBUG
     71void GuestProcessStreamBlock::Dump()
     72{
     73    LogFlowFunc(("Dumping contents of stream block=0x%p (%ld items):\n",
     74                 this, m_mapPairs.size()));
     75
     76    for (GuestCtrlStreamPairMapIterConst it = m_mapPairs.begin();
     77         it != m_mapPairs.end(); it++)
     78    {
     79        LogFlowFunc(("\t%s=%s\n", it->first.c_str(), it->second.mValue.c_str()));
     80    }
     81}
     82#endif
    6683
    6784/**
     
    193210        if (pszValue)
    194211        {
    195             VBOXGUESTCTRL_STREAMVALUE val(pszValue);
     212            GuestProcessStreamValue val(pszValue);
    196213            m_mapPairs[Utf8Key] = val;
    197214        }
     
    307324}
    308325
     326#ifdef DEBUG
     327void GuestProcessStream::Dump(const char *pszFile)
     328{
     329    LogFlowFunc(("Dumping contents of stream=0x%p (cbAlloc=%u, cbSize=%u, cbOff=%u) to %s\n",
     330                 m_pbBuffer, m_cbAllocated, m_cbSize, m_cbOffset, pszFile));
     331
     332    RTFILE hFile;
     333    int rc = RTFileOpen(&hFile, pszFile, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE);
     334    if (RT_SUCCESS(rc))
     335    {
     336        rc = RTFileWrite(hFile, m_pbBuffer, m_cbSize, NULL /* pcbWritten */);
     337        RTFileClose(hFile);
     338    }
     339}
     340#endif
     341
    309342/**
    310343 * Returns the current offset of the parser within
Note: See TracChangeset for help on using the changeset viewer.

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