#define HASH_PREFIX(x) pulse_client_##x
#define HASH_KEY_ATOMIC idx
#define HASH_WANT_CLEANUP
+#define HASH_WANT_FIND
#define HASH_WANT_LOOKUP
#define HASH_WANT_REMOVE
#define HASH_ZERO_FILL
static void pulse_client_gone(int idx)
{
DBG("Pulse: REMOVE CLIENT #%d", idx);
- struct pulse_client *c = pulse_client_lookup(idx);
- clist_remove(&c->n);
- pulse_client_remove(c);
- schedule_update();
+ struct pulse_client *c = pulse_client_find(idx);
+ if (c)
+ {
+ clist_remove(&c->n);
+ pulse_client_remove(c);
+ schedule_update();
+ }
}
struct pulse_client *pulse_client_by_idx(int idx)
{
- return pulse_client_lookup(idx);
+ return pulse_client_find(idx);
}
/*** Events ***/