VirtualBox

Changeset 34825 in vbox


Ignore:
Timestamp:
Dec 8, 2010 11:02:22 AM (14 years ago)
Author:
vboxsync
Message:

GuestControl/service: Don't try to deliver too big messages to the client forever.

File:
1 edited

Legend:

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

    r34776 r34825  
    133133      * from the HGCM parameters. */
    134134    uint32_t mContextID;
     135    /** How many times the host service has tried to deliver this
     136     *  command to the guest. */
     137    uint32_t mTries;
    135138    /** Dynamic structure for holding the HGCM parms */
    136139    VBOXGUESTCTRPARAMBUFFER mParmBuf;
    137140
    138141    /** The standard constructor. */
    139     HostCmd() : mContextID(0) {}
     142    HostCmd() : mContextID(0), mTries(0) {}
    140143};
    141144/** The host cmd list + iterator type */
     
    627630             mHostCmds.pop_front();
    628631         }
     632         else if (rc == VERR_BUFFER_OVERFLOW)
     633         {
     634             /* If the client understood the message but supplied too little buffer space
     635              * don't send this message again and drop it after 3 unsuccessful attempts.
     636              * The host then should take care of next actions (maybe retry it with a smaller buffer). */
     637             if (++curCmd.mTries >= 3)
     638             {
     639                 paramBufferFree(&curCmd.mParmBuf);
     640                 mHostCmds.pop_front();
     641             }
     642         }
    629643    }
    630644    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