botsense/bsProxy/bsProxyThread.c
static int ThHashAdd(const char *sDevUri, BsProxyThCtl_T *pThCtl)
{
  char *sKey = new_strdup(sDevUri);
  int   rc;

  // insert into hash table, automatically allocating hnode_t
  if( !hash_insert(BsThHashTbl, sKey, pThCtl) )
  {
    rc = -BS_ECODE_NO_RSRC;
    BSPROXY_TH_LOG_ERROR(sDevUri, rc, "hash_insert(%s,...) failed", sKey);
    ThHashDeleteData(sKey, pThCtl);
    return rc;
  }

  return BS_OK;
}
/*!
 * \brief Add the module data to the i/f module hash table.
 *
 * \param sDevUri   Allocated Proxied device hash table key.
 * \param pThCtl    Allocated service thread control.
 *
 * \copydoc doc_return_std
 */
\brief Add the module data to the i/f module hash table.
\param sDevUri   Allocated Proxied device hash table key.
\param pThCtl    Allocated service thread control.


\ brief Add the module data to the i / f module hash table . \ param sDevUri Allocated Proxied device hash table key . \ param pThCtl Allocated service thread control .
static int ThHashAdd(const char *sDevUri, BsProxyThCtl_T *pThCtl)
{
  char *sKey = new_strdup(sDevUri);
  int   rc;
  if( !hash_insert(BsThHashTbl, sKey, pThCtl) )
  {
    rc = -BS_ECODE_NO_RSRC;
    BSPROXY_TH_LOG_ERROR(sDevUri, rc, "hash_insert(%s,...) failed", sKey);
    ThHashDeleteData(sKey, pThCtl);
    return rc;
  }
  return BS_OK;
}
static int ThHashAdd ( const char * sDevUri , BsProxyThCtl_T * pThCtl ) { char * sKey = new_strdup ( sDevUri ) ; int rc ; if ( ! hash_insert ( BsThHashTbl , sKey , pThCtl ) ) { rc = - BS_ECODE_NO_RSRC ; BSPROXY_TH_LOG_ERROR ( sDevUri , rc , " " , sKey ) ; ThHashDeleteData ( sKey , pThCtl ) ; return rc ; } return BS_OK ; }
\brief Add the module data to the i/f module hash table.
\ brief Add the module data to the i / f module hash table .
// insert into hash table, automatically allocating hnode_t