VirtualBox

Ignore:
Timestamp:
Aug 4, 2008 4:47:15 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34046
Message:

FE/VBoxManage: open an existing session if the VM is running

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r11110 r11113  
    7777        machine->COMGETTER(Id)(uuid.asOutParam());
    7878
    79         /* open a session for the VM */
    80         CHECK_ERROR_RET (aVirtualBox, OpenSession(aSession, uuid), 1);
     79        /* open a session for the VM - new or existing */
     80        if (FAILED (aVirtualBox->OpenSession(aSession, uuid)))
     81            CHECK_ERROR_RET (aVirtualBox, OpenExistingSession(aSession, uuid), 1);
    8182
    8283        /* get the mutable session machine */
     
    154155        machine->COMGETTER(Id)(uuid.asOutParam());
    155156
    156         /* open a session for the VM */
    157         CHECK_ERROR_RET (aVirtualBox, OpenSession(aSession, uuid), 1);
     157        /* open a session for the VM - new or existing */
     158        if (FAILED (aVirtualBox->OpenSession(aSession, uuid)))
     159            CHECK_ERROR_RET (aVirtualBox, OpenExistingSession(aSession, uuid), 1);
    158160
    159161        /* get the mutable session machine */
     
    217219        machine->COMGETTER(Id)(uuid.asOutParam());
    218220
    219         /* open a session for the VM */
    220         CHECK_ERROR_RET (aVirtualBox, OpenSession(aSession, uuid), 1);
     221        /* open a session for the VM - new or existing */
     222        if (FAILED (aVirtualBox->OpenSession(aSession, uuid)))
     223            CHECK_ERROR_RET (aVirtualBox, OpenExistingSession(aSession, uuid), 1);
    221224
    222225        /* get the mutable session machine */
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