From: Arran Cudbard-Bell Date: Tue, 7 Feb 2023 20:56:36 +0000 (-0600) Subject: < 30 instances of "???" vs > 200 instances of "" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d60f7d867cdde8364f8543f7b6f71380af5e44a;p=thirdparty%2Ffreeradius-server.git < 30 instances of "???" vs > 200 instances of "" --- diff --git a/src/lib/server/process.h b/src/lib/server/process.h index a471a316dc4..92645f1e4ec 100644 --- a/src/lib/server/process.h +++ b/src/lib/server/process.h @@ -356,7 +356,7 @@ RESUME(send_generic) if (cs) { RDEBUG("The 'send %s' section returned %s - not sending a response", cf_section_name2(cs), - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); } request->reply->code = PROCESS_CODE_DO_NOT_RESPOND; break; diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index a82e34be1d2..04c1bc4e3cc 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -1364,7 +1364,7 @@ static unlang_t *compile_update_to_edit(unlang_t *parent, unlang_compile_t *unla if (name2) { snprintf(list_buffer, sizeof(list_buffer), "&%s", name2); } else { - snprintf(list_buffer, sizeof(list_buffer), "&%s", fr_table_str_by_value(pair_list_table, unlang_ctx->rules->attr.list_def, "???")); + snprintf(list_buffer, sizeof(list_buffer), "&%s", fr_table_str_by_value(pair_list_table, unlang_ctx->rules->attr.list_def, "")); } /* @@ -2318,7 +2318,7 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs, subci = cf_reference_item(cs, cf_root(cf_section_to_item(action_cs)), value); if (!subci) { - cf_log_err(csi, "Unknown reference '%s'", value ? value : "???"); + cf_log_err(csi, "Unknown reference '%s'", value ? value : ""); return false; } @@ -2356,13 +2356,13 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs, if (module_retry) { cf_log_err(csi, "Cannot use a '%s = retry' action for a module which has its own retries", - fr_table_str_by_value(mod_rcode_table, i, "???")); + fr_table_str_by_value(mod_rcode_table, i, "")); return false; } if (disallow_retry_action) { cf_log_err(csi, "max_rtx_count and max_rtx_duration cannot both be zero when using '%s = retry'", - fr_table_str_by_value(mod_rcode_table, i, "???")); + fr_table_str_by_value(mod_rcode_table, i, "")); return false; } @@ -2370,7 +2370,7 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs, !actions->retry.mrc && !fr_time_delta_ispos(actions->retry.mrd)) { cf_log_err(csi, "Cannot use a '%s = retry' action without a 'retry { ... }' section.", - fr_table_str_by_value(mod_rcode_table, i, "???")); + fr_table_str_by_value(mod_rcode_table, i, "")); return false; } } diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 02df98f3142..96d2a6e969d 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -1367,7 +1367,7 @@ static xlat_action_t unlang_interpret_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, * All of the remaining things need a CONF_ITEM. */ if (!instruction->ci) { - if (fr_value_box_bstrndup(ctx, vb, NULL, "???", 3, false) < 0) goto error; + if (fr_value_box_bstrndup(ctx, vb, NULL, "", 3, false) < 0) goto error; goto finish; } diff --git a/src/lib/util/machine.c b/src/lib/util/machine.c index e939d752825..7b34edde5b1 100644 --- a/src/lib/util/machine.c +++ b/src/lib/util/machine.c @@ -484,14 +484,14 @@ char const *fr_machine_state_name(fr_machine_t *m, int state) { fr_assert(!m->dead); - if ((state < 0) || (state > m->def->max_state)) return "???"; + if ((state < 0) || (state > m->def->max_state)) return ""; if (!state) { if (m->current) { state = m->current->def->number; } else { - return "???"; + return ""; } } diff --git a/src/lib/util/token.c b/src/lib/util/token.c index fe8cfa3fce3..ab85b4724a8 100644 --- a/src/lib/util/token.c +++ b/src/lib/util/token.c @@ -487,7 +487,7 @@ fr_token_t getstring(char const **ptr, char *buf, int buflen, bool unescape) char const *fr_token_name(int token) { - return fr_table_str_by_value(fr_tokens_table, token, "???"); + return fr_table_str_by_value(fr_tokens_table, token, ""); } diff --git a/src/modules/rlm_sql/sql.c b/src/modules/rlm_sql/sql.c index eabfc650bba..c9029e852dd 100644 --- a/src/modules/rlm_sql/sql.c +++ b/src/modules/rlm_sql/sql.c @@ -158,7 +158,7 @@ static int sql_pair_afrom_row(TALLOC_CTX *ctx, request_t *request, fr_pair_list_ return -1; } - RDEBUG3("Found row: %s %s %s", row[0], fr_table_str_by_value(fr_tokens_table, op, "???"), row[3]); + RDEBUG3("Found row: %s %s %s", row[0], fr_table_str_by_value(fr_tokens_table, op, ""), row[3]); value = row[3]; diff --git a/src/process/radius/base.c b/src/process/radius/base.c index 3b2b7648132..16a7c369655 100644 --- a/src/process/radius/base.c +++ b/src/process/radius/base.c @@ -401,7 +401,7 @@ RESUME(access_request) */ if (request->reply->code == FR_RADIUS_CODE_ACCESS_REJECT) { RDEBUG("The 'recv Access-Request' section returned %s - rejecting the request", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); send_reply: UPDATE_STATE(reply); @@ -412,7 +412,7 @@ RESUME(access_request) if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) { RDEBUG("The 'recv Access-Request' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); goto send_reply; } @@ -440,7 +440,7 @@ RESUME(access_request) vp = fr_pair_find_by_da(&request->control_pairs, NULL, attr_auth_type); if (!vp) { RDEBUG("No 'Auth-Type' attribute found, cannot authenticate the user - rejecting the request", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); reject: request->reply->code = FR_RADIUS_CODE_ACCESS_REJECT; @@ -450,7 +450,7 @@ RESUME(access_request) dv = fr_dict_enum_by_value(vp->da, &vp->data); if (!dv) { RDEBUG("Invalid value for 'Auth-Type' attribute, cannot authenticate the user - rejecting the request", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); goto reject; } @@ -515,7 +515,7 @@ RESUME(auth_type) UPDATE_STATE(reply); RDEBUG("The 'authenticate' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); fr_assert(state->send != NULL); return state->send(p_result, mctx, request); @@ -685,7 +685,7 @@ RESUME(acct_type) UPDATE_STATE(reply); RDEBUG("The 'accounting' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); fr_assert(state->send != NULL); return state->send(p_result, mctx, request); @@ -719,7 +719,7 @@ RESUME(accounting_request) if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) { RDEBUG("The 'recv Accounting-Request' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); send_reply: fr_assert(state->send != NULL); diff --git a/src/process/tacacs/base.c b/src/process/tacacs/base.c index ebc570e5a11..8b7c19fa0d1 100644 --- a/src/process/tacacs/base.c +++ b/src/process/tacacs/base.c @@ -440,7 +440,7 @@ RESUME(auth_start) */ if (request->reply->code == FR_TACACS_CODE_AUTH_REPLY_FAIL) { RDEBUG("The 'recv Authentication-Start' section returned %s - rejecting the request", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); send_reply: UPDATE_STATE(reply); @@ -476,7 +476,7 @@ RESUME(auth_start) if (!vp) vp = fr_pair_find_by_da(&request->request_pairs, NULL, attr_tacacs_authentication_type); if (!vp) { RDEBUG("No 'Auth-Type' attribute found, cannot authenticate the user - rejecting the request", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); reject: request->reply->code = FR_TACACS_CODE_AUTH_REPLY_FAIL; @@ -486,7 +486,7 @@ RESUME(auth_start) dv = fr_dict_enum_by_value(vp->da, &vp->data); if (!dv) { RDEBUG("Invalid value for '%s' attribute, cannot authenticate the user - rejecting the request", - vp->da->name, fr_table_str_by_value(rcode_table, rcode, "???")); + vp->da->name, fr_table_str_by_value(rcode_table, rcode, "")); goto reject; } @@ -719,7 +719,7 @@ RESUME(acct_type) UPDATE_STATE(reply); RDEBUG("The 'accounting' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); fr_assert(state->send != NULL); return state->send(p_result, mctx, request); diff --git a/src/process/ttls/base.c b/src/process/ttls/base.c index 20cc9688e71..cf823ee3883 100644 --- a/src/process/ttls/base.c +++ b/src/process/ttls/base.c @@ -379,7 +379,7 @@ RESUME(access_request) if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) { RDEBUG("The 'recv Access-Request' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); send_reply: fr_assert(state->send != NULL); @@ -452,7 +452,7 @@ RESUME(auth_type) UPDATE_STATE(reply); RDEBUG("The 'authenticate' section returned %s - not sending a response", - fr_table_str_by_value(rcode_table, rcode, "???")); + fr_table_str_by_value(rcode_table, rcode, "")); fr_assert(state->send != NULL); return state->send(p_result, mctx, request); diff --git a/src/protocols/dns/decode.c b/src/protocols/dns/decode.c index 53389a8cc5c..b33b93a6340 100644 --- a/src/protocols/dns/decode.c +++ b/src/protocols/dns/decode.c @@ -436,7 +436,7 @@ static ssize_t decode_proto(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const if (!fr_dns_packet_ok(data, data_len, false, &reason)) { fail: fr_strerror_printf("DNS packet malformed - %s", - fr_table_str_by_value(reason_fail_table, reason, "???")); + fr_table_str_by_value(reason_fail_table, reason, "")); return -1; } }