summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b14e279)
sd-bus generally exposes bools as "int" instead of "bool" in the public API.
This is relevant when unmarshaling booleans, as the relevant functions expect
an int* pointer and no bool* pointer. Since sizeof(bool) is not necessarily the
same as sizeof(int) this is problematic and might result in memory corruption.
Let's fix this, and make sure bus_map_all_properties() handles booleans as
ints, as the rest of sd-bus, and make all users of it expect the right thing.
char *seat;
char *tty;
char *display;
char *seat;
char *tty;
char *display;
char *remote_host;
char *remote_user;
char *service;
char *remote_host;
char *remote_user;
char *service;
typedef struct UserStatusInfo {
uid_t uid;
typedef struct UserStatusInfo {
uid_t uid;
char *name;
struct dual_timestamp timestamp;
char *state;
char *name;
struct dual_timestamp timestamp;
char *state;
case SD_BUS_TYPE_BOOLEAN: {
unsigned b;
case SD_BUS_TYPE_BOOLEAN: {
unsigned b;
r = sd_bus_message_read_basic(m, type, &b);
if (r < 0)
r = sd_bus_message_read_basic(m, type, &b);
if (r < 0)