VirtualBox

Ignore:
Timestamp:
Feb 5, 2010 2:03:39 PM (15 years ago)
Author:
vboxsync
Message:

back out r57355 again

File:
1 edited

Legend:

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

    r26286 r26288  
    17571757}
    17581758
    1759 int CmdTestSession(HandlerArg *a)
    1760 {
    1761     HRESULT rc;
    1762 
    1763     if (a->argc != 2)
    1764     {
    1765         RTPrintf("Must specify VM name!\n");
    1766         return E_FAIL;
    1767     }
    1768 
    1769     do
    1770     {
    1771         ComPtr<IMachine> pMachine;
    1772         CHECK_ERROR_BREAK(a->virtualBox, FindMachine(Bstr(a->argv[1]), pMachine.asOutParam()));
    1773 
    1774         Bstr bstrMachineID;
    1775         CHECK_ERROR_BREAK(pMachine, COMGETTER(Id)(bstrMachineID.asOutParam()));
    1776 
    1777         CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, bstrMachineID));
    1778 
    1779         RTPrintf("Session is open, press any key to terminate!\n");
    1780 
    1781         RTStrmGetCh(g_pStdIn);
    1782 
    1783         RTPrintf("Closing session...\n");
    1784 
    1785         CHECK_ERROR_BREAK(a->session, Close());
    1786 
    1787     } while (0);
    1788 
    1789     return rc;
    1790 }
    1791 
    17921759/**
    17931760 * Wrapper for handling internal commands
     
    18291796        return CmdModUninstall();
    18301797
    1831     if (!strcmp(pszCmd, "testsession"))
    1832         return CmdTestSession(a);
    1833 
    18341798    /* default: */
    18351799    return errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(a->argv[0]).raw());
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