- # now store it
- if (@nout && $nout[0] eq $call) {
- $misses++;
- lru_put($call, \@nout);
- dbg("got exact prefix: $nout[0]") if isdbg('prefix');
- push @out, @nout;
- next;
- }
+ # try a straight get for an exact callsign
+ @nout = get($ecall);
+ }
+
+ # now store the exact prefix if it has been found
+ if (@nout && $nout[0] eq $ecall) {
+ $misses++;
+ $nout[0] = $call;
+ lru_put("=$call", \@nout);
+ dbg("got exact prefix: $nout[0]") if isdbg('prefix');
+ push @out, @nout;
+ next;
+ }
+
+ # now try a non-exact call/prefix
+ if ((@nout = get($call)) && $nout[0] eq $call) {
+ $misses++;
+ lru_put($call, \@nout);
+ dbg("got exact prefix: $nout[0]") if isdbg('prefix');
+ push @out, @nout;
+ next;