From 34dd4a20f2e976b260e8aa3f3128e55ec80bb85b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Aug 2008 23:56:25 +0200 Subject: fix shutdown when --disallow-module-loading=1 is passed --- src/modules/module-hal-detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/module-hal-detect.c') diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c index bfabd91a..caa7a1fa 100644 --- a/src/modules/module-hal-detect.c +++ b/src/modules/module-hal-detect.c @@ -511,7 +511,7 @@ static void device_removed_cb(LibHalContext* context, const char *udi) { pa_log_debug("Device removed: %s", udi); if ((d = pa_hashmap_remove(u->devices, udi))) { - pa_module_unload_by_index(u->core, d->index); + pa_module_unload_by_index(u->core, d->index, TRUE); hal_device_free(d); } } -- cgit From 432b4e5f7d9ea722d13bbe4c117a4f9b78091e4f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 9 Aug 2008 16:20:29 +0200 Subject: don't use PA_GCC_UNUSED anymore --- src/modules/module-hal-detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/module-hal-detect.c') diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c index caa7a1fa..ce766258 100644 --- a/src/modules/module-hal-detect.c +++ b/src/modules/module-hal-detect.c @@ -108,7 +108,7 @@ static void hal_device_free(struct device* d) { pa_xfree(d); } -static void hal_device_free_cb(void *d, PA_GCC_UNUSED void *data) { +static void hal_device_free_cb(void *d, void *data) { hal_device_free(d); } -- cgit From b7026bf248948a6a30386ddbcc137f48f369a51e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Aug 2008 22:39:54 +0200 Subject: add a few more gcc warning flags and fix quite a few problems found by doing so --- src/modules/module-hal-detect.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/module-hal-detect.c') diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c index ce766258..c76a366c 100644 --- a/src/modules/module-hal-detect.c +++ b/src/modules/module-hal-detect.c @@ -405,7 +405,7 @@ static void device_added_time_cb(pa_mainloop_api *ea, pa_time_event *ev, const s dbus_error_init(&error); if (!pa_hashmap_get(td->u->devices, td->udi)) { - int b; + dbus_bool_t b; struct device *d; b = libhal_device_exists(td->u->context, td->udi, &error); @@ -433,7 +433,7 @@ static void device_added_cb(LibHalContext *context, const char *udi) { struct timeval tv; struct timerdata *t; struct userdata *u; - int good = 0; + pa_bool_t good = FALSE; pa_assert_se(u = libhal_ctx_get_user_data(context)); @@ -749,17 +749,17 @@ int pa__init(pa_module*m) { } if ((api = pa_modargs_get_value(ma, "api", NULL))) { - int good = 0; + pa_bool_t good = FALSE; #ifdef HAVE_ALSA if (strcmp(api, CAPABILITY_ALSA) == 0) { - good = 1; + good = TRUE; api = CAPABILITY_ALSA; } #endif #ifdef HAVE_OSS if (strcmp(api, CAPABILITY_OSS) == 0) { - good = 1; + good = TRUE; api = CAPABILITY_OSS; } #endif -- cgit