aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/LAN_PCap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/qt_sdl/LAN_PCap.cpp')
-rw-r--r--src/frontend/qt_sdl/LAN_PCap.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/frontend/qt_sdl/LAN_PCap.cpp b/src/frontend/qt_sdl/LAN_PCap.cpp
index 57223eb..86c218f 100644
--- a/src/frontend/qt_sdl/LAN_PCap.cpp
+++ b/src/frontend/qt_sdl/LAN_PCap.cpp
@@ -114,6 +114,12 @@ bool TryLoadPCap(void* lib)
bool Init(bool open_adapter)
{
+ PCapAdapter = NULL;
+ PacketLen = 0;
+ RXNum = 0;
+
+ NumAdapters = 0;
+
// TODO: how to deal with cases where an adapter is unplugged or changes config??
if (!PCapLib)
{
@@ -142,12 +148,6 @@ bool Init(bool open_adapter)
}
}
- PCapAdapter = NULL;
- PacketLen = 0;
- RXNum = 0;
-
- NumAdapters = 0;
-
char errbuf[PCAP_ERRBUF_SIZE];
int ret;