botsense/bsProxy/bsProxyMod.c
void ModUnload(BsProxyModIF_T *pModIF)
{

  ModLock();

  if( (pModIF = ModHashGetIF(pModIF->m_sModUri)) != NULL )
  {
    if( pModIF->m_uRefCnt > 0 )
    {
      pModIF->m_uRefCnt--;
    }

    if( pModIF->m_uRefCnt == 0 )
    {
      // call module specific exported exit function
      pModIF->m_fnModExit();

      // unload the dll
      ModDllClose(pModIF->m_sModUri, pModIF->m_dllHandle);

      LOGDIAG1("Interface Module \"%s\" unloaded (refcnt=%u).",
          pModIF->m_sModUri, pModIF->m_uRefCnt);

      // delete data
      ModHashDelete(pModIF);
    }
    else
    {
      LOGDIAG1("Interface Module \"%s\" detached (refcnt=%u).",
          pModIF->m_sModUri, pModIF->m_uRefCnt);
    }
  }

  ModUnlock();
}
/*!
 * \brief Unload the interface module.
 *
 * The module's reference count is decremented. If the count is zero, then the
 * module's exit routine is called and the module dynamic library is unloaded
 * from bsProxy server application.
 *
 * Multi-Thread safe.
 *
 * \param pModIF   Exported module interface.
 */
\brief Unload the interface module.
The module's reference count is decremented. If the count is zero, then the
module's exit routine is called and the module dynamic library is unloaded
from bsProxy server application.

Multi-Thread safe.

\param pModIF   Exported module interface.
\ brief Unload the interface module . The module ' s reference count is decremented . If the count is zero then the module ' s exit routine is called and the module dynamic library is unloaded from bsProxy server application . Multi - Thread safe . \ param pModIF Exported module interface .
void ModUnload(BsProxyModIF_T *pModIF)
{
  ModLock();
  if( (pModIF = ModHashGetIF(pModIF->m_sModUri)) != NULL )
  {
    if( pModIF->m_uRefCnt > 0 )
    {
      pModIF->m_uRefCnt--;
    }
    if( pModIF->m_uRefCnt == 0 )
    {
      pModIF->m_fnModExit();
      ModDllClose(pModIF->m_sModUri, pModIF->m_dllHandle);
      LOGDIAG1("Interface Module \"%s\" unloaded (refcnt=%u).",
          pModIF->m_sModUri, pModIF->m_uRefCnt);
      ModHashDelete(pModIF);
    }
    else
    {
      LOGDIAG1("Interface Module \"%s\" detached (refcnt=%u).",
          pModIF->m_sModUri, pModIF->m_uRefCnt);
    }
  }
  ModUnlock();
}
void ModUnload ( BsProxyModIF_T * pModIF ) { ModLock ( ) ; if ( ( pModIF = ModHashGetIF ( pModIF -> m_sModUri ) ) != NULL ) { if ( pModIF -> m_uRefCnt > 0 ) { pModIF -> m_uRefCnt -- ; } if ( pModIF -> m_uRefCnt == 0 ) { pModIF -> m_fnModExit ( ) ; ModDllClose ( pModIF -> m_sModUri , pModIF -> m_dllHandle ) ; LOGDIAG1 ( " \" \" " , pModIF -> m_sModUri , pModIF -> m_uRefCnt ) ; ModHashDelete ( pModIF ) ; } else { LOGDIAG1 ( " \" \" " , pModIF -> m_sModUri , pModIF -> m_uRefCnt ) ; } } ModUnlock ( ) ; }
\brief Unload the interface module.
\ brief Unload the interface module .
// call module specific exported exit function // unload the dll // delete data