From: Arran Cudbard-Bell Date: Fri, 28 Apr 2017 16:51:50 +0000 (-0400) Subject: s/REDEBUG/RPEDEBUG/ (where appropriate) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c756065bbbd1fa17f94718888b6c5f4bbd20fcab;p=thirdparty%2Ffreeradius-server.git s/REDEBUG/RPEDEBUG/ (where appropriate) --- diff --git a/src/main/cond_eval.c b/src/main/cond_eval.c index f50d473eedb..b67572feaaf 100644 --- a/src/main/cond_eval.c +++ b/src/main/cond_eval.c @@ -211,7 +211,7 @@ static int cond_do_regex(REQUEST *request, fr_cond_t const *c, case -1: EVAL_DEBUG("REGEX ERROR"); - REDEBUG("regex failed: %s", fr_strerror()); + RPEDEBUG("regex failed"); break; default: diff --git a/src/main/map.c b/src/main/map.c index 21fe62b7f17..5a4e3fdf4f3 100644 --- a/src/main/map.c +++ b/src/main/map.c @@ -888,7 +888,7 @@ int map_to_vp(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, vp_map_t cons if (value_box_cast(n, &n->data, map->lhs->tmpl_da->type, map->lhs->tmpl_da, &vp->data) < 0) { - REDEBUG("Attribute conversion failed: %s", fr_strerror()); + RPEDEBUG("Attribute conversion failed"); fr_pair_list_free(&found); fr_pair_list_free(&n); return -1; @@ -933,7 +933,7 @@ int map_to_vp(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, vp_map_t cons } else { if (value_box_cast(n, &n->data, n->vp_type, n->da, &map->rhs->tmpl_value_box) < 0) { - REDEBUG("Implicit cast failed: %s", fr_strerror()); + RPEDEBUG("Implicit cast failed"); rcode = -1; goto error; } diff --git a/src/main/tls/ocsp.c b/src/main/tls/ocsp.c index ee40e84e4be..7a836d9d637 100644 --- a/src/main/tls/ocsp.c +++ b/src/main/tls/ocsp.c @@ -541,7 +541,7 @@ int tls_ocsp_check(REQUEST *request, SSL *ssl, */ if (now.tv_sec == 0) gettimeofday(&now, NULL); if (tls_utils_asn1time_to_epoch(&next, next_update) < 0) { - REDEBUG("Failed parsing next_update time: %s", fr_strerror()); + RPEDEBUG("Failed parsing next_update time"); ocsp_status = OCSP_STATUS_SKIPPED; goto finish; } diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index d8e466cde31..564531e266e 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -301,7 +301,7 @@ static unlang_action_t unlang_load_balance(REQUEST *request, unlang_stack_t *sta num, active_callers, lowest_active_callers); continue; } - + count++; RDEBUG3("load-balance found %d children with %" PRIu64 " active", count, active_callers); @@ -1348,7 +1348,7 @@ void unlang_push_section(REQUEST *request, CONF_SECTION *cs, rlm_rcode_t action) if (cs) { instruction = (unlang_t *)cf_data_find(cs, unlang_group_t, NULL); if (!instruction) { - REDEBUG("Failed to find pre-compiled unlang for section %s %s { ... }", + RPEDEBUG("Failed to find pre-compiled unlang for section %s %s { ... }", cf_section_name1(cs), cf_section_name2(cs)); } } @@ -1562,7 +1562,7 @@ int unlang_event_timeout_add(REQUEST *request, fr_unlang_timeout_callback_t call ev->ctx = ctx; if (fr_event_timer_insert(request->el, unlang_event_timeout_handler, ev, when, &(ev->ev)) < 0) { - REDEBUG("Failed inserting event: %s", fr_strerror()); + RPEDEBUG("Failed inserting event"); talloc_free(ev); return -1; } diff --git a/src/modules/proto_dhcp/proto_dhcp.c b/src/modules/proto_dhcp/proto_dhcp.c index 5266af5e214..3049ac21ecc 100644 --- a/src/modules/proto_dhcp/proto_dhcp.c +++ b/src/modules/proto_dhcp/proto_dhcp.c @@ -222,7 +222,7 @@ static int dhcprelay_process_server_reply(REQUEST *request) } else { vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 264, TAG_ANY); /* DHCP-Your-IP-Address */ if (!vp) { - REDEBUG("Failed to find IP Address for request"); + RPEDEBUG("Failed to find IP Address for request"); return -1; } @@ -244,7 +244,7 @@ static int dhcprelay_process_server_reply(REQUEST *request) return 1; } if (fr_dhcp_add_arp_entry(request->packet->sockfd, sock->src_interface, hwvp, vp) < 0) { - REDEBUG("Failed adding ARP entry: %s", fr_strerror()); + REDEBUG("Failed adding ARP entry"); return -1; } } @@ -386,7 +386,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request) */ vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 256, TAG_ANY); /* DHCP-Opcode */ if (!vp) { - REDEBUG("Someone deleted the DHCP-Opcode!"); + RPEDEBUG("Someone deleted the DHCP-Opcode!"); return RLM_MODULE_FAIL; } @@ -507,7 +507,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request) if (fr_ipaddr_from_ifindex(&primary, request->packet->sockfd, request->packet->dst_ipaddr.af, request->packet->if_index) < 0) { - REDEBUG("Failed determining src_ipaddr from if_index: %s", fr_strerror()); + RPEDEBUG("Failed determining src_ipaddr from if_index"); return RLM_MODULE_FAIL; } request->reply->src_ipaddr.ipaddr.ip4addr.s_addr = primary.ipaddr.ip4addr.s_addr; @@ -641,7 +641,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request) if (!hwvp) return RLM_MODULE_FAIL; if (fr_dhcp_add_arp_entry(request->reply->sockfd, sock->src_interface, hwvp, vp) < 0) { - REDEBUG("Failed adding arp entry: %s", fr_strerror()); + RPEDEBUG("Failed adding arp entry"); return RLM_MODULE_FAIL; } } diff --git a/src/modules/proto_dhcp/rlm_dhcp.c b/src/modules/proto_dhcp/rlm_dhcp.c index 72be01343ae..d98ace59bec 100644 --- a/src/modules/proto_dhcp/rlm_dhcp.c +++ b/src/modules/proto_dhcp/rlm_dhcp.c @@ -69,7 +69,7 @@ static ssize_t dhcp_options_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outl } if (src->type != TMPL_TYPE_ATTR) { - REDEBUG("dhcp_options cannot operate on a %s", fr_int2str(tmpl_names, src->type, "")); + RPEDEBUG("dhcp_options cannot operate on a %s", fr_int2str(tmpl_names, src->type, "")); goto error; } @@ -142,7 +142,7 @@ static ssize_t dhcp_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, len = fr_dhcp_encode_option(binbuf, sizeof(binbuf), &cursor, NULL); talloc_free(vp); if (len <= 0) { - REDEBUG("DHCP option encoding failed: %s", fr_strerror()); + RPEDEBUG("DHCP option encoding failed"); return -1; } diff --git a/src/modules/proto_vmps/proto_vmps.c b/src/modules/proto_vmps/proto_vmps.c index 478d7693456..2114595cc00 100644 --- a/src/modules/proto_vmps/proto_vmps.c +++ b/src/modules/proto_vmps/proto_vmps.c @@ -70,7 +70,7 @@ static void vmps_running(REQUEST *request, fr_state_action_t action) unlang = cf_subsection_find_name2(request->server_cs, "recv", dv->name); if (!unlang) unlang = cf_subsection_find_name2(request->server_cs, "recv", "*"); if (!unlang) { - REDEBUG("Failed to find 'recv' section"); + RPEDEBUG("Failed to find 'recv' section"); goto done; } diff --git a/src/modules/rlm_attr_filter/rlm_attr_filter.c b/src/modules/rlm_attr_filter/rlm_attr_filter.c index 8bf77a4b170..d9d43632d71 100644 --- a/src/modules/rlm_attr_filter/rlm_attr_filter.c +++ b/src/modules/rlm_attr_filter/rlm_attr_filter.c @@ -59,7 +59,7 @@ static void check_pair(REQUEST *request, VALUE_PAIR *check_item, VALUE_PAIR *rep compare = fr_pair_cmp(check_item, reply_item); if (compare < 0) { - REDEBUG("Comparison failed: %s", fr_strerror()); + RPEDEBUG("Comparison failed"); } if (compare == 1) { diff --git a/src/modules/rlm_json/rlm_json.c b/src/modules/rlm_json/rlm_json.c index d1f0ae217d6..86886d54ebf 100644 --- a/src/modules/rlm_json/rlm_json.c +++ b/src/modules/rlm_json/rlm_json.c @@ -215,7 +215,7 @@ static int _json_map_proc_get_value(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST * ret = fr_jpath_evaluate_leaf(request, &head, map->lhs->tmpl_da->type, map->lhs->tmpl_da, to_eval->root, to_eval->jpath); if (ret < 0) { - REDEBUG("Failed evaluating jpath: %s", fr_strerror()); + RPEDEBUG("Failed evaluating jpath"); return -1; } if (ret == 0) return 0; @@ -233,7 +233,7 @@ static int _json_map_proc_get_value(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST * vp->op = map->op; if (value_box_steal(vp, &vp->data, value) < 0) { - REDEBUG("Copying data to attribute failed: %s", fr_strerror()); + RPEDEBUG("Copying data to attribute failed"); talloc_free(vp); goto error; } diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index de4d1728e3a..bef6834c5e2 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -691,7 +691,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void RWDEBUG("* YOU ARE PREVENTING THE SERVER FROM WORKING"); RWDEBUG("*********************************************"); - REDEBUG("Attribute \"User-Password\" is required for authentication"); + RPEDEBUG("Attribute \"User-Password\" is required for authentication"); return RLM_MODULE_INVALID; } @@ -713,7 +713,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void if (tmpl_expand(&sasl.mech, sasl_mech_buff, sizeof(sasl_mech_buff), request, inst->user_sasl.mech, fr_ldap_escape_func, inst) < 0) { - REDEBUG("Failed expanding user.sasl.mech: %s", fr_strerror()); + RPEDEBUG("Failed expanding user.sasl.mech"); rcode = RLM_MODULE_FAIL; goto finish; } @@ -721,7 +721,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void if (inst->user_sasl.proxy) { if (tmpl_expand(&sasl.proxy, sasl_proxy_buff, sizeof(sasl_proxy_buff), request, inst->user_sasl.proxy, fr_ldap_escape_func, inst) < 0) { - REDEBUG("Failed expanding user.sasl.proxy: %s", fr_strerror()); + RPEDEBUG("Failed expanding user.sasl.proxy"); rcode = RLM_MODULE_FAIL; goto finish; } @@ -730,7 +730,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void if (inst->user_sasl.realm) { if (tmpl_expand(&sasl.realm, sasl_realm_buff, sizeof(sasl_realm_buff), request, inst->user_sasl.realm, fr_ldap_escape_func, inst) < 0) { - REDEBUG("Failed expanding user.sasl.realm: %s", fr_strerror()); + RPEDEBUG("Failed expanding user.sasl.realm"); rcode = RLM_MODULE_FAIL; goto finish; } diff --git a/src/modules/rlm_radius_client/rlm_radius_client.c b/src/modules/rlm_radius_client/rlm_radius_client.c index 97c12b0f571..4d9e55c370f 100644 --- a/src/modules/rlm_radius_client/rlm_radius_client.c +++ b/src/modules/rlm_radius_client/rlm_radius_client.c @@ -572,13 +572,13 @@ static rlm_rcode_t CC_HINT(nonnull) mod_process(void *instance, void *thread, RE if (!fr_packet_list_id_alloc(conn->pl, IPPROTO_UDP, &ccr->packet, NULL)) { if (mod_fd_add(request->el, conn, inst) < 0) { talloc_free(ccr); - REDEBUG("Failed adding more sockets"); + RPEDEBUG("Failed adding more sockets"); return RLM_MODULE_FAIL; } if (!fr_packet_list_id_alloc(conn->pl, IPPROTO_UDP, &ccr->packet, NULL)) { talloc_free(ccr); - REDEBUG("Failed allocating ID: %s", fr_strerror()); + RPEDEBUG("Failed allocating ID"); return RLM_MODULE_FAIL; } } diff --git a/src/modules/rlm_redis/redis.c b/src/modules/rlm_redis/redis.c index 7e0b81af2b6..37c7ff525a1 100644 --- a/src/modules/rlm_redis/redis.c +++ b/src/modules/rlm_redis/redis.c @@ -322,7 +322,7 @@ int fr_redis_reply_to_map(TALLOC_CTX *ctx, vp_map_t **out, REQUEST *request, /* Logs own errors */ if (fr_redis_reply_to_value_box(map, &vpt, value, map->lhs->tmpl_da->type, map->lhs->tmpl_da) < 0) { - REDEBUG("Failed converting Redis data: %s", fr_strerror()); + RPEDEBUG("Failed converting Redis data"); goto error; } diff --git a/src/modules/rlm_redis/rlm_redis.c b/src/modules/rlm_redis/rlm_redis.c index ab670e539ea..b8c9a6570bb 100644 --- a/src/modules/rlm_redis/rlm_redis.c +++ b/src/modules/rlm_redis/rlm_redis.c @@ -189,14 +189,14 @@ static ssize_t redis_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, } if (fr_inet_pton_port(&node_addr.ipaddr, &node_addr.port, p, q - p, AF_UNSPEC, true, true) < 0) { - REDEBUG("Failed parsing node address: %s", fr_strerror()); + RPEDEBUG("Failed parsing node address"); return -1; } p = q + 1; if (fr_redis_cluster_pool_by_node_addr(&pool, inst->cluster, &node_addr, true) < 0) { - REDEBUG("Failed locating cluster node: %s", fr_strerror()); + RPEDEBUG("Failed locating cluster node"); return -1; } diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c index 037df75e604..7772a9c1baf 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c @@ -647,7 +647,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, REQU if (value_box_cast(NULL, &ip_map.rhs->tmpl_value_box, PW_TYPE_IPV4_ADDR, NULL, &tmp)) { - REDEBUG("Failed converting integer to IPv4 address: %s", fr_strerror()); + RPEDEBUG("Failed converting integer to IPv4 address"); ret = IPPOOL_RCODE_FAIL; goto finish; } diff --git a/src/modules/rlm_replicate/rlm_replicate.c b/src/modules/rlm_replicate/rlm_replicate.c index 55f5529d3ac..f5775d2c26e 100644 --- a/src/modules/rlm_replicate/rlm_replicate.c +++ b/src/modules/rlm_replicate/rlm_replicate.c @@ -184,7 +184,7 @@ static rlm_rcode_t replicate_packet(UNUSED void const *instance, REQUEST *reques packet->id = fr_rand() & 0xff; packet->sockfd = fr_socket(&home->src_ipaddr, 0); if (packet->sockfd < 0) { - REDEBUG("Failed opening socket: %s", fr_strerror()); + RPEDEBUG("Failed opening socket"); rcode = RLM_MODULE_FAIL; goto done; } @@ -214,7 +214,7 @@ static rlm_rcode_t replicate_packet(UNUSED void const *instance, REQUEST *reques */ RDEBUG("Replicating %s list to Realm \"%s\"", fr_int2str(pair_lists, list, ""), realm->name); if (fr_radius_send(packet, NULL, home->secret) < 0) { - REDEBUG("Failed replicating packet: %s", fr_strerror()); + RPEDEBUG("Failed replicating packet"); rcode = RLM_MODULE_FAIL; goto done; } diff --git a/src/modules/rlm_sql/sql.c b/src/modules/rlm_sql/sql.c index 369a789a4dc..6e21c3bdc11 100644 --- a/src/modules/rlm_sql/sql.c +++ b/src/modules/rlm_sql/sql.c @@ -189,20 +189,20 @@ int sql_fr_pair_list_afrom_str(TALLOC_CTX *ctx, REQUEST *request, VALUE_PAIR **h */ vp = fr_pair_make(ctx, NULL, row[2], NULL, op); if (!vp) { - REDEBUG("Failed to create the pair: %s", fr_strerror()); + RPEDEBUG("Failed to create the pair"); return -1; } if (do_xlat) { if (fr_pair_mark_xlat(vp, value) < 0) { - REDEBUG("Error marking pair for xlat: %s", fr_strerror()); + RPEDEBUG("Error marking pair for xlat"); talloc_free(vp); return -1; } } else { if (fr_pair_value_from_str(vp, value, -1) < 0) { - REDEBUG("Error parsing value: %s", fr_strerror()); + RPEDEBUG("Error parsing value"); talloc_free(vp); return -1;