Use <INVALID> instead of ¿unknown? to be consistent with the rest of the server
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Jul 2013 13:57:17 +0000 (14:57 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Jul 2013 13:57:48 +0000 (14:57 +0100)
src/main/conffile.c
src/main/map.c
src/main/util.c
src/main/valuepair.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_ldap/attrmap.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_replicate/rlm_replicate.c

index 81ecbc5..57410e6 100644 (file)
@@ -1846,8 +1846,8 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp,
                        continue;
 
                default:
-                       ERROR("%s[%d]: Parse error after \"%s\": unknown token",
-                              filename, *lineno, buf1);
+                       ERROR("%s[%d]: Parse error after \"%s\": unexpected token \"%s\"",
+                             filename, *lineno, buf1, fr_int2str(fr_tokens, t2, "<INVALID>"));
                        return -1;
                }
        }
index 1dfd84c..99e6bcf 100644 (file)
@@ -416,8 +416,7 @@ value_pair_map_t *radius_cp2map(TALLOC_CTX *ctx, CONF_PAIR *cp,
                        default:
                                cf_log_err(ci, "Operator \"%s\" not allowed "
                                           "for list copy",
-                                          fr_int2str(fr_tokens, map->op,
-                                                     "?unknown?"));
+                                          fr_int2str(fr_tokens, map->op, "<INVALID>"));
                                goto error;
                        }
                break;
index f29261c..421a9c9 100644 (file)
@@ -1013,8 +1013,8 @@ int radius_request(REQUEST **context, request_refs_t name)
                case REQUEST_PARENT:    /* for future use in request chaining */
                case REQUEST_OUTER:
                        if (!request->parent) {
-                               RWDEBUG("Specified request \"%s\" is not available in this context",
-                                      fr_int2str(request_refs, name, "¿unknown?"));
+                               REDEBUG("Specified request \"%s\" is not available in this context",
+                                       fr_int2str(request_refs, name, "<INVALID>"));
                                return -1;
                        }
                        
index a8a634d..1aacb48 100644 (file)
@@ -1076,7 +1076,7 @@ int radius_map2request(REQUEST *request, value_pair_map_t const *map,
                }
 
 
-               RDEBUG("\t\t%s %s %s", map->dst->name, fr_int2str(fr_tokens, vp->op, "?unknown?"), value);
+               RDEBUG("\t\t%s %s %s", map->dst->name, fr_int2str(fr_tokens, vp->op, "<INVALID>"), value);
                
                if (value != buffer) talloc_free(value);
        }
index f54a252..e4f95ca 100644 (file)
@@ -345,8 +345,8 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
                 *      it contains a da.
                 */
                RDEBUG4(":: dst is \"%s\" src is \"%s\"",
-                       fr_int2str(vpt_types, map->dst->type, "¿unknown?"),
-                       fr_int2str(vpt_types, map->src->type, "¿unknown?"));
+                       fr_int2str(vpt_types, map->dst->type, "<INVALID>"),
+                       fr_int2str(vpt_types, map->src->type, "<INVALID>"));
                        
                switch (map->src->type) {
                case VPT_TYPE_ATTR:
@@ -371,7 +371,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
                        }
                        
                        RDEBUG("\t%s %s %s", map->dst->name,
-                              fr_int2str(fr_tokens, map->op, "¿unknown?"),
+                              fr_int2str(fr_tokens, map->op, "<INVALID>"),
                               map->src->name);
                        
                        switch (map->op) {
@@ -442,7 +442,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
                                     i != NULL;
                                     i = pairnext(&cursor)) {
                                        RDEBUG("\t%s %s %s (%s)", map->dst->name,
-                                              fr_int2str(fr_tokens, map->op, "¿unknown?"),
+                                              fr_int2str(fr_tokens, map->op, "<INVALID>"),
                                               map->src->name, i->da->name);
                                        i->op = map->op;
                                }
@@ -466,7 +466,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
                        }
 
                        RDEBUG("\t%s %s \"%s\"", map->dst->name,
-                              fr_int2str(fr_tokens, map->op, "¿unknown?"),
+                              fr_int2str(fr_tokens, map->op, "<INVALID>"),
                               buffer);
 
                        vp = pairalloc(NULL, map->dst->da);
@@ -491,7 +491,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request,
                 */
                case VPT_TYPE_LITERAL:
                        RDEBUG("\t%s %s '%s'", map->dst->name,
-                              fr_int2str(fr_tokens, map->op, "¿unknown?"),
+                              fr_int2str(fr_tokens, map->op, "<INVALID>"),
                               map->src->name);
                        
                        vp = pairalloc(NULL, map->dst->da);
@@ -584,9 +584,9 @@ static int cache_verify(rlm_cache_t *inst, value_pair_map_t **head)
                                cf_log_err(map->ci, "Operator \"%s\" not "
                                           "allowed for %s values",
                                           fr_int2str(fr_tokens, map->op,
-                                                     "¿unknown?"),
+                                                     "<INVALID>"),
                                           fr_int2str(vpt_types, map->src->type,
-                                                     "¿unknown?"));
+                                                     "<INVALID>"));
                                return -1;
                        }
                default:
index 2a94494..b4a2b23 100644 (file)
@@ -136,8 +136,8 @@ int rlm_ldap_map_verify(ldap_instance_t *inst, value_pair_map_t **head)
                
                        default:
                                cf_log_err(map->ci, "Operator \"%s\" not allowed for %s values",
-                                          fr_int2str(fr_tokens, map->op, "¿unknown?"),
-                                          fr_int2str(vpt_types, map->src->type, "¿unknown?"));
+                                          fr_int2str(fr_tokens, map->op, "<INVALID>"),
+                                          fr_int2str(vpt_types, map->src->type, "<INVALID>"));
                                return -1;
                        }
                default:
index 10eed00..73d2a2f 100644 (file)
@@ -1175,7 +1175,7 @@ static rlm_rcode_t user_modify(ldap_instance_t *inst, REQUEST *request, ldap_acc
 #endif
                default:
                        REDEBUG("Operator '%s' is not supported for LDAP modify operations",
-                               fr_int2str(fr_tokens, op, "¿unknown?"));
+                               fr_int2str(fr_tokens, op, "<INVALID>"));
                               
                        goto error;
                }
index 2a983b2..1f21e4a 100644 (file)
@@ -137,7 +137,7 @@ static int replicate_packet(UNUSED void *instance, REQUEST *request,
                        if (!vps) {
                                RWDEBUG("List '%s' doesn't exist for "
                                       "this packet", fr_int2str(pair_lists,
-                                      list, "?unknown?"));
+                                      list, "<INVALID>"));
                                rcode = RLM_MODULE_INVALID;
                                goto done;
                        }
@@ -196,7 +196,7 @@ static int replicate_packet(UNUSED void *instance, REQUEST *request,
                 *      Encode, sign and then send the packet.
                 */
                RDEBUG("Replicating list '%s' to Realm '%s'",
-                      fr_int2str(pair_lists, list, "¿unknown?"),realm->name);
+                      fr_int2str(pair_lists, list, "<INVALID>"),realm->name);
                if (rad_send(packet, NULL, home->secret) < 0) {
                        REDEBUG("Failed replicating packet: %s",
                               fr_strerror());