#include <string.h>
#include <unistd.h>
+#include "bus-util.h"
#include "def.h"
#include "env-util.h"
#include "fd-util.h"
sd_bus_message_unref(c->locale_cache);
sd_bus_message_unref(c->x11_cache);
sd_bus_message_unref(c->vc_cache);
+
+ bus_verify_polkit_async_registry_free(c->polkit_registry);
};
void locale_simplify(char *locale[_VARIABLE_LC_MAX]) {
#include "sd-bus.h"
+#include "hashmap.h"
#include "locale-util.h"
#include "time-util.h"
usec_t vc_mtime;
char *vc_keymap;
char *vc_keymap_toggle;
+
+ Hashmap *polkit_registry;
} Context;
int find_converted_keymap(const char *x11_layout, const char *x11_variant, char **new_keymap);
#include "strv.h"
#include "user-util.h"
-static Hashmap *polkit_registry = NULL;
-
static int locale_update_system_manager(Context *c, sd_bus *bus) {
_cleanup_free_ char **l_unset = NULL;
_cleanup_strv_free_ char **l_set = NULL;
NULL,
interactive,
UID_INVALID,
- &polkit_registry,
+ &c->polkit_registry,
error);
if (r < 0)
return r;
NULL,
interactive,
UID_INVALID,
- &polkit_registry,
+ &c->polkit_registry,
error);
if (r < 0)
return r;
NULL,
interactive,
UID_INVALID,
- &polkit_registry,
+ &c->polkit_registry,
error);
if (r < 0)
return r;
log_error_errno(r, "Failed to run event loop: %m");
finish:
- bus_verify_polkit_async_registry_free(polkit_registry);
-
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}