xpp: pri_termtype: match complete SPAN patterns
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Tue, 9 Aug 2011 13:11:20 +0000 (13:11 +0000)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Tue, 9 Aug 2011 13:11:20 +0000 (13:11 +0000)
Match complete span patterns, to avoid pattern 'SPAN/1' from matching
e.g. span 12 (SPAN/12).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10101 17933a7a-c749-41c5-a318-cba88f637d49

xpp/perl_modules/Dahdi/Span.pm

index 4e63af4..cf38c80 100644 (file)
@@ -368,7 +368,7 @@ SPEC:
                #print STDERR "match: $match\n";
                foreach my $pattern (@patlist) {
                        #print STDERR "testmatch: $pattern =~ $match\n";
-                       if($pattern =~ $match) {
+                       if($pattern =~ /^$match$/) {
                                #print STDERR "MATCH '$pattern' ~ '$match' termtype=$termtype\n";
                                $match_termtype = $termtype;
                                last SPEC;