Skip to content

Commit

Permalink
Fix how we print global messages in rlm_icmp
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 12, 2024
1 parent 8933edf commit 10298be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/rlm_icmp/rlm_icmp.c
Expand Up @@ -23,8 +23,6 @@
*/
RCSID("$Id$")

#define LOG_PREFIX mctx->mi->name

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/util/cap.h>
Expand Down Expand Up @@ -346,7 +344,7 @@ static void mod_icmp_read(UNUSED fr_event_list_t *el, UNUSED int sockfd, UNUSED
my_echo.counter = icmp->counter;
echo = fr_rb_find(t->tree, &my_echo);
if (!echo) {
DEBUG("Can't find packet counter=%d in tree", icmp->counter);
DEBUG("%s - Can't find packet counter=%d in tree", mctx->mi->name, icmp->counter);
return;
}

Expand All @@ -365,7 +363,7 @@ static void mod_icmp_error(fr_event_list_t *el, UNUSED int sockfd, UNUSED int fl
module_ctx_t const *mctx = talloc_get_type_abort(uctx, module_ctx_t);
rlm_icmp_thread_t *t = talloc_get_type_abort(mctx->thread, rlm_icmp_thread_t);

ERROR("Failed reading from ICMP socket - Closing it");
ERROR("%s - Failed reading from ICMP socket - Closing it", mctx->mi->name);

(void) fr_event_fd_delete(el, t->fd, FR_EVENT_FILTER_IO);
close(t->fd);
Expand Down

0 comments on commit 10298be

Please sign in to comment.