botsense/bsProxy/bsProxyMod.c
void *ModCbRsrcRemove(BsModRsrcTbl_T *pRsrcTbl, BsVConnHnd_T hndVConn)
{
  int   index;
  void *pRsrc;

  // bad handle
  if( !BSMOD_IS_VCONN_HANDLE(hndVConn) )
  {
    return NULL;
  }

  // get resource index
  else if( (index = BSMOD_RSRC_INDEX(pRsrcTbl, hndVConn)) < 0 )
  {
    return NULL;
  }

  // removed resource
  pRsrc = pRsrcTbl->m_vecRsrc[index];

  // remove resource to resource table
  pRsrcTbl->m_vecRsrc[index]     = NULL;
  pRsrcTbl->m_vecIndex[hndVConn] = (byte_t)BSPROXY_VCONN_UNDEF;
  pRsrcTbl->m_uInUseCount--;

  return pRsrc;
}
/*!
 * \brief Remove a resource from the resource table.
 *
 * The resource is not deleted.
 *
 * \param pRsrcTbl  Pointer to resource table.
 * \param hndVConn  Virtual connection handle.
 *
 * \return On success, returns pointer to removed resource. On failure, NULL
 * is returned.
 */
\brief Remove a resource from the resource table.
The resource is not deleted.

\param pRsrcTbl  Pointer to resource table.
\param hndVConn  Virtual connection handle.

\return On success, returns pointer to removed resource. On failure, NULL
is returned.
\ brief Remove a resource from the resource table . The resource is not deleted . \ param pRsrcTbl Pointer to resource table . \ param hndVConn Virtual connection handle . \ return On success returns pointer to removed resource . On failure NULL is returned .
void *ModCbRsrcRemove(BsModRsrcTbl_T *pRsrcTbl, BsVConnHnd_T hndVConn)
{
  int   index;
  void *pRsrc;
  if( !BSMOD_IS_VCONN_HANDLE(hndVConn) )
  {
    return NULL;
  }
  else if( (index = BSMOD_RSRC_INDEX(pRsrcTbl, hndVConn)) < 0 )
  {
    return NULL;
  }
  pRsrc = pRsrcTbl->m_vecRsrc[index];
  pRsrcTbl->m_vecRsrc[index]     = NULL;
  pRsrcTbl->m_vecIndex[hndVConn] = (byte_t)BSPROXY_VCONN_UNDEF;
  pRsrcTbl->m_uInUseCount--;
  return pRsrc;
}
void * ModCbRsrcRemove ( BsModRsrcTbl_T * pRsrcTbl , BsVConnHnd_T hndVConn ) { int index ; void * pRsrc ; if ( ! BSMOD_IS_VCONN_HANDLE ( hndVConn ) ) { return NULL ; } else if ( ( index = BSMOD_RSRC_INDEX ( pRsrcTbl , hndVConn ) ) < 0 ) { return NULL ; } pRsrc = pRsrcTbl -> m_vecRsrc [ index ] ; pRsrcTbl -> m_vecRsrc [ index ] = NULL ; pRsrcTbl -> m_vecIndex [ hndVConn ] = ( byte_t ) BSPROXY_VCONN_UNDEF ; pRsrcTbl -> m_uInUseCount -- ; return pRsrc ; }
\brief Remove a resource from the resource table.
\ brief Remove a resource from the resource table .
// bad handle // get resource index // removed resource // remove resource to resource table