VirtualBox

Ignore:
Timestamp:
Apr 1, 2010 9:09:23 PM (15 years ago)
Author:
vboxsync
Message:

HostServices/GuestProperties: do not send an update notification if the value and flags of a property have not changed

File:
1 edited

Legend:

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

    r27781 r27954  
    578578    RTTIMESPEC time;
    579579    uint64_t u64TimeNano = RTTimeSpecGetNano(RTTimeNow(&time));
     580    bool fNotify = true;
    580581
    581582    LogFlowThisFunc(("\n"));
     
    636637            if (found)
    637638            {
     639                if (   !it->mValue.compare(pcszValue)
     640                    && (it->mFlags == fFlags))
     641                    fNotify = false;
    638642                it->mValue = pcszValue;
    639643                it->mTimestamp = u64TimeNano;
     
    646650             * Send a notification to the host and return.
    647651             */
    648             // if (isGuest)  /* Notify the host even for properties that the host
    649             //                * changed.  Less efficient, but ensures consistency. */
     652            if (fNotify)
    650653                doNotifications(pcszName, u64TimeNano);
    651654            Log2(("Set string %s, rc=%Rrc, value=%s\n", pcszName, rc, pcszValue));
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