Changeset 31743 in vbox
- Timestamp:
- Aug 18, 2010 7:58:11 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/ftm.h
r31737 r31743 41 41 * @{ 42 42 */ 43 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort );43 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort, const char *pszPassword); 44 44 VMMR3DECL(int) FTMR3Init(PVM pVM); 45 45 VMMR3DECL(int) FTMR3Term(PVM pVM); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r31742 r31743 7463 7463 ULONG uPort; 7464 7464 ULONG uInterval; 7465 Bstr bstrAddress ;7465 Bstr bstrAddress, bstrPassword; 7466 7466 7467 7467 rc = pMachine->COMGETTER(FaultTolerancePort)(&uPort); … … 7471 7471 if (SUCCEEDED(rc)) 7472 7472 rc = pMachine->COMGETTER(FaultToleranceAddress)(bstrAddress.asOutParam()); 7473 if (SUCCEEDED(rc)) 7474 rc = pMachine->COMGETTER(FaultTolerancePassword)(bstrPassword.asOutParam()); 7473 7475 } 7474 7476 if (SUCCEEDED(rc)) … … 7476 7478 Utf8Str strAddress(bstrAddress); 7477 7479 const char *pszAddress = strAddress.isEmpty() ? NULL : strAddress.c_str(); 7480 Utf8Str strPassword(bstrPassword); 7481 const char *pszPassword = strPassword.isEmpty() ? NULL : strPassword.c_str(); 7478 7482 7479 7483 /** @todo set progress cancel callback! */ 7480 7484 7481 7485 /* 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); 7483 7487 AssertRC(vrc); 7484 7488 } -
trunk/src/VBox/VMM/FTM.cpp
r31738 r31743 45 45 /** @todo saved state for master nodes! */ 46 46 pVM->ftm.s.pszAddress = NULL; 47 pVM->ftm.s.pszPassword = NULL; 47 48 pVM->fFaultTolerantMaster = false; 48 49 return VINF_SUCCESS; … … 62 63 if (pVM->ftm.s.pszAddress) 63 64 RTMemFree(pVM->ftm.s.pszAddress); 65 if (pVM->ftm.s.pszPassword) 66 RTMemFree(pVM->ftm.s.pszPassword); 64 67 65 68 return VINF_SUCCESS; … … 110 113 * @param pszAddress Master VM address 111 114 * @param uPort Master VM port 115 * @param pszPassword FT password 112 116 * 113 117 * @thread Any thread. … … 115 119 * @vmstateto PoweringOn+Running (master), PoweringOn+Running_FT (standby) 116 120 */ 117 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort )121 VMMR3DECL(int) FTMR3PowerOn(PVM pVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort, const char *pszPassword) 118 122 { 119 123 int rc; … … 123 127 ("%s\n", VMR3GetStateName(enmVMState)), 124 128 VERR_INTERNAL_ERROR_4); 129 AssertReturn(pszAddress, VERR_INVALID_PARAMETER); 125 130 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); 129 136 if (fMaster) 130 137 { -
trunk/src/VBox/VMM/FTMInternal.h
r31738 r31743 37 37 { 38 38 char *pszAddress; 39 char *pszPassword; 39 40 unsigned uPort; 40 41 unsigned uInterval;
Note:
See TracChangeset
for help on using the changeset viewer.