Changeset 16301 in vbox for trunk/src/VBox
- Timestamp:
- Jan 28, 2009 12:25:26 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 42130
- Location:
- trunk/src/VBox/Main/webservice
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r16122 r16301 245 245 int rc; 246 246 247 // intialize runtime 248 RTR3Init(); 249 247 250 RTStrmPrintf(g_pStdErr, "Sun xVM VirtualBox Webservice Version %s\n" 248 251 "(C) 2005-2009 Sun Microsystems, Inc.\n" 249 252 "All rights reserved.\n", VBOX_VERSION_STRING); 250 251 // intialize runtime252 RTR3Init(); /** @todo r=bird: This isn't at top of main(), is it? */253 253 254 254 int c; … … 304 304 } 305 305 306 WebLog("Opened log file \"%s\"\n", ValueUnion.psz); 306 WebLog("Sun xVM VirtualBox Webservice Version %s\n" 307 "Opened log file \"%s\"\n", VBOX_VERSION_STRING, ValueUnion.psz); 307 308 } 308 309 break; … … 344 345 345 346 // intialize COM/XPCOM 346 ComPtr<ISession> session;347 // ComPtr<ISession> session; 347 348 if ((rc = com::Initialize())) 348 349 RTStrmPrintf(g_pStdErr, "[!] Failed to initialize COM!\n"); 349 350 else if ((rc = g_pVirtualBox.createLocalObject(CLSID_VirtualBox))) 350 351 RTStrmPrintf(g_pStdErr, "[!] Failed to create the local VirtualBox object!\n"); 351 else if ((rc = session.createInprocObject(CLSID_Session)))352 RTStrmPrintf(g_pStdErr, "[!] Failed to create the inproc VirtualBox object!\n");352 // else if ((rc = session.createInprocObject(CLSID_Session))) 353 // RTStrmPrintf(g_pStdErr, "[!] Failed to create the inproc VirtualBox object!\n"); 353 354 354 355 if (rc) … … 688 689 * two integers representing a session and object ID, respectively. 689 690 * 690 * @param id691 * @param sz Buffer with at least 34 bytes space to receive MOR string. 691 692 * @param sessid 692 693 * @param objid 693 694 * @return 694 695 */ 695 WSDLT_ID MakeManagedObjectRef(uint64_t &sessid,696 uint64_t &objid)697 { 698 char sz[34]; 696 void MakeManagedObjectRef(char *sz, 697 uint64_t &sessid, 698 uint64_t &objid) 699 { 699 700 RTStrFormatNumber(sz, sessid, 16, 16, 0, RTSTR_F_64BIT | RTSTR_F_ZEROPAD); 700 701 sz[16] = '-'; 701 702 RTStrFormatNumber(sz + 17, objid, 16, 16, 0, RTSTR_F_64BIT | RTSTR_F_ZEROPAD); 702 return sz;703 703 } 704 704 … … 1024 1024 ULONG64 cTotal = ++g_cManagedObjects; // raise global count and make a copy for the debug message below 1025 1025 1026 _strID = MakeManagedObjectRef(session._uSessionID, _id); 1026 char sz[34]; 1027 MakeManagedObjectRef(sz, session._uSessionID, _id); 1028 _strID = sz; 1027 1029 1028 1030 session._pp->_mapManagedObjectsById[_id] = this; -
trunk/src/VBox/Main/webservice/vboxweb.h
r16122 r16301 220 220 else 221 221 { 222 // pRef->getComPtr returns a ComPtr<IUnknown>; by casting it to 223 // ComPtr<T>, we implicitly do a queryInterface() call 222 224 if (pComPtr = pRef->getComPtr()) 223 225 return 0; 224 226 225 WEBDEBUG((" Interface not support for object reference %s, which is of class %s\n", id.c_str(), pRef->getInterfaceName()));227 WEBDEBUG((" Interface not supported for object reference %s, which is of class %s\n", id.c_str(), pRef->getInterfaceName())); 226 228 rc = VERR_WEB_UNSUPPORTED_INTERFACE; 227 229 RaiseSoapInvalidObjectFault(soap, id); // @todo better message
Note:
See TracChangeset
for help on using the changeset viewer.