Changeset 24969 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Nov 25, 2009 4:56:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r24903 r24969 797 797 uint32_t uMaxDowntime = 250 /*ms*/; 798 798 uint32_t uPort = UINT32_MAX; 799 uint32_t cMsTimeout = 0; 799 800 Bstr bstrPassword(""); 800 801 static const RTGETOPTDEF s_aTeleportOptions[] = … … 804 805 { "--maxdowntime", 'd', RTGETOPT_REQ_UINT32 }, 805 806 { "--port", 'p', RTGETOPT_REQ_UINT32 }, /** @todo RTGETOPT_FLAG_MANDATORY */ 806 { "--password", 'P', RTGETOPT_REQ_STRING } 807 { "--password", 'P', RTGETOPT_REQ_STRING }, 808 { "--timeout", 't', RTGETOPT_REQ_UINT32 } 807 809 }; 808 810 RTGETOPTSTATE GetOptState; … … 819 821 case 'p': uPort = Value.u32; break; 820 822 case 'P': bstrPassword = Value.psz; break; 823 case 't': cMsTimeout = Value.u32; break; 821 824 default: 822 825 errorGetOpt(USAGE_CONTROLVM, ch, &Value); … … 830 833 ComPtr<IProgress> progress; 831 834 CHECK_ERROR_BREAK(console, Teleport(bstrHostname, uPort, bstrPassword, uMaxDowntime, progress.asOutParam())); 835 836 if (cMsTimeout) 837 { 838 rc = progress->COMSETTER(Timeout)(cMsTimeout); 839 if (FAILED(rc) && rc != VBOX_E_INVALID_OBJECT_STATE) 840 CHECK_ERROR_BREAK(progress, COMSETTER(Timeout)(cMsTimeout)); /* lazyness */ 841 } 842 832 843 rc = showProgress(progress); 833 844 if (FAILED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.