Beispiel #1
0
static void catchup_cleanup (mc_socket_main_t *msm,
                             mc_socket_catchup_t *c,
                             unix_main_t *um, unix_file_t *uf)
{
  hash_unset (msm->catchup_index_by_file_descriptor, uf->file_descriptor);
  unix_file_del (um, uf);
  vec_free (c->input_vector);
  vec_free (c->output_vector);
  pool_put (msm->catchups, c);
}
Beispiel #2
0
PUBLIC void res_releasePng(Texture *img) {
    if (TRUE == hash_get(res.hash_img, img->filePath, strlen(img->filePath), NULL, NULL)) {
        img->usedCount--;
        if (img->usedCount <= 0) {
            hash_unset(res.hash_img, img->filePath, strlen(img->filePath));
            image_destroy(img);
        }
    } else {
        image_destroy(img);
    }
    return;
}
Beispiel #3
0
static void
abf_policy_destroy (abf_policy_t * ap)
{
  /*
   * this ABF should not be a sibling on the path list, since
   * that was removed when the API config went
   */
  ASSERT (ap->ap_sibling == ~0);
  ASSERT (ap->ap_pl == FIB_NODE_INDEX_INVALID);

  hash_unset (abf_policy_db, ap->ap_id);
  pool_put (abf_policy_pool, ap);
}
Beispiel #4
0
void
bier_fmask_db_remove (const bier_fmask_id_t *fmid)
{
    uword *p;

    p = hash_get_mem(bier_fmask_db.bfdb_hash, fmid);

    if (NULL == p) {
        /*
         * remove a non-existent entry - oops
         */
        ASSERT (!"remove non-existent fmask");
    } else {
        hash_unset(bier_fmask_db.bfdb_hash, fmid);
    }
}
Beispiel #5
0
static void
gbp_bridge_domain_db_remove (gbp_bridge_domain_t * gb)
{
  hash_unset (gbp_bridge_domain_db.gbd_by_bd_id, gb->gb_bd_id);
  gbp_bridge_domain_db.gbd_by_bd_index[gb->gb_bd_index] = INDEX_INVALID;
}