Browse code

io_wait.h: logging: convert LOG to LM_*

Ovidiu Sas authored on 03/10/2014 19:58:31
Showing 1 changed files
... ...
@@ -255,8 +255,7 @@ static inline int kq_ev_change(io_wait_h* h, int fd, int filter, int flag,
255 255
 
256 256
 	if (h->kq_nchanges>=h->kq_changes_size){
257 257
 		/* changes array full ! */
258
-		LOG(L_WARN, "WARNING: kq_ev_change: kqueue changes array full"
259
-					" trying to flush...\n");
258
+		LM_WARN("kqueue changes array full trying to flush...\n");
260 259
 		tspec.tv_sec=0;
261 260
 		tspec.tv_nsec=0;
262 261
 again:
... ...
@@ -338,13 +337,13 @@ inline static int io_watch_add(	io_wait_h* h,
338 337
 	do{ \
339 338
 			flags=fcntl(fd, F_GETFL); \
340 339
 			if (flags==-1){ \
341
-				LOG(L_ERR, "ERROR: io_watch_add: fnctl: GETFL failed:" \
342
-						" %s [%d]\n", strerror(errno), errno); \
340
+				LM_ERR("fnctl: GETFL failed: %s [%d]\n", \
341
+					strerror(errno), errno); \
343 342
 				goto error; \
344 343
 			} \
345 344
 			if (fcntl(fd, F_SETFL, flags|(f))==-1){ \
346
-				LOG(L_ERR, "ERROR: io_watch_add: fnctl: SETFL" \
347
-							" failed: %s [%d]\n", strerror(errno), errno); \
345
+				LM_ERR("fnctl: SETFL failed: %s [%d]\n", \
346
+					strerror(errno), errno); \
348 347
 				goto error; \
349 348
 			} \
350 349
 	}while(0)
... ...
@@ -373,17 +372,16 @@ inline static int io_watch_add(	io_wait_h* h,
373 372
 	e=0;
374 373
 	/* sanity checks */
375 374
 	if (unlikely(fd==-1)){
376
-		LOG(L_CRIT, "BUG: io_watch_add: fd is -1!\n");
375
+		LM_CRIT("fd is -1!\n");
377 376
 		goto error;
378 377
 	}
379 378
 	if (unlikely((events&(POLLIN|POLLOUT))==0)){
380
-		LOG(L_CRIT, "BUG: io_watch_add: invalid events: 0x%0x\n", events);
379
+		LM_CRIT("invalid events: 0x%0x\n", events);
381 380
 		goto error;
382 381
 	}
383 382
 	/* check if not too big */
384 383
 	if (unlikely(h->fd_no>=h->max_fd_no)){
385
-		LOG(L_CRIT, "ERROR: io_watch_add: maximum fd number exceeded:"
386
-				" %d/%d\n", h->fd_no, h->max_fd_no);
384
+		LM_CRIT("maximum fd number exceeded: %d/%d\n", h->fd_no, h->max_fd_no);
387 385
 		goto error;
388 386
 	}
389 387
 	DBG("DBG: io_watch_add(%p, %d, %d, %p), fd_no=%d\n",
... ...
@@ -391,15 +389,15 @@ inline static int io_watch_add(	io_wait_h* h,
391 389
 	/*  hash sanity check */
392 390
 	e=get_fd_map(h, fd);
393 391
 	if (unlikely(e && (e->type!=0 /*F_NONE*/))){
394
-		LOG(L_ERR, "ERROR: io_watch_add: trying to overwrite entry %d"
395
-				" watched for %x in the hash(%d, %d, %p) with (%d, %d, %p)\n",
396
-				fd, events, e->fd, e->type, e->data, fd, type, data);
392
+		LM_ERR("trying to overwrite entry %d"
393
+			" watched for %x in the hash(%d, %d, %p) with (%d, %d, %p)\n",
394
+			fd, events, e->fd, e->type, e->data, fd, type, data);
397 395
 		e=0;
398 396
 		goto error;
399 397
 	}
400 398
 	
401 399
 	if (unlikely((e=hash_fd_map(h, fd, events, type, data))==0)){
402
-		LOG(L_ERR, "ERROR: io_watch_add: failed to hash the fd %d\n", fd);
400
+		LM_ERR("failed to hash the fd %d\n", fd);
403 401
 		goto error;
404 402
 	}
405 403
 	switch(h->poll_method){ /* faster then pointer to functions */
... ...
@@ -430,13 +428,13 @@ inline static int io_watch_add(	io_wait_h* h,
430 428
 			 */
431 429
 			/* set async & signal */
432 430
 			if (fcntl(fd, F_SETOWN, my_pid())==-1){
433
-				LOG(L_ERR, "ERROR: io_watch_add: fnctl: SETOWN"
434
-				" failed: %s [%d]\n", strerror(errno), errno);
431
+				LM_ERR("fnctl: SETOWN failed: %s [%d]\n",
432
+					strerror(errno), errno);
435 433
 				goto error;
436 434
 			}
437 435
 			if (fcntl(fd, F_SETSIG, h->signo)==-1){
438
-				LOG(L_ERR, "ERROR: io_watch_add: fnctl: SETSIG"
439
-					" failed: %s [%d]\n", strerror(errno), errno);
436
+				LM_ERR("fnctl: SETSIG failed: %s [%d]\n",
437
+					strerror(errno), errno);
440 438
 				goto error;
441 439
 			}
442 440
 			/* set both non-blocking and async */
... ...
@@ -470,8 +468,7 @@ again1:
470 468
 			n=epoll_ctl(h->epfd, EPOLL_CTL_ADD, fd, &ep_event);
471 469
 			if (unlikely(n==-1)){
472 470
 				if (errno==EAGAIN) goto again1;
473
-				LOG(L_ERR, "ERROR: io_watch_add: epoll_ctl failed: %s [%d]\n",
474
-					strerror(errno), errno);
471
+				LM_ERR("epoll_ctl failed: %s [%d]\n", strerror(errno), errno);
475 472
 				goto error;
476 473
 			}
477 474
 			break;
... ...
@@ -491,8 +488,7 @@ again2:
491 488
 			n=epoll_ctl(h->epfd, EPOLL_CTL_ADD, fd, &ep_event);
492 489
 			if (unlikely(n==-1)){
493 490
 				if (errno==EAGAIN) goto again2;
494
-				LOG(L_ERR, "ERROR: io_watch_add: epoll_ctl failed: %s [%d]\n",
495
-					strerror(errno), errno);
491
+				LM_ERR("epoll_ctl failed: %s [%d]\n", strerror(errno), errno);
496 492
 				goto error;
497 493
 			}
498 494
 			break;
... ...
@@ -522,17 +518,16 @@ again2:
522 518
 again_devpoll:
523 519
 			if (write(h->dpoll_fd, &pfd, sizeof(pfd))==-1){
524 520
 				if (errno==EAGAIN) goto again_devpoll;
525
-				LOG(L_ERR, "ERROR: io_watch_add: /dev/poll write failed:"
526
-							"%s [%d]\n", strerror(errno), errno);
521
+				LM_ERR("/dev/poll write failed: %s [%d]\n",
522
+					strerror(errno), errno);
527 523
 				goto error;
528 524
 			}
529 525
 			break;
530 526
 #endif
531 527
 			
532 528
 		default:
533
-			LOG(L_CRIT, "BUG: io_watch_add: no support for poll method "
534
-					" %s (%d)\n", poll_method_str[h->poll_method],
535
-					h->poll_method);
529
+			LM_CRIT("no support for poll method  %s (%d)\n",
530
+				poll_method_str[h->poll_method], h->poll_method);
536 531
 			goto error;
537 532
 	}
538 533
 	
... ...
@@ -550,8 +545,7 @@ check_io_again:
550 545
 				(pf.revents & (e->events|POLLERR|POLLHUP)));
551 546
 		if (unlikely(e->type && (n==-1))){
552 547
 			if (errno==EINTR) goto check_io_again;
553
-			LOG(L_ERR, "ERROR: io_watch_add: check_io poll: %s [%d]\n",
554
-						strerror(errno), errno);
548
+			LM_ERR("check_io poll: %s [%d]\n", strerror(errno), errno);
555 549
 		}
556 550
 	}
557 551
 #endif
... ...
@@ -609,8 +603,7 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx, int flags)
609 603
 #endif
610 604
 	
611 605
 	if (unlikely((fd<0) || (fd>=h->max_fd_no))){
612
-		LOG(L_CRIT, "BUG: io_watch_del: invalid fd %d, not in [0, %d) \n",
613
-						fd, h->fd_no);
606
+		LM_CRIT("invalid fd %d, not in [0, %d) \n", fd, h->fd_no);
614 607
 		goto error;
615 608
 	}
616 609
 	DBG("DBG: io_watch_del (%p, %d, %d, 0x%x) fd_no=%d called\n",
... ...
@@ -618,14 +611,13 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx, int flags)
618 611
 	e=get_fd_map(h, fd);
619 612
 	/* more sanity checks */
620 613
 	if (unlikely(e==0)){
621
-		LOG(L_CRIT, "BUG: io_watch_del: no corresponding hash entry for %d\n",
622
-					fd);
614
+		LM_CRIT("no corresponding hash entry for %d\n", fd);
623 615
 		goto error;
624 616
 	}
625 617
 	if (unlikely(e->type==0 /*F_NONE*/)){
626
-		LOG(L_ERR, "ERROR: io_watch_del: trying to delete already erased"
627
-				" entry %d in the hash(%d, %d, %p) flags %x)\n",
628
-				fd, e->fd, e->type, e->data, flags);
618
+		LM_ERR("trying to delete already erased"
619
+			" entry %d in the hash(%d, %d, %p) flags %x)\n",
620
+			fd, e->fd, e->type, e->data, flags);
629 621
 		goto error;
630 622
 	}
631 623
 	events=e->events;
... ...
@@ -658,13 +650,13 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx, int flags)
658 650
 				/* reset ASYNC */
659 651
 				fd_flags=fcntl(fd, F_GETFL);
660 652
 				if (unlikely(fd_flags==-1)){
661
-					LOG(L_ERR, "ERROR: io_watch_del: fnctl: GETFL failed:"
662
-							" %s [%d]\n", strerror(errno), errno);
653
+					LM_ERR("fnctl: GETFL failed: %s [%d]\n",
654
+						strerror(errno), errno);
663 655
 					goto error;
664 656
 				}
665 657
 				if (unlikely(fcntl(fd, F_SETFL, fd_flags&(~O_ASYNC))==-1)){
666
-					LOG(L_ERR, "ERROR: io_watch_del: fnctl: SETFL"
667
-								" failed: %s [%d]\n", strerror(errno), errno);
658
+					LM_ERR("fnctl: SETFL failed: %s [%d]\n",
659
+						strerror(errno), errno);
668 660
 					goto error;
669 661
 				}
670 662
 			fix_fd_array; /* only on success */
... ...
@@ -685,8 +677,8 @@ again_epoll:
685 677
 				n=epoll_ctl(h->epfd, EPOLL_CTL_DEL, fd, &ep_event);
686 678
 				if (unlikely(n==-1)){
687 679
 					if (errno==EAGAIN) goto again_epoll;
688
-					LOG(L_ERR, "ERROR: io_watch_del: removing fd from epoll "
689
-							"list failed: %s [%d]\n", strerror(errno), errno);
680
+					LM_ERR("removing fd from epoll list failed: %s [%d]\n",
681
+						strerror(errno), errno);
690 682
 					goto error;
691 683
 				}
692 684
 #ifdef EPOLL_NO_CLOSE_BUG
... ...
@@ -725,17 +717,15 @@ again_epoll:
725 717
 again_devpoll:
726 718
 				if (write(h->dpoll_fd, &pfd, sizeof(pfd))==-1){
727 719
 					if (errno==EINTR) goto again_devpoll;
728
-					LOG(L_ERR, "ERROR: io_watch_del: removing fd from "
729
-								"/dev/poll failed: %s [%d]\n",
730
-								strerror(errno), errno);
720
+					LM_ERR("removing fd from /dev/poll failed: %s [%d]\n",
721
+						strerror(errno), errno);
731 722
 					goto error;
732 723
 				}
733 724
 				break;
734 725
 #endif
735 726
 		default:
736
-			LOG(L_CRIT, "BUG: io_watch_del: no support for poll method "
737
-					" %s (%d)\n", poll_method_str[h->poll_method],
738
-					h->poll_method);
727
+			LM_CRIT("no support for poll method  %s (%d)\n",
728
+				poll_method_str[h->poll_method], h->poll_method);
739 729
 			goto error;
740 730
 	}
741 731
 	unhash_fd_map(e); /* only on success */
... ...
@@ -784,12 +774,11 @@ inline static int io_watch_chg(io_wait_h* h, int fd, short events, int idx )
784 774
 #endif
785 775
 	
786 776
 	if (unlikely((fd<0) || (fd>=h->max_fd_no))){
787
-		LOG(L_CRIT, "BUG: io_watch_chg: invalid fd %d, not in [0, %d) \n",
788
-						fd, h->fd_no);
777
+		LM_CRIT("invalid fd %d, not in [0, %d) \n", fd, h->fd_no);
789 778
 		goto error;
790 779
 	}
791 780
 	if (unlikely((events&(POLLIN|POLLOUT))==0)){
792
-		LOG(L_CRIT, "BUG: io_watch_chg: invalid events: 0x%0x\n", events);
781
+		LM_CRIT("invalid events: 0x%0x\n", events);
793 782
 		goto error;
794 783
 	}
795 784
 	DBG("DBG: io_watch_chg (%p, %d, 0x%x, 0x%x) fd_no=%d called\n",
... ...
@@ -797,14 +786,13 @@ inline static int io_watch_chg(io_wait_h* h, int fd, short events, int idx )
797 786
 	e=get_fd_map(h, fd);
798 787
 	/* more sanity checks */
799 788
 	if (unlikely(e==0)){
800
-		LOG(L_CRIT, "BUG: io_watch_chg: no corresponding hash entry for %d\n",
801
-					fd);
789
+		LM_CRIT("no corresponding hash entry for %d\n", fd);
802 790
 		goto error;
803 791
 	}
804 792
 	if (unlikely(e->type==0 /*F_NONE*/)){
805
-		LOG(L_ERR, "ERROR: io_watch_chg: trying to change an already erased"
806
-				" entry %d in the hash(%d, %d, %p) )\n",
807
-				fd, e->fd, e->type, e->data);
793
+		LM_ERR("trying to change an already erased"
794
+			" entry %d in the hash(%d, %d, %p) )\n",
795
+			fd, e->fd, e->type, e->data);
808 796
 		goto error;
809 797
 	}
810 798
 	
... ...
@@ -856,8 +844,8 @@ again_epoll_lt:
856 844
 				n=epoll_ctl(h->epfd, EPOLL_CTL_MOD, fd, &ep_event);
857 845
 				if (unlikely(n==-1)){
858 846
 					if (errno==EAGAIN) goto again_epoll_lt;
859
-					LOG(L_ERR, "ERROR: io_watch_chg: modifying epoll events"
860
-							" failed: %s [%d]\n", strerror(errno), errno);
847
+					LM_ERR("modifying epoll events failed: %s [%d]\n",
848
+						strerror(errno), errno);
861 849
 					goto error;
862 850
 				}
863 851
 			break;
... ...
@@ -876,8 +864,8 @@ again_epoll_et:
876 864
 				n=epoll_ctl(h->epfd, EPOLL_CTL_MOD, fd, &ep_event);
877 865
 				if (unlikely(n==-1)){
878 866
 					if (errno==EAGAIN) goto again_epoll_et;
879
-					LOG(L_ERR, "ERROR: io_watch_chg: modifying epoll events"
880
-							" failed: %s [%d]\n", strerror(errno), errno);
867
+					LM_ERR("modifying epoll events failed: %s [%d]\n",
868
+						strerror(errno), errno);
881 869
 					goto error;
882 870
 				}
883 871
 			break;
... ...
@@ -912,8 +900,7 @@ again_epoll_et:
912 900
 again_devpoll1:
913 901
 				if (unlikely(write(h->dpoll_fd, &pfd, sizeof(pfd))==-1)){
914 902
 					if (errno==EINTR) goto again_devpoll1;
915
-					LOG(L_ERR, "ERROR: io_watch_chg: removing fd from "
916
-								"/dev/poll failed: %s [%d]\n",
903
+					LM_ERR("removing fd from /dev/poll failed: %s [%d]\n",
917 904
 								strerror(errno), errno);
918 905
 					goto error;
919 906
 				}
... ...
@@ -922,8 +909,7 @@ again_devpoll2:
922 909
 				pfd.revents=0;
923 910
 				if (unlikely(write(h->dpoll_fd, &pfd, sizeof(pfd))==-1)){
924 911
 					if (errno==EINTR) goto again_devpoll2;
925
-					LOG(L_ERR, "ERROR: io_watch_chg: re-adding fd to "
926
-								"/dev/poll failed: %s [%d]\n",
912
+					LM_ERR("re-adding fd to /dev/poll failed: %s [%d]\n",
927 913
 								strerror(errno), errno);
928 914
 					/* error re-adding the fd => mark it as removed/unhash */
929 915
 					unhash_fd_map(e);
... ...
@@ -932,9 +918,8 @@ again_devpoll2:
932 918
 				break;
933 919
 #endif
934 920
 		default:
935
-			LOG(L_CRIT, "BUG: io_watch_chg: no support for poll method "
936
-					" %s (%d)\n", poll_method_str[h->poll_method],
937
-					h->poll_method);
921
+			LM_CRIT("no support for poll method %s (%d)\n",
922
+				poll_method_str[h->poll_method], h->poll_method);
938 923
 			goto error;
939 924
 	}
940 925
 	e->events=events; /* only on success */
... ...
@@ -964,8 +949,7 @@ again:
964 949
 		if (n==-1){
965 950
 			if (errno==EINTR) goto again; /* signal, ignore it */
966 951
 			else{
967
-				LOG(L_ERR, "ERROR:io_wait_loop_poll: poll: %s [%d]\n",
968
-						strerror(errno), errno);
952
+				LM_ERR("poll: %s [%d]\n", strerror(errno), errno);
969 953
 				goto error;
970 954
 			}
971 955
 		}
... ...
@@ -976,8 +960,7 @@ again:
976 960
 				/* sanity checks */
977 961
 				if (unlikely((h->fd_array[r].fd >= h->max_fd_no)||
978 962
 								(h->fd_array[r].fd < 0))){
979
-					LOG(L_CRIT, "BUG: io_wait_loop_poll: bad fd %d "
980
-							"(no in the 0 - %d range)\n",
963
+					LM_CRIT("bad fd %d (no in the 0 - %d range)\n",
981 964
 							h->fd_array[r].fd, h->max_fd_no);
982 965
 					/* try to continue anyway */
983 966
 					h->fd_array[r].events=0; /* clear the events */
... ...
@@ -1021,8 +1004,7 @@ again:
1021 1004
 		ret=n=select(h->max_fd_select+1, &sel_rset, &sel_wset, 0, &timeout);
1022 1005
 		if (n<0){
1023 1006
 			if (errno==EINTR) goto again; /* just a signal */
1024
-			LOG(L_ERR, "ERROR: io_wait_loop_select: select: %s [%d]\n",
1025
-					strerror(errno), errno);
1007
+			LM_ERR("select: %s [%d]\n", strerror(errno), errno);
1026 1008
 			n=0;
1027 1009
 			/* continue */
1028 1010
 		}
... ...
@@ -1061,8 +1043,7 @@ again:
1061 1043
 		if (unlikely(n==-1)){
1062 1044
 			if (errno==EINTR) goto again; /* signal, ignore it */
1063 1045
 			else{
1064
-				LOG(L_ERR, "ERROR:io_wait_loop_epoll: "
1065
-						"epoll_wait(%d, %p, %d, %d): %s [%d]\n",
1046
+				LM_ERR("epoll_wait(%d, %p, %d, %d): %s [%d]\n",
1066 1047
 						h->epfd, h->ep_array, h->fd_no, t*1000,
1067 1048
 						strerror(errno), errno);
1068 1049
 				goto error;
... ...
@@ -1071,8 +1052,8 @@ again:
1071 1052
 #if 0
1072 1053
 		if (n>1){
1073 1054
 			for(r=0; r<n; r++){
1074
-				LOG(L_ERR, "WARNING: ep_array[%d]= %x, %p\n",
1075
-						r, h->ep_array[r].events, h->ep_array[r].data.ptr);
1055
+				LM_ERR("ep_array[%d]= %x, %p\n",
1056
+					r, h->ep_array[r].events, h->ep_array[r].data.ptr);
1076 1057
 			}
1077 1058
 		}
1078 1059
 #endif
... ...
@@ -1091,9 +1072,8 @@ again:
1091 1072
 				while(fm->type && ((fm->events|POLLERR|POLLHUP) & revents) &&
1092 1073
 						(handle_io(fm, revents, -1)>0) && repeat);
1093 1074
 			}else{
1094
-				LOG(L_ERR, "ERROR:io_wait_loop_epoll: unexpected event %x"
1095
-							" on %d/%d, data=%p\n", h->ep_array[r].events,
1096
-							r+1, n, h->ep_array[r].data.ptr);
1075
+				LM_ERR("unexpected event %x on %d/%d, data=%p\n",
1076
+					h->ep_array[r].events, r+1, n, h->ep_array[r].data.ptr);
1097 1077
 			}
1098 1078
 		}
1099 1079
 error:
... ...
@@ -1255,8 +1235,7 @@ inline static int io_wait_loop_sigio_rt(io_wait_h* h, int t)
1255 1235
 	ts.tv_nsec=0;
1256 1236
 	if (unlikely(!sigismember(&h->sset, h->signo) ||
1257 1237
 					!sigismember(&h->sset, SIGIO))) {
1258
-		LOG(L_CRIT, "BUG: io_wait_loop_sigio_rt: the signal mask"
1259
-				" is not properly set!\n");
1238
+		LM_CRIT("the signal mask is not properly set!\n");
1260 1239
 		goto error;
1261 1240
 	}
1262 1241
 again:
... ...
@@ -1267,8 +1246,7 @@ again:
1267 1246
 			ret=0;
1268 1247
 			goto end;
1269 1248
 		}else{
1270
-			LOG(L_ERR, "ERROR: io_wait_loop_sigio_rt: sigtimed_wait"
1271
-					" %s [%d]\n", strerror(errno), errno);
1249
+			LM_ERR("sigtimed_wait %s [%d]\n", strerror(errno), errno);
1272 1250
 			goto error;
1273 1251
 		}
1274 1252
 	}
... ...
@@ -1294,8 +1272,7 @@ again:
1294 1272
 		}
1295 1273
 		if (unlikely(siginfo.si_code==SI_SIGIO)){
1296 1274
 			/* old style, we don't know the event (linux 2.2.?) */
1297
-			LOG(L_WARN, "WARNING: io_wait_loop_sigio_rt: old style sigio"
1298
-					" interface\n");
1275
+			LM_WARN("old style sigio interface\n");
1299 1276
 			fm=get_fd_map(h, sigio_fd);
1300 1277
 			/* we can have queued signals generated by fds not watched
1301 1278
 			 * any more, or by fds in transition, to a child => ignore them*/
... ...
@@ -1341,24 +1318,22 @@ again:
1341 1318
 							sigio_band, sigio_fd, fm->events, siginfo.si_code,
1342 1319
 							fm->type, fm->fd, fm->data);
1343 1320
 			}else{
1344
-				LOG(L_ERR, "ERROR: io_wait_loop_sigio_rt: unexpected event"
1345
-							" on fd %d: %x\n", sigio_fd, sigio_band);
1321
+				LM_ERR("unexpected event on fd %d: %x\n", sigio_fd, sigio_band);
1346 1322
 			}
1347 1323
 		}
1348 1324
 	}else{
1349 1325
 		/* signal queue overflow
1350 1326
 		 * TODO: increase signal queue size: 2.4x /proc/.., 2.6x -rlimits */
1351
-		LOG(L_WARN, "WARNING: io_wait_loop_sigio_rt: signal queue overflowed"
1352
-					"- falling back to poll\n");
1327
+		LM_WARN("signal queue overflowed - falling back to poll\n");
1353 1328
 		/* clear real-time signal queue
1354 1329
 		 * both SIG_IGN and SIG_DFL are needed , it doesn't work
1355 1330
 		 * only with SIG_DFL  */
1356 1331
 		if (signal(h->signo, SIG_IGN)==SIG_ERR){
1357
-			LOG(L_CRIT, "BUG: do_poll: couldn't reset signal to IGN\n");
1332
+			LM_CRIT("do_poll: couldn't reset signal to IGN\n");
1358 1333
 		}
1359 1334
 		
1360 1335
 		if (signal(h->signo, SIG_DFL)==SIG_ERR){
1361
-			LOG(L_CRIT, "BUG: do_poll: couldn't reset signal to DFL\n");
1336
+			LM_CRIT("do_poll: couldn't reset signal to DFL\n");
1362 1337
 		}
1363 1338
 		/* falling back to normal poll */
1364 1339
 		ret=io_wait_loop_poll(h, -1, 1);
... ...
@@ -1388,21 +1363,19 @@ again:
1388 1363
 		if (unlikely(n==-1)){
1389 1364
 			if (errno==EINTR) goto again; /* signal, ignore it */
1390 1365
 			else{
1391
-				LOG(L_ERR, "ERROR:io_wait_loop_devpoll: ioctl: %s [%d]\n",
1392
-						strerror(errno), errno);
1366
+				LM_ERR("ioctl: %s [%d]\n", strerror(errno), errno);
1393 1367
 				goto error;
1394 1368
 			}
1395 1369
 		}
1396 1370
 		for (r=0; r< n; r++){
1397 1371
 			if (h->fd_array[r].revents & (POLLNVAL|POLLERR)){
1398
-				LOG(L_ERR, "ERROR: io_wait_loop_devpoll: pollinval returned"
1399
-							" for fd %d, revents=%x\n",
1400
-							h->fd_array[r].fd, h->fd_array[r].revents);
1372
+				LM_ERR("pollinval returned for fd %d, revents=%x\n",
1373
+					h->fd_array[r].fd, h->fd_array[r].revents);
1401 1374
 			}
1402 1375
 			/* POLLIN|POLLHUP just go through */
1403 1376
 			fm=get_fd_map(h, h->fd_array[r].fd);
1404 1377
 			while(fm->type && (fm->events & h->fd_array[r].revents) &&
1405
-					(handle_io(fm, h->fd_array[r].revents, r) > 0) && repeat);
1378
+				(handle_io(fm, h->fd_array[r].revents, r) > 0) && repeat);
1406 1379
 		}
1407 1380
 error:
1408 1381
 	return ret;