예제 #1
0
static int cache_entry_hash(const void *obj, int flags)
{
	const struct cache_entry *entry = obj;
	int hash = 0;

	ast_assert(!(flags & OBJ_KEY));

	hash += ast_hashtab_hash_string(stasis_message_type_name(entry->type));
	hash += ast_hashtab_hash_string(entry->id);
	return hash;
}
예제 #2
0
static unsigned int hashtab_hash_string(const void *obj)
{
	const struct ht_element *o = obj;
	return ast_hashtab_hash_string((const void *)o->key);
}