Beispiel #1
0
int
__bro_ht_evict_oldest(BroHT *ht)
{
  if (! ht)
    return 0;
  
  if (ht->use_age_list && ht->age_list.tqh_first)
    __bro_ht_del(ht, ht->age_list.tqh_first->it_key);
  
  return ht->ht_size;
}
Beispiel #2
0
void *
__bro_sobject_data_del(BroSObject *obj, const char *key)
{
  void *result;
  
  D_ENTER;
  
  if (! obj || ! key || ! *key)
    D_RETURN_(NULL);
  
  result = __bro_ht_del(obj->data, (void *) key);
  /* D(("Removing data item '%s' from object %p yields %p\n", key, obj, result)); */
  D_RETURN_(result);
}