From 0b9755011687685467e2d53cb4dcb0c58ea28688 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Mon, 18 Jun 2018 09:22:10 +0200 Subject: [PATCH] log_custom: check return code for udp send (cherry picked from commit 5f91017c0393faa02201ccc3693fee6381ea691a) --- src/modules/log_custom/log_custom_mod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/log_custom/log_custom_mod.c b/src/modules/log_custom/log_custom_mod.c index f88a783b7cb..e635baf75e8 100644 --- a/src/modules/log_custom/log_custom_mod.c +++ b/src/modules/log_custom/log_custom_mod.c @@ -148,7 +148,9 @@ void _lc_core_log_udp(int lpriority, const char *format, ...) n += snprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, "(%d) ", my_pid()); n += vsnprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, format, arglist); va_end(arglist); - udp_send(&_lc_udp_dst, obuf, n); + if(udp_send(&_lc_udp_dst, obuf, n)!=0) { + LM_DBG("udp send returned non zero\n"); + } } int ki_log_udp(sip_msg_t *msg, str *txt)