VirtualBox

Changeset 11108 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 4, 2008 3:35:17 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34039
Message:

Main, HostServices/GuestProperties: the timestamp is in nanoseconds and fix a segfault

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r11083 r11108  
    347347        rc = CFGMR3QueryString(mpValueNode, pszName, pchBuf, cchBuf);
    348348    /* Write the flags if there are any */
    349     pchBuf[cchValue] = '\0';  /* In case there aren't */
     349    if (RT_SUCCESS(rc))
     350        pchBuf[cchValue] = '\0';  /* In case there aren't */
    350351    if (RT_SUCCESS(rc) && (mpFlagsNode != NULL) && (cchFlags != 1))
    351352        CFGMR3QueryString(mpFlagsNode, pszName, pchBuf + cchValue,
     
    422423    if (RT_SUCCESS(rc))
    423424    {
     425        RTTIMESPEC time;
    424426        CFGMR3RemoveValue(mpValueNode, pszKey);
    425427        if (mpTimestampNode != NULL)
     
    429431        rc = CFGMR3InsertString(mpValueNode, pszKey, pszValue);
    430432        if (RT_SUCCESS(rc))
    431             rc = CFGMR3InsertInteger(mpTimestampNode, pszKey, RTTimeMilliTS());
     433            rc = CFGMR3InsertInteger(mpTimestampNode, pszKey,
     434                                     RTTimeSpecGetNano(RTTimeNow(&time)));
    432435    }
    433436    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Main/MachineImpl.cpp

    r11096 r11108  
    28082808            if (NULL != aValue)
    28092809            {
     2810                RTTIMESPEC time;
    28102811                property.mValue = aValue;
    2811                 property.mTimestamp = RTTimeMilliTS();
     2812                property.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time));
    28122813                if (aFlags != NULL)
    28132814                    property.mFlags = aFlags;
     
    28172818        else if (aValue != NULL)
    28182819        {
     2820            RTTIMESPEC time;
    28192821            mHWData.backup();
    28202822            property.mName = aName;
    28212823            property.mValue = aValue;
    2822             property.mTimestamp = RTTimeMilliTS();
     2824            property.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time));
    28232825            property.mFlags = (aFlags != NULL ? Bstr(aFlags) : Bstr(""));
    28242826            mHWData->mGuestProperties.push_back(property);
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