-/* $Id$ */
-
/***
This file is part of PulseAudio.
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2 of the License,
+ by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
PulseAudio is distributed in the hope that it will be useful, but
#include <pulse/xmalloc.h>
-#include <pulsecore/queue.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
struct pa_subscription {
pa_core *core;
- int dead;
+ bool dead;
pa_subscription_cb_t callback;
void *userdata;
s = pa_xnew(pa_subscription, 1);
s->core = c;
- s->dead = 0;
+ s->dead = false;
s->callback = callback;
s->userdata = userdata;
s->mask = m;
pa_assert(s);
pa_assert(!s->dead);
- s->dead = 1;
+ s->dead = true;
sched_event(s->core);
}
[PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE"
};
- pa_log("%s event (%s|%s|%u)",
+ pa_log_debug("%s event (%s|%s|%u)",
prefix,
fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK],
type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK],
}
#endif
-/* Deferred callback for dispatching subscirption events */
+/* Deferred callback for dispatching subscription events */
static void defer_cb(pa_mainloop_api *m, pa_defer_event *de, void *userdata) {
pa_core *c = userdata;
pa_subscription *s;
pa_subscription_event *e;
pa_assert(c);
- /* No need for queuing subscriptions of noone is listening */
+ /* No need for queuing subscriptions of no one is listening */
if (!c->subscriptions)
return;
* entry in the queue. */
free_event(i);
- pa_log_debug("dropped redundant event.");
+ pa_log_debug("Dropped redundant event due to remove event.");
continue;
}
/* This object has changed. If a "new" or "change" event for
* this object is still in the queue we can exit. */
- pa_log_debug("dropped redundant event.");
+ pa_log_debug("Dropped redundant event due to change event.");
return;
}
}