VirtualBox

Changeset 30503 in vbox


Ignore:
Timestamp:
Jun 29, 2010 1:44:57 PM (15 years ago)
Author:
vboxsync
Message:

webservice: introduce global lock for converting method parameters

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

Legend:

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

    r30501 r30503  
    131131typedef std::map<RTTHREAD, com::Utf8Str> ThreadsMap;
    132132ThreadsMap          g_mapThreads;
     133
     134// this mutex is held while methodmaps.cpp converts parameters
     135util::WriteLockHandle  *g_pParamsLockHandle;
    133136
    134137/****************************************************************************
  • trunk/src/VBox/Main/webservice/vboxweb.h

    r30501 r30503  
    5252extern util::WriteLockHandle  *g_pAuthLibLockHandle;
    5353extern util::WriteLockHandle  *g_pSessionsLockHandle;
     54extern util::WriteLockHandle  *g_pParamsLockHandle;
    5455
    5556/****************************************************************************
  • trunk/src/VBox/Main/webservice/websrv-cpp.xsl

    r30463 r30503  
    455455<xsl:template name="emitPrologue">
    456456  <xsl:text>    WEBDEBUG((g_pcszEntering, __FUNCTION__));
     457
     458    util::AutoWriteLock paramsLock(*g_pParamsLockHandle  COMMA_LOCKVAL_SRC_POS);
    457459
    458460    do {</xsl:text>
     
    752754  </xsl:variable>
    753755
     756  <xsl:call-template name="emitNewlineIndent8" />
     757  <xsl:text>paramsLock.release();</xsl:text>
    754758  <xsl:call-template name="emitNewlineIndent8" />
    755759  <xsl:value-of select="concat('WEBDEBUG((g_pcszCallingComMethod, &quot;', $comMethodName, '&quot;));')" />
     
    822826  <xsl:call-template name="emitNewlineIndent8" />
    823827  <xsl:text>WEBDEBUG((g_pcszDoneCallingComMethod));</xsl:text>
     828  <xsl:call-template name="emitNewlineIndent8" />
     829  <xsl:text>paramsLock.acquire();</xsl:text>
    824830  <xsl:call-template name="emitNewline" />
    825831</xsl:template>
Note: See TracChangeset for help on using the changeset viewer.

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