VirtualBox

Changeset 99416 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 17, 2023 9:14:22 AM (21 months ago)
Author:
vboxsync
Message:

Guest Control/Main: Treat reported Guest Additions versions of "0.0.0" (or 0) through VMMDev as Guest Additions not being found or not ready (yet) within GuestSession::i_determineProtocolVersion() (via vmmdevUpdateGuestInfo[2]).

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r99262 r99416  
    428428        SessionObjects              mObjects;
    429429        /** Guest control protocol version to be used.
    430          *  Guest Additions < VBox 4.3 have version 1,
    431          *  any newer version will have version 2. */
     430         * Guest Additions < VBox 4.3 have version 1, any newer version will have version 2.
     431         * Set to 0 if a valid Guest Additions version was not found (yet). */
    432432        uint32_t                    mProtocolVersion;
    433433        /** Session timeout (in ms). */
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r98665 r99416  
    459459                break;
    460460
    461             /** @todo Add more errors here. */
     461            case VERR_NOT_FOUND: /* Returned by i_sessionCreate(). */
     462                hrc = setErrorBoth(VBOX_E_GSTCTL_GUEST_ERROR, vrc, tr("Guest Additions are not installed or not ready (yet)"));
     463                break;
    462464
    463465            default:
    464                 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not create guest session: %Rrc"), vrc);
     466                hrc = setErrorBoth(VBOX_E_GSTCTL_GUEST_ERROR, vrc, tr("Could not create guest session: %Rrc"), vrc);
    465467                break;
    466468        }
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r99262 r99416  
    200200 *
    201201 * @returns VBox status code.
     202 * @retval  VERR_NOT_FOUND if the Guest Additions were not found (or were not reported yet).
    202203 * @param   pGuest              Guest object the guest session belongs to.
    203204 * @param   ssInfo              Guest session startup info to use.
     
    35353536 * Determines the protocol version (sets mData.mProtocolVersion).
    35363537 *
    3537  * This is called from the init method prior to to establishing a guest
    3538  * session.
     3538 * This is called from the init method prior to to establishing a guest session.
    35393539 *
    35403540 * @returns VBox status code.
     3541 * @retval  VERR_NOT_FOUND if the Guest Additions were not found (or were not reported) yet.
    35413542 */
    35423543int GuestSession::i_determineProtocolVersion(void)
     
    35493550    AssertReturn(!pGuest.isNull(), VERR_NOT_SUPPORTED);
    35503551    uint32_t uGaVersion = pGuest->i_getAdditionsVersion();
     3552    if (!uGaVersion) /* If 0, there was no Guest Additions version detected (yet), or the VM is in reset state. */
     3553        return VERR_NOT_FOUND;
    35513554
    35523555    /* Everyone supports version one, if they support anything at all. */
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