Skip to content

Commit

Permalink
feat: show less verbose info
Browse files Browse the repository at this point in the history
  • Loading branch information
PolisanTheEasyNick committed Nov 10, 2024
1 parent eed729a commit 7f2248a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {

pi = pigpio_start(PI_ADDR, PI_PORT);
if (pi < 0) {
fprintf(stderr, "Pigpio initialization failed.\n");
logger("Pigpio initialization failed.\n");
return 1;
}
logger("Connected to pigpio daemon successfully!");
Expand Down
2 changes: 2 additions & 0 deletions parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ struct parse_result parse_payload(unsigned char *buffer, const uint8_t version,
memcpy(HMAC_DATA, buffer, sizes.header_size); // HEADER
memcpy(&HMAC_DATA[sizes.header_size], &buffer[payload_offset], sizes.payload_size); // PAYLOAD

#ifdef DEBUG
logger_debug("parse_message: HEADER + PAYLOAD:");
for (int i = 0; i < HMAC_DATA_SIZE; i++) {
printf("%x ", HMAC_DATA[i]);
}
printf("\n");
#endif

// generating new hmac
char *key = SHARED_SECRET;
Expand Down

0 comments on commit 7f2248a

Please sign in to comment.