Fixed bug in pairlist_read, in reporting syntax errors on
authorcparker <cparker>
Tue, 23 Apr 2002 15:41:32 +0000 (15:41 +0000)
committercparker <cparker>
Tue, 23 Apr 2002 15:41:32 +0000 (15:41 +0000)
previous line.  Code was not checking for T_INVALID token
correctly.

src/main/files.c

index 123fc85..04529b8 100644 (file)
@@ -265,7 +265,8 @@ parse_again:
                                 *      Parse the reply values
                                 */
                                parsecode = userparse(buffer, &reply_tmp);
-                               if (parsecode < 0) {
+                               /* valid tokens are 1 or greater */
+                               if (parsecode < 1) {
                                        pairlist_free(&pl);
                                        radlog(L_ERR|L_CONS,
                                                        "%s[%d]: Parse error (reply) for entry %s: %s",