mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Do not send SFP info if no SFP port present
This commit is contained in:
+9
-7
@@ -243,14 +243,16 @@ void send_basic_info(void)
|
|||||||
slen += strtox(outbuf + slen, "\",\"flash_size\":\"");
|
slen += strtox(outbuf + slen, "\",\"flash_size\":\"");
|
||||||
string_to_html(get_flash_size_str());
|
string_to_html(get_flash_size_str());
|
||||||
|
|
||||||
slen += strtox(outbuf + slen, "\",\"sfp_slot_0\":\"");
|
if (machine.n_sfp) {
|
||||||
send_sfp_info(0);
|
slen += strtox(outbuf + slen, "\",\"sfp_slot_0\":\"");
|
||||||
char_to_html('"');
|
send_sfp_info(0);
|
||||||
if (machine.n_sfp == 2) {
|
if (machine.n_sfp == 2) {
|
||||||
slen += strtox(outbuf + slen, ",\"sfp_slot_1\":\"");
|
slen += strtox(outbuf + slen, "\",\"sfp_slot_1\":\"");
|
||||||
send_sfp_info(1);
|
send_sfp_info(1);
|
||||||
char_to_html('"');
|
}
|
||||||
}
|
}
|
||||||
|
char_to_html('"');
|
||||||
|
|
||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user