Browse code

core: use corelog level for debug messages when sending out fails

- allow better control of what is printed, FS#68

Daniel-Constantin Mierla authored on 23/12/2014 09:25:58
Showing 1 changed files
... ...
@@ -205,7 +205,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
205 205
 		}
206 206
 		if (unlikely(udp_send(dst, outb.s, outb.len)==-1)){
207 207
 			STATS_TX_DROPS;
208
-			LM_ERR("udp_send failed\n");
208
+			LOG(cfg_get(core, core_cfg, corelog), "udp_send failed\n");
209 209
 			goto error;
210 210
 		}
211 211
 	}
... ...
@@ -224,7 +224,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
224 224
 			}
225 225
 			if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
226 226
 				STATS_TX_DROPS;
227
-				LM_ERR("tcp_send failed\n");
227
+				LOG(cfg_get(core, core_cfg, corelog), "tcp_send failed\n");
228 228
 				goto error;
229 229
 			}
230 230
 		}
... ...
@@ -244,7 +244,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
244 244
 			}
245 245
 			if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
246 246
 				STATS_TX_DROPS;
247
-				LM_ERR("tcp_send failed\n");
247
+				LOG(cfg_get(core, core_cfg, corelog), "tcp_send failed\n");
248 248
 				goto error;
249 249
 			}
250 250
 		}
... ...
@@ -269,7 +269,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
269 269
 			}
270 270
 			if (unlikely(sctp_core_msg_send(dst, outb.s, outb.len)<0)){
271 271
 				STATS_TX_DROPS;
272
-				LM_ERR("sctp_msg_send failed\n");
272
+				LOG(cfg_get(core, core_cfg, corelog), "sctp_msg_send failed\n");
273 273
 				goto error;
274 274
 			}
275 275
 		}