This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
state.Ctx.LogD("sp-process", sdsp, "queueing")
nice, exists := state.infosOurSeen[*freq.Hash]
if exists {
- state.Lock()
- insertIdx := 0
- var freqWithNice *FreqWithNice
- for insertIdx, freqWithNice = range state.queueTheir {
- if freqWithNice.nice > nice {
- break
+ if state.onlyPkts == nil || !state.onlyPkts[*freq.Hash] {
+ state.Lock()
+ insertIdx := 0
+ var freqWithNice *FreqWithNice
+ for insertIdx, freqWithNice = range state.queueTheir {
+ if freqWithNice.nice > nice {
+ break
+ }
}
+ state.queueTheir = append(state.queueTheir, nil)
+ copy(state.queueTheir[insertIdx+1:], state.queueTheir[insertIdx:])
+ state.queueTheir[insertIdx] = &FreqWithNice{&freq, nice}
+ state.Unlock()
+ } else {
+ state.Ctx.LogD("sp-process", sdsp, "skipping")
}
- state.queueTheir = append(state.queueTheir, nil)
- copy(state.queueTheir[insertIdx+1:], state.queueTheir[insertIdx:])
- state.queueTheir[insertIdx] = &FreqWithNice{&freq, nice}
- state.Unlock()
} else {
state.Ctx.LogD("sp-process", sdsp, "unknown")
}