VirtualBox

Changeset 16301 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 28, 2009 12:25:26 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42130
Message:

webservice: logging improvements, optimizations

Location:
trunk/src/VBox/Main/webservice
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r16122 r16301  
    245245    int rc;
    246246
     247    // intialize runtime
     248    RTR3Init();
     249
    247250    RTStrmPrintf(g_pStdErr, "Sun xVM VirtualBox Webservice Version %s\n"
    248251                            "(C) 2005-2009 Sun Microsystems, Inc.\n"
    249252                            "All rights reserved.\n", VBOX_VERSION_STRING);
    250 
    251     // intialize runtime
    252     RTR3Init(); /** @todo r=bird: This isn't at top of main(), is it? */
    253253
    254254    int c;
     
    304304                }
    305305
    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);
    307308            }
    308309            break;
     
    344345
    345346    // intialize COM/XPCOM
    346     ComPtr<ISession> session;
     347//     ComPtr<ISession> session;
    347348    if ((rc = com::Initialize()))
    348349        RTStrmPrintf(g_pStdErr, "[!] Failed to initialize COM!\n");
    349350    else if ((rc = g_pVirtualBox.createLocalObject(CLSID_VirtualBox)))
    350351        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");
    353354
    354355    if (rc)
     
    688689 * two integers representing a session and object ID, respectively.
    689690 *
    690  * @param id
     691 * @param sz Buffer with at least 34 bytes space to receive MOR string.
    691692 * @param sessid
    692693 * @param objid
    693694 * @return
    694695 */
    695 WSDLT_ID MakeManagedObjectRef(uint64_t &sessid,
    696                               uint64_t &objid)
    697 {
    698     char sz[34];
     696void MakeManagedObjectRef(char *sz,
     697                          uint64_t &sessid,
     698                          uint64_t &objid)
     699{
    699700    RTStrFormatNumber(sz, sessid, 16, 16, 0, RTSTR_F_64BIT | RTSTR_F_ZEROPAD);
    700701    sz[16] = '-';
    701702    RTStrFormatNumber(sz + 17, objid, 16, 16, 0, RTSTR_F_64BIT | RTSTR_F_ZEROPAD);
    702     return sz;
    703703}
    704704
     
    10241024    ULONG64 cTotal = ++g_cManagedObjects;           // raise global count and make a copy for the debug message below
    10251025
    1026     _strID = MakeManagedObjectRef(session._uSessionID, _id);
     1026    char sz[34];
     1027    MakeManagedObjectRef(sz, session._uSessionID, _id);
     1028    _strID = sz;
    10271029
    10281030    session._pp->_mapManagedObjectsById[_id] = this;
  • trunk/src/VBox/Main/webservice/vboxweb.h

    r16122 r16301  
    220220    else
    221221    {
     222        // pRef->getComPtr returns a ComPtr<IUnknown>; by casting it to
     223        // ComPtr<T>, we implicitly do a queryInterface() call
    222224        if (pComPtr = pRef->getComPtr())
    223225            return 0;
    224226
    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()));
    226228        rc = VERR_WEB_UNSUPPORTED_INTERFACE;
    227229        RaiseSoapInvalidObjectFault(soap, id);      // @todo better message
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette