Skip to content
Browse files

fix: netmatch required inversion of proto filters

  • Loading branch information...
1 parent cd3c605 commit a7b835699099573fbb76ab6bfda3a34972a89316 @rixed rixed committed Jul 27, 2012
Showing with 5 additions and 6 deletions.
  1. +1 −1 guile/junkie/netmatch/netmatch.scm
  2. +4 −5 guile/junkie/netmatch/nettrack.scm
View
2 guile/junkie/netmatch/netmatch.scm
@@ -532,7 +532,7 @@
(slog log-debug "Compiling netmatch function ~s" expr)
(let* ((name (type:gensymC "netmatch_fun"))
(preamble (function-preamble name public))
- (proto-deconstruction (deconstruct-protos protos))
+ (proto-deconstruction (deconstruct-protos (reverse protos)))
(function-body (with-expected-type otype
(lambda ()
(expr->stub expr)))))
View
9 guile/junkie/netmatch/nettrack.scm
@@ -132,11 +132,10 @@
[('on 'full-parse)
(set! per-packet #t)]
[('match protos expr)
- (let ((protos (reverse protos)))
- (set! match-func (netmatch:function->stub type:bool protos expr #f))
- ; Would fail if no protos are given, since we use this to register a callback
- (if (not (null? protos))
- (set! proto-code (car protos))))]
+ (set! match-func (netmatch:function->stub type:bool protos expr #f))
+ ; Would fail if no protos are given, since we use this to register a callback
+ (if (not (null? protos))
+ (set! proto-code (car protos)))]
[('older n)
(set! min-age n)]
[('src-index-on protos expr)

0 comments on commit a7b8356

Please sign in to comment.
Something went wrong with that request. Please try again.