Changeset 23643 in vbox for trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
- Timestamp:
- Oct 9, 2009 12:23:32 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53341
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r23223 r23643 199 199 } 200 200 201 STDMETHOD(OnRemoteDisplayInfoChange)() 202 { 203 #ifdef VBOX_WITH_VRDP 204 if (gConsole) 205 { 206 ComPtr<IRemoteDisplayInfo> info; 207 gConsole->COMGETTER(RemoteDisplayInfo)(info.asOutParam()); 208 if (info) 209 { 210 LONG port; 211 info->COMGETTER(Port)(&port); 212 if (port != 0) 213 RTPrintf("Listening on port %d\n", port); 214 else 215 RTPrintf("VRDP server failed to start\n"); 216 } 217 } 218 #endif 219 return S_OK; 220 } 221 201 222 STDMETHOD(OnUSBControllerChange)() 202 223 { … … 398 419 { 399 420 #ifdef VBOX_WITH_VRDP 400 ULONG vrdpPort = ~0U;421 const char *vrdpPort = NULL; 401 422 const char *vrdpAddress = NULL; 402 423 const char *vrdpEnabled = NULL; … … 505 526 #ifdef VBOX_WITH_VRDP 506 527 case 'p': 507 vrdpPort = ValueUnion. u32;528 vrdpPort = ValueUnion.psz; 508 529 break; 509 530 case 'a': … … 850 871 851 872 /* set VRDP port if requested by the user */ 852 if (vrdpPort != ~0U) 853 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Port)(vrdpPort)); 854 else 855 CHECK_ERROR_BREAK(vrdpServer, COMGETTER(Port)(&vrdpPort)); 873 if (vrdpPort != NULL) 874 { 875 Bstr bstr = vrdpPort; 876 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(bstr)); 877 } 856 878 /* set VRDP address if requested by the user */ 857 879 if (vrdpAddress != NULL) … … 875 897 #endif 876 898 Log (("VBoxHeadless: Powering up the machine...\n")); 877 #ifdef VBOX_WITH_VRDP878 if (fVRDPEnable)879 RTPrintf("Listening on port %d\n", !vrdpPort ? VRDP_DEFAULT_PORT : vrdpPort);880 #endif881 899 882 900 ComPtr <IProgress> progress;
Note:
See TracChangeset
for help on using the changeset viewer.