Skip to content

Commit ea5a328

Browse files
committed
cleanup: Make loglogdata a little clearer and safer.
1 parent f1991aa commit ea5a328

File tree

7 files changed

+353
-106
lines changed

7 files changed

+353
-106
lines changed

other/bootstrap_node_packets.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static uint8_t bootstrap_motd[MAX_MOTD_LENGTH];
2121
static uint16_t bootstrap_motd_length;
2222

2323
/* To request this packet just send a packet of length INFO_REQUEST_PACKET_LENGTH
24-
* with the first byte being BOOTSTRAP_INFO_PACKET_ID
24+
* with the first byte being NET_PACKET_BOOTSTRAP_INFO
2525
*/
2626
static int handle_info_request(void *object, const IP_Port *source, const uint8_t *packet, uint16_t length,
2727
void *userdata)
@@ -33,7 +33,7 @@ static int handle_info_request(void *object, const IP_Port *source, const uint8_
3333
const Networking_Core *nc = (const Networking_Core *)object;
3434

3535
uint8_t data[1 + sizeof(bootstrap_version) + MAX_MOTD_LENGTH];
36-
data[0] = BOOTSTRAP_INFO_PACKET_ID;
36+
data[0] = NET_PACKET_BOOTSTRAP_INFO;
3737
memcpy(data + 1, &bootstrap_version, sizeof(bootstrap_version));
3838
const uint16_t len = 1 + sizeof(bootstrap_version) + bootstrap_motd_length;
3939
memcpy(data + 1 + sizeof(bootstrap_version), bootstrap_motd, bootstrap_motd_length);
@@ -55,6 +55,6 @@ int bootstrap_set_callbacks(Networking_Core *net, uint32_t version, const uint8_
5555
memcpy(bootstrap_motd, motd, motd_length);
5656
bootstrap_motd_length = motd_length;
5757

58-
networking_registerhandler(net, BOOTSTRAP_INFO_PACKET_ID, &handle_info_request, net);
58+
networking_registerhandler(net, NET_PACKET_BOOTSTRAP_INFO, &handle_info_request, net);
5959
return 0;
6060
}

testing/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ sh_test(
1414
args = ["$(locations %s)" % f for f in CIMPLE_FILES] + [
1515
"-Wno-boolean-return",
1616
"-Wno-callback-names",
17-
"-Wno-enum-from-int",
1817
"+RTS",
1918
"-N4",
2019
"-RTS",

0 commit comments

Comments
 (0)