Fixing missing parts to make the tests pass

boot_to_html outputs 1 and 0 not true and false, making the sim match
the real implementation.
lldp.json has a hanging , in the array; so overwriting it
This commit is contained in:
Rob Emery committed 2026-10-10 09:50:27 +01:00
1 parent 72c2625121
commit 2dfe531fe0
4 files changed
+6 -4

No files matched your search

+1 -3
View File
@@ -749,12 +749,10 @@ void send_lldp(void)
bool_to_html((1 << machine.log_to_phys_port[port]) & lldp_physical_port_status);
slen += strtox(outbuf + slen, ",");
}
slen--; //overwrite the last comma
slen += strtox(outbuf + slen, "]}");
}
void send_eee(void)
{
dbg_string("send_eee called\nsending EEE status\n");
+3
View File
@@ -84,6 +84,9 @@ char port_names[9][PORT_NAME_SIZE];
struct flash_region_t flash_region;
struct syslog_state syslog_state;
bool stp_enabled;
bool lldp_enabled;
uint16_t lldp_physical_port_status;
uip_ipaddr_t uip_hostaddr, uip_draddr, uip_netmask;
struct uip_eth_addr uip_ethaddr = { .addr = { 0x02, 0x11, 0x22, 0x33, 0x44, 0x55 } };
+1
View File
@@ -152,6 +152,7 @@ void send_lag(void) { }
void send_stp(void) { }
void send_stp_counters(void) { }
void send_vlanlist(void) { }
void send_lldp(void) {}
extern uint8_t authenticated;
+1 -1
View File
@@ -459,7 +459,7 @@ void send_lldp(int s)
char *header = "HTTP/1.1 200 OK\r\n"
"Content-Type: application/json; charset=UTF-8\r\n\r\n";
char *body = "{\"on\": true, \"port_status\":[true,true,false,true,true,true,true,false,false]}";
char *body = "{\"on\": 1,\"port_status\":[1,1,0,1,1,1,1,0,0]}";
write(s, header, strlen(header));
write(s, body, strlen(body));