Browse code

forward.h: logging: convert LOG to LM_*

Ovidiu Sas authored on 03/10/2014 20:53:49
Showing 1 changed files
... ...
@@ -171,7 +171,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
171 171
 		else if (likely(dst->id))
172 172
 			con = tcpconn_get(dst->id, 0, 0, 0, 0);
173 173
 		else {
174
-			LM_CRIT("BUG: msg_send called with null_id & to\n");
174
+			LM_CRIT("null_id & to\n");
175 175
 			goto error;
176 176
 		}
177 177
 
... ...
@@ -198,14 +198,14 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
198 198
 			new_dst=*dst;
199 199
 			new_dst.send_sock=get_send_socket(0, &dst->to, dst->proto);
200 200
 			if (unlikely(new_dst.send_sock==0)){
201
-				LOG(L_ERR, "msg_send: ERROR: no sending socket found\n");
201
+				LM_ERR("no sending socket found\n");
202 202
 				goto error;
203 203
 			}
204 204
 			dst=&new_dst;
205 205
 		}
206 206
 		if (unlikely(udp_send(dst, outb.s, outb.len)==-1)){
207 207
 			STATS_TX_DROPS;
208
-			LOG(L_ERR, "msg_send: ERROR: udp_send failed\n");
208
+			LM_ERR("udp_send failed\n");
209 209
 			goto error;
210 210
 		}
211 211
 	}
... ...
@@ -213,8 +213,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
213 213
 	else if (dst->proto==PROTO_TCP){
214 214
 		if (unlikely(tcp_disable)){
215 215
 			STATS_TX_DROPS;
216
-			LOG(L_WARN, "msg_send: WARNING: attempt to send on tcp and tcp"
217
-					" support is disabled\n");
216
+			LM_WARN("attempt to send on tcp and tcp support is disabled\n");
218 217
 			goto error;
219 218
 		}else{
220 219
 			if (unlikely((dst->send_flags.f & SND_F_FORCE_SOCKET) &&
... ...
@@ -225,7 +224,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
225 225
 			}
226 226
 			if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
227 227
 				STATS_TX_DROPS;
228
-				LOG(L_ERR, "msg_send: ERROR: tcp_send failed\n");
228
+				LM_ERR("tcp_send failed\n");
229 229
 				goto error;
230 230
 			}
231 231
 		}
... ...
@@ -234,8 +233,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
234 234
 	else if (dst->proto==PROTO_TLS){
235 235
 		if (unlikely(tls_disable)){
236 236
 			STATS_TX_DROPS;
237
-			LOG(L_WARN, "msg_send: WARNING: attempt to send on tls and tls"
238
-					" support is disabled\n");
237
+			LM_WARN("attempt to send on tls and tls support is disabled\n");
239 238
 			goto error;
240 239
 		}else{
241 240
 			if (unlikely((dst->send_flags.f & SND_F_FORCE_SOCKET) &&
... ...
@@ -246,7 +244,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
246 246
 			}
247 247
 			if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
248 248
 				STATS_TX_DROPS;
249
-				LOG(L_ERR, "msg_send: ERROR: tcp_send failed\n");
249
+				LM_ERR("tcp_send failed\n");
250 250
 				goto error;
251 251
 			}
252 252
 		}
... ...
@@ -257,29 +255,28 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
257 257
 	else if (dst->proto==PROTO_SCTP){
258 258
 		if (unlikely(sctp_disable)){
259 259
 			STATS_TX_DROPS;
260
-			LOG(L_WARN, "msg_send: WARNING: attempt to send on sctp and sctp"
261
-					" support is disabled\n");
260
+			LM_WARN("attempt to send on sctp and sctp support is disabled\n");
262 261
 			goto error;
263 262
 		}else{
264 263
 			if (unlikely(dst->send_sock==0)){
265 264
 				new_dst=*dst;
266 265
 				new_dst.send_sock=get_send_socket(0, &dst->to, dst->proto);
267 266
 				if (unlikely(new_dst.send_sock==0)){
268
-					LOG(L_ERR, "msg_send: ERROR: no sending SCTP socket found\n");
267
+					LM_ERR("no sending SCTP socket found\n");
269 268
 					goto error;
270 269
 				}
271 270
 				dst=&new_dst;
272 271
 			}
273 272
 			if (unlikely(sctp_core_msg_send(dst, outb.s, outb.len)<0)){
274 273
 				STATS_TX_DROPS;
275
-				LOG(L_ERR, "msg_send: ERROR: sctp_msg_send failed\n");
274
+				LM_ERR("sctp_msg_send failed\n");
276 275
 				goto error;
277 276
 			}
278 277
 		}
279 278
 	}
280 279
 #endif /* USE_SCTP */
281 280
 	else{
282
-			LOG(L_CRIT, "BUG: msg_send: unknown proto %d\n", dst->proto);
281
+			LM_CRIT("unknown proto %d\n", dst->proto);
283 282
 			goto error;
284 283
 	}
285 284
 	ret = 0;