Skip to content

Commit

Permalink
s/REDEBUG/RPEDEBUG/ (where appropriate)
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 28, 2017
1 parent ece5ebf commit c756065
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/main/cond_eval.c
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/main/map.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/tls/ocsp.c
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/unlang_interpret.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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));
}
}
Expand Down Expand Up @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions src/modules/proto_dhcp/proto_dhcp.c
Expand Up @@ -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;
}

Expand All @@ -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;
}
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/proto_dhcp/rlm_dhcp.c
Expand Up @@ -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, "<INVALID>"));
RPEDEBUG("dhcp_options cannot operate on a %s", fr_int2str(tmpl_names, src->type, "<INVALID>"));
goto error;
}

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/proto_vmps/proto_vmps.c
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_attr_filter/rlm_attr_filter.c
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/rlm_json/rlm_json.c
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/modules/rlm_ldap/rlm_ldap.c
Expand Up @@ -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;
}
Expand All @@ -713,15 +713,15 @@ 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;
}

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;
}
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/rlm_radius_client/rlm_radius_client.c
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_redis/redis.c
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/modules/rlm_redis/rlm_redis.c
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_redis_ippool/rlm_redis_ippool.c
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/rlm_replicate/rlm_replicate.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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, "<INVALID>"), 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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/modules/rlm_sql/sql.c
Expand Up @@ -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;
Expand Down

0 comments on commit c756065

Please sign in to comment.