From bee77a0b6f8ac7e77851790af430a8de28529502 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 19 Oct 2018 17:56:09 +0200 Subject: [PATCH] Disabled network activity indication on the status bar until it's figured out how to do it across threads or it is decided to move it back to the NIC level. --- src/network/net_pcap.c | 16 ++++++++-------- src/network/net_slirp.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index ba04a14ae..33ad1fe6d 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -8,7 +8,7 @@ * * Handle WinPcap library processing. * - * Version: @(#)net_pcap.c 1.0.6 2018/10/17 + * Version: @(#)net_pcap.c 1.0.7 2018/10/19 * * Author: Fred N. van Kempen, * @@ -55,7 +55,7 @@ #include "../device.h" #include "../plat.h" #include "../plat_dynld.h" -#include "../ui.h" +// #include "../ui.h" #include "network.h" @@ -187,7 +187,7 @@ poll_thread(void *arg) /* Wait for the next packet to arrive. */ data = (uint8_t *)f_pcap_next((void *)pcap, &h); if (data != NULL) { - ui_sb_update_icon(SB_NETWORK, 1); + // ui_sb_update_icon(SB_NETWORK, 1); /* Received MAC. */ mac_cmp32[0] = *(uint32_t *)(data+6); @@ -208,7 +208,7 @@ poll_thread(void *arg) /* If we did not get anything, wait a while. */ if (data == NULL) { - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); thread_wait_event(evt, 10); } @@ -324,7 +324,7 @@ net_pcap_close(void) { void *pc; - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); if (pcap == NULL) return; @@ -381,7 +381,7 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac) char filter_exp[255]; struct bpf_program fp; - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); /* Open a PCAP live channel. */ if ((pcap = f_pcap_open_live(network_host, /* interface name */ @@ -431,7 +431,7 @@ net_pcap_in(uint8_t *bufp, int len) { if (pcap == NULL) return; - ui_sb_update_icon(SB_NETWORK, 1); + // ui_sb_update_icon(SB_NETWORK, 1); network_busy(1); @@ -439,5 +439,5 @@ net_pcap_in(uint8_t *bufp, int len) network_busy(0); - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); } diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index bd7781726..2b275c782 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -8,7 +8,7 @@ * * Handle SLiRP library processing. * - * Version: @(#)net_slirp.c 1.0.5 2018/10/17 + * Version: @(#)net_slirp.c 1.0.6 2018/10/19 * * Author: Fred N. van Kempen, * @@ -56,7 +56,7 @@ #include "../86box.h" #include "../device.h" #include "../plat.h" -#include "../ui.h" +// #include "../ui.h" #include "network.h" @@ -150,7 +150,7 @@ poll_thread(void *arg) if (QueuePeek(slirpq) != 0) { /* Grab a packet from the queue. */ - ui_sb_update_icon(SB_NETWORK, 1); + // ui_sb_update_icon(SB_NETWORK, 1); qp = QueueDelete(slirpq); slirp_log("SLiRP: inQ:%d got a %dbyte packet @%08lx\n", @@ -176,7 +176,7 @@ poll_thread(void *arg) /* If we did not get anything, wait a while. */ if (!data_valid) { - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); thread_wait_event(evt, 10); } @@ -218,7 +218,7 @@ net_slirp_init(void) int net_slirp_reset(const netcard_t *card, uint8_t *mac) { - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); /* Save the callback info. */ poll_card = card; @@ -237,7 +237,7 @@ net_slirp_close(void) { queueADT sl; - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); if (slirpq == NULL) return; @@ -273,7 +273,7 @@ net_slirp_in(uint8_t *pkt, int pkt_len) { if (slirpq == NULL) return; - ui_sb_update_icon(SB_NETWORK, 1); + // ui_sb_update_icon(SB_NETWORK, 1); network_busy(1); @@ -281,7 +281,7 @@ net_slirp_in(uint8_t *pkt, int pkt_len) network_busy(0); - ui_sb_update_icon(SB_NETWORK, 0); + // ui_sb_update_icon(SB_NETWORK, 0); }