Browse code

log_custom: check return code for udp send

(cherry picked from commit 5f91017c0393faa02201ccc3693fee6381ea691a)
(cherry picked from commit 0b9755011687685467e2d53cb4dcb0c58ea28688)

Daniel-Constantin Mierla authored on 18/06/2018 07:22:10
Showing 1 changed files
... ...
@@ -193,5 +193,7 @@ void _lc_core_log_udp(int lpriority, const char *format, ...)
193 193
 	n += snprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, "(%d) ", my_pid());
194 194
 	n += vsnprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, format, arglist);
195 195
 	va_end(arglist);
196
-	udp_send(&_lc_udp_dst, obuf, n);
196
+	if(udp_send(&_lc_udp_dst, obuf, n)!=0) {
197
+		LM_DBG("udp send returned non zero\n");
198
+	}
197 199
 }