when doing a pair copy, ignore operators =~ > >= < <=.
authoraland <aland>
Wed, 24 Nov 1999 18:17:39 +0000 (18:17 +0000)
committeraland <aland>
Wed, 24 Nov 1999 18:17:39 +0000 (18:17 +0000)
Hmm... this is really a hack, because the main/valuepair.c
paircmp() function doesn't smash the operator to '=' once it's
finished with the comparison.

Should it smash?  I think so... rlm_files makes a copy of the
check item list before passing it to paircmp(), so it can be
smashed.

src/lib/valuepair.c

index a99be03..8ce73ef 100644 (file)
@@ -310,13 +310,19 @@ void pairmove(VALUE_PAIR **to, VALUE_PAIR **from)
 
                        default:
                          DEBUG("Unknown operator for attribute %s: "
-                               "using '='", i->name);
+                               "using '='\n", i->name);
 
                          /*
                           *  If a similar attribute is found,
                           *  ignore the new one.  Otherwise,
                           *  add the new one to the list.
                           */
+                       case T_OP_REG_EQ:       /* =~ */
+                       case T_OP_GT:           /* > */
+                       case T_OP_GE:           /* >= */
+                       case T_OP_LT:           /* < */
+                       case T_OP_LE:           /* <= */
+                       case T_OP_NE:           /* != */
                        case T_OP_EQ:           /* = */
                                if (found) {
                                        tailfrom = i;