Skip to content

Commit

Permalink
Add some verbose logs to help catch #106 bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Feb 13, 2021
1 parent ad0f092 commit 1cb42ed
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#define MINIMUM_CLIGHTD_VERSION_MAJ 5 // Clightd minimum required maj version
#define MINIMUM_CLIGHTD_VERSION_MIN 2 // Clightd minimum required min version -> org.clightd.clightd.KbdBacklight

#define MSG_DEBUG() DEBUG("Received msg: %d\n", msg->is_pubsub);

/** Generic structs **/

typedef struct {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static void receive_waiting_init(const msg_t *const msg, UNUSED const void* user
}

static void receive(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD:
read_timer(msg->fd_msg->fd);
Expand Down Expand Up @@ -217,6 +218,7 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
}

static void receive_paused(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case UPOWER_UPD:
upower_callback();
Expand Down
1 change: 1 addition & 0 deletions src/modules/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static void destroy(void) {
}

static void receive(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD: {
sd_bus *b = (sd_bus *)msg->fd_msg->userptr;
Expand Down
1 change: 1 addition & 0 deletions src/modules/daytime.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static void receive_waiting_loc(const msg_t *const msg, UNUSED const void* userd
}

static void receive(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD:
read_timer(msg->fd_msg->fd);
Expand Down
1 change: 1 addition & 0 deletions src/modules/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ static bool evaluate() {
}

static void receive(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD: {
sd_bus *b = (sd_bus *)msg->fd_msg->userptr;
Expand Down
1 change: 1 addition & 0 deletions src/modules/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static bool evaluate() {
}

static void receive(const msg_t *const msg, UNUSED const void* userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD: {
/* We are reading a message delyaed of conf.resumedelay */
Expand Down
1 change: 1 addition & 0 deletions src/modules/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static void receive_waiting_acstate(const msg_t *msg, UNUSED const void *userdat
}

static void receive(const msg_t *msg, UNUSED const void *userdata) {
MSG_DEBUG();
switch (MSG_TYPE()) {
case FD_UPD:
read_timer(msg->fd_msg->fd);
Expand Down

0 comments on commit 1cb42ed

Please sign in to comment.