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\":\"");
|
||||
string_to_html(get_flash_size_str());
|
||||
|
||||
slen += strtox(outbuf + slen, "\",\"sfp_slot_0\":\"");
|
||||
send_sfp_info(0);
|
||||
char_to_html('"');
|
||||
if (machine.n_sfp == 2) {
|
||||
slen += strtox(outbuf + slen, ",\"sfp_slot_1\":\"");
|
||||
send_sfp_info(1);
|
||||
char_to_html('"');
|
||||
if (machine.n_sfp) {
|
||||
slen += strtox(outbuf + slen, "\",\"sfp_slot_0\":\"");
|
||||
send_sfp_info(0);
|
||||
if (machine.n_sfp == 2) {
|
||||
slen += strtox(outbuf + slen, "\",\"sfp_slot_1\":\"");
|
||||
send_sfp_info(1);
|
||||
}
|
||||
}
|
||||
char_to_html('"');
|
||||
|
||||
char_to_html('}');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user