VirtualBox

Ignore:
Timestamp:
Jun 27, 2008 9:37:23 PM (16 years ago)
Author:
vboxsync
Message:

Additions/common: retrieve guest property: fix if the property doesn't exist and corrected a comment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibInfoSvc.cpp

    r10005 r10006  
    132132 * @param   pszValue        Where to store the value retrieved.
    133133 * @param   cbValue         The size of the buffer pszValue points to.
    134  * @param   pcbActual       Where to store the required buffer size. This should be set on buffer
    135  *                          overflows errors but actually isn't... Optional.
     134 * @param   pcbActual       Where to store the required buffer size if cbValue
     135 *                          is too small.  On success this contains the
     136 *                          actual size of the value retrieved.  If there is
     137 *                          no such value this is set to zero.  Optional.
    136138 */
    137139VBGLR3DECL(int) VbglR3InfoSvcReadKey(uint32_t u32ClientId, char *pszKey,
     
    162164        else
    163165            rc = Msg.hdr.result;
     166        if ((cbValue > 0) && (0 == cbActual))  /* No such property */
     167            pszValue[0] = 0;
    164168    }
    165169    return rc;
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