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.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Handle WinPcap library processing.
|
* 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, <decwiz@yahoo.com>
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
#include "../device.h"
|
#include "../device.h"
|
||||||
#include "../plat.h"
|
#include "../plat.h"
|
||||||
#include "../plat_dynld.h"
|
#include "../plat_dynld.h"
|
||||||
#include "../ui.h"
|
// #include "../ui.h"
|
||||||
#include "network.h"
|
#include "network.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ poll_thread(void *arg)
|
|||||||
/* Wait for the next packet to arrive. */
|
/* Wait for the next packet to arrive. */
|
||||||
data = (uint8_t *)f_pcap_next((void *)pcap, &h);
|
data = (uint8_t *)f_pcap_next((void *)pcap, &h);
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
ui_sb_update_icon(SB_NETWORK, 1);
|
// ui_sb_update_icon(SB_NETWORK, 1);
|
||||||
|
|
||||||
/* Received MAC. */
|
/* Received MAC. */
|
||||||
mac_cmp32[0] = *(uint32_t *)(data+6);
|
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 we did not get anything, wait a while. */
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
thread_wait_event(evt, 10);
|
thread_wait_event(evt, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ net_pcap_close(void)
|
|||||||
{
|
{
|
||||||
void *pc;
|
void *pc;
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
|
|
||||||
if (pcap == NULL) return;
|
if (pcap == NULL) return;
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac)
|
|||||||
char filter_exp[255];
|
char filter_exp[255];
|
||||||
struct bpf_program fp;
|
struct bpf_program fp;
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
|
|
||||||
/* Open a PCAP live channel. */
|
/* Open a PCAP live channel. */
|
||||||
if ((pcap = f_pcap_open_live(network_host, /* interface name */
|
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;
|
if (pcap == NULL) return;
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 1);
|
// ui_sb_update_icon(SB_NETWORK, 1);
|
||||||
|
|
||||||
network_busy(1);
|
network_busy(1);
|
||||||
|
|
||||||
@@ -439,5 +439,5 @@ net_pcap_in(uint8_t *bufp, int len)
|
|||||||
|
|
||||||
network_busy(0);
|
network_busy(0);
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Handle SLiRP library processing.
|
* 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, <decwiz@yahoo.com>
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
#include "../86box.h"
|
#include "../86box.h"
|
||||||
#include "../device.h"
|
#include "../device.h"
|
||||||
#include "../plat.h"
|
#include "../plat.h"
|
||||||
#include "../ui.h"
|
// #include "../ui.h"
|
||||||
#include "network.h"
|
#include "network.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ poll_thread(void *arg)
|
|||||||
|
|
||||||
if (QueuePeek(slirpq) != 0) {
|
if (QueuePeek(slirpq) != 0) {
|
||||||
/* Grab a packet from the queue. */
|
/* Grab a packet from the queue. */
|
||||||
ui_sb_update_icon(SB_NETWORK, 1);
|
// ui_sb_update_icon(SB_NETWORK, 1);
|
||||||
|
|
||||||
qp = QueueDelete(slirpq);
|
qp = QueueDelete(slirpq);
|
||||||
slirp_log("SLiRP: inQ:%d got a %dbyte packet @%08lx\n",
|
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 we did not get anything, wait a while. */
|
||||||
if (!data_valid) {
|
if (!data_valid) {
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
thread_wait_event(evt, 10);
|
thread_wait_event(evt, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ net_slirp_init(void)
|
|||||||
int
|
int
|
||||||
net_slirp_reset(const netcard_t *card, uint8_t *mac)
|
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. */
|
/* Save the callback info. */
|
||||||
poll_card = card;
|
poll_card = card;
|
||||||
@@ -237,7 +237,7 @@ net_slirp_close(void)
|
|||||||
{
|
{
|
||||||
queueADT sl;
|
queueADT sl;
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
|
|
||||||
if (slirpq == NULL) return;
|
if (slirpq == NULL) return;
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ net_slirp_in(uint8_t *pkt, int pkt_len)
|
|||||||
{
|
{
|
||||||
if (slirpq == NULL) return;
|
if (slirpq == NULL) return;
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 1);
|
// ui_sb_update_icon(SB_NETWORK, 1);
|
||||||
|
|
||||||
network_busy(1);
|
network_busy(1);
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ net_slirp_in(uint8_t *pkt, int pkt_len)
|
|||||||
|
|
||||||
network_busy(0);
|
network_busy(0);
|
||||||
|
|
||||||
ui_sb_update_icon(SB_NETWORK, 0);
|
// ui_sb_update_icon(SB_NETWORK, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user