VirtualBox

Changeset 31743 in vbox


Ignore:
Timestamp:
Aug 18, 2010 7:58:11 AM (14 years ago)
Author:
vboxsync
Message:

FT updates for password

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/ftm.h

    r31737 r31743  
    4141 * @{
    4242 */
    43 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort);
     43VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort, const char *pszPassword);
    4444VMMR3DECL(int) FTMR3Init(PVM pVM);
    4545VMMR3DECL(int) FTMR3Term(PVM pVM);
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r31742 r31743  
    74637463                    ULONG uPort;
    74647464                    ULONG uInterval;
    7465                     Bstr bstrAddress;
     7465                    Bstr bstrAddress, bstrPassword;
    74667466
    74677467                    rc = pMachine->COMGETTER(FaultTolerancePort)(&uPort);
     
    74717471                        if (SUCCEEDED(rc))
    74727472                            rc = pMachine->COMGETTER(FaultToleranceAddress)(bstrAddress.asOutParam());
     7473                        if (SUCCEEDED(rc))
     7474                            rc = pMachine->COMGETTER(FaultTolerancePassword)(bstrPassword.asOutParam());
    74737475                    }
    74747476                    if (SUCCEEDED(rc))
     
    74767478                        Utf8Str strAddress(bstrAddress);
    74777479                        const char *pszAddress = strAddress.isEmpty() ? NULL : strAddress.c_str();
     7480                        Utf8Str strPassword(bstrPassword);
     7481                        const char *pszPassword = strPassword.isEmpty() ? NULL : strPassword.c_str();
    74787482
    74797483                        /** @todo set progress cancel callback! */
    74807484
    74817485                        /* Power on the FT enabled VM. */
    7482                         vrc = FTMR3PowerOn(pVM, (task->mEnmFaultToleranceState == FaultToleranceState_Master) /* fMaster */, uInterval, pszAddress, uPort);
     7486                        vrc = FTMR3PowerOn(pVM, (task->mEnmFaultToleranceState == FaultToleranceState_Master) /* fMaster */, uInterval, pszAddress, uPort, pszPassword);
    74837487                        AssertRC(vrc);
    74847488                    }
  • trunk/src/VBox/VMM/FTM.cpp

    r31738 r31743  
    4545    /** @todo saved state for master nodes! */
    4646    pVM->ftm.s.pszAddress     = NULL;
     47    pVM->ftm.s.pszPassword    = NULL;
    4748    pVM->fFaultTolerantMaster = false;
    4849    return VINF_SUCCESS;
     
    6263    if (pVM->ftm.s.pszAddress)
    6364        RTMemFree(pVM->ftm.s.pszAddress);
     65    if (pVM->ftm.s.pszPassword)
     66        RTMemFree(pVM->ftm.s.pszPassword);
    6467
    6568    return VINF_SUCCESS;
     
    110113 * @param   pszAddress  Master VM address
    111114 * @param   uPort       Master VM port
     115 * @param   pszPassword FT password
    112116 *
    113117 * @thread      Any thread.
     
    115119 * @vmstateto   PoweringOn+Running (master), PoweringOn+Running_FT (standby)
    116120 */
    117 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort)
     121VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort, const char *pszPassword)
    118122{
    119123    int rc;
     
    123127                    ("%s\n", VMR3GetStateName(enmVMState)),
    124128                    VERR_INTERNAL_ERROR_4);
     129    AssertReturn(pszAddress, VERR_INVALID_PARAMETER);
    125130
    126     pVM->ftm.s.uInterval  = uInterval;
    127     pVM->ftm.s.uPort      = uPort;
    128     pVM->ftm.s.pszAddress = RTStrDup(pszAddress);
     131    pVM->ftm.s.uInterval   = uInterval;
     132    pVM->ftm.s.uPort       = uPort;
     133    pVM->ftm.s.pszAddress  = RTStrDup(pszAddress);
     134    if (pszPassword)
     135        pVM->ftm.s.pszPassword = RTStrDup(pszPassword);
    129136    if (fMaster)
    130137    {
  • trunk/src/VBox/VMM/FTMInternal.h

    r31738 r31743  
    3737{
    3838    char       *pszAddress;
     39    char       *pszPassword;
    3940    unsigned    uPort;
    4041    unsigned    uInterval;
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