summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-11-19 22:15:28 +0100
committerPatrick McHardy <kaber@trash.net>2010-11-19 22:15:28 +0100
commit1a280c1a11e34c4290921670a8dac52275821200 (patch)
tree77d942334b909a135abec6a6903002a91b3133e9
parent022a7208868b886395d6ff48ec887b774d1f8849 (diff)
dectmon: don't lock to foreign FPs when not in scanning mode
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 1139df1..5da488b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,6 +26,7 @@
LIST_HEAD(dect_handles);
static unsigned int locked;
+static bool scan;
static FILE *logfile;
@@ -69,6 +70,9 @@ static void dect_mac_me_info_ind(struct dect_handle *dh,
{
struct dect_handle_priv *priv = dect_handle_priv(dh);
+ if (!scan)
+ return;
+
if (pari != NULL) {
if (dect_handle_lookup(pari) == NULL) {
dect_llme_mac_me_info_res(dh, pari);
@@ -222,7 +226,6 @@ int main(int argc, char **argv)
unsigned int ncluster = 0, i;
struct dect_handle *dh;
struct dect_fd *dfd;
- bool scan = false;
int optidx = 0, c;
for (;;) {