Browse code

core: use main term for fields and in comments

Daniel-Constantin Mierla authored on 02/11/2020 11:37:18
Showing 6 changed files
... ...
@@ -264,8 +264,8 @@ static void destroy_devpoll(io_wait_h* h)
264 264
 #ifdef HAVE_SELECT
265 265
 static int init_select(io_wait_h* h)
266 266
 {
267
-	FD_ZERO(&h->master_rset);
268
-	FD_ZERO(&h->master_wset);
267
+	FD_ZERO(&h->main_rset);
268
+	FD_ZERO(&h->main_wset);
269 269
 	return 0;
270 270
 }
271 271
 #endif
... ...
@@ -279,7 +279,7 @@ char* check_poll_method(enum poll_types poll_method)
279 279
 	char* ret;
280 280
 
281 281
 	ret=0;
282
-	if (_os_ver==0) 
282
+	if (_os_ver==0)
283 283
 		_os_ver=get_sys_version(0,0,0);
284 284
 	switch(poll_method){
285 285
 		case POLL_NONE:
... ...
@@ -168,8 +168,8 @@ typedef struct io_wait_handler {
168 168
 	int dpoll_fd;
169 169
 #endif
170 170
 #ifdef HAVE_SELECT
171
-	fd_set master_rset; /* read set */
172
-	fd_set master_wset; /* write set */
171
+	fd_set main_rset; /* read set */
172
+	fd_set main_wset; /* write set */
173 173
 	int max_fd_select; /* maximum select used fd */
174 174
 #endif
175 175
 } io_wait_h;
... ...
@@ -400,9 +400,9 @@ inline static int io_watch_add(	io_wait_h* h,
400 400
 		case POLL_SELECT:
401 401
 			fd_array_setup(events);
402 402
 			if (likely(events & POLLIN))
403
-				FD_SET(fd, &h->master_rset);
403
+				FD_SET(fd, &h->main_rset);
404 404
 			if (unlikely(events & POLLOUT))
405
-				FD_SET(fd, &h->master_wset);
405
+				FD_SET(fd, &h->main_wset);
406 406
 			if (h->max_fd_select<fd) h->max_fd_select=fd;
407 407
 			break;
408 408
 #endif
... ...
@@ -619,9 +619,9 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx, int flags)
619 619
 #ifdef HAVE_SELECT
620 620
 		case POLL_SELECT:
621 621
 			if (likely(events & POLLIN))
622
-				FD_CLR(fd, &h->master_rset);
622
+				FD_CLR(fd, &h->main_rset);
623 623
 			if (unlikely(events & POLLOUT))
624
-				FD_CLR(fd, &h->master_wset);
624
+				FD_CLR(fd, &h->main_wset);
625 625
 			if (unlikely(h->max_fd_select && (h->max_fd_select==fd)))
626 626
 				/* we don't know the prev. max, so we just decrement it */
627 627
 				h->max_fd_select--;
... ...
@@ -810,13 +810,13 @@ inline static int io_watch_chg(io_wait_h* h, int fd, short events, int idx )
810 810
 		case POLL_SELECT:
811 811
 			fd_array_chg(events);
812 812
 			if (unlikely(del_events & POLLIN))
813
-				FD_CLR(fd, &h->master_rset);
813
+				FD_CLR(fd, &h->main_rset);
814 814
 			else if (unlikely(add_events & POLLIN))
815
-				FD_SET(fd, &h->master_rset);
815
+				FD_SET(fd, &h->main_rset);
816 816
 			if (likely(del_events & POLLOUT))
817
-				FD_CLR(fd, &h->master_wset);
817
+				FD_CLR(fd, &h->main_wset);
818 818
 			else if (likely(add_events & POLLOUT))
819
-				FD_SET(fd, &h->master_wset);
819
+				FD_SET(fd, &h->main_wset);
820 820
 			break;
821 821
 #endif
822 822
 #ifdef HAVE_SIGIO_RT
... ...
@@ -992,10 +992,10 @@ inline static int io_wait_loop_select(io_wait_h* h, int t, int repeat)
992 992
 	int r;
993 993
 	struct fd_map* fm;
994 994
 	int revents;
995
-	
995
+
996 996
 again:
997
-		sel_rset=h->master_rset;
998
-		sel_wset=h->master_wset;
997
+		sel_rset=h->main_rset;
998
+		sel_wset=h->main_wset;
999 999
 		timeout.tv_sec=t;
1000 1000
 		timeout.tv_usec=0;
1001 1001
 		ret=n=select(h->max_fd_select+1, &sel_rset, &sel_wset, 0, &timeout);
... ...
@@ -35,7 +35,7 @@
35 35
 #define TCP_CON_MAX_ALIASES (4*3)
36 36
 
37 37
 #define TCP_CHILD_TIMEOUT 5 /* after 5 seconds, the child "returns"
38
-							 * the connection to the tcp master process */
38
+							 * the connection to the tcp maing process */
39 39
 #define TCP_MAIN_SELECT_TIMEOUT 5 /* how often "tcp main" checks for timeout*/
40 40
 #define TCP_CHILD_SELECT_TIMEOUT 2 /* the same as above but for children */
41 41
 
... ...
@@ -4130,7 +4130,7 @@ inline static int send2child(struct tcp_connection* tcpconn)
4130 4130
 			tcpconn);
4131 4131
 	/* first make sure this child doesn't have pending request for
4132 4132
 	 * tcp_main (to avoid a possible deadlock: e.g. child wants to
4133
-	 * send a release command, but the master fills its socket buffer
4133
+	 * send a release command, but the main attendant fills its socket buffer
4134 4134
 	 * with new connection commands => deadlock) */
4135 4135
 	/* answer tcp_send requests first */
4136 4136
 	while(unlikely((tcpconn->state != S_CONN_BAD) &&
... ...
@@ -1078,7 +1078,7 @@ void slow_timer_main()
1078 1078
 		 *  on signal delivery for the signals it doesn't wait on
1079 1079
 		 *  (on darwin 8.8.0, g4 1.5Ghz I've measured a 36s delay!).
1080 1080
 		 * To work arround this bug, we sigwait() on all the signals we
1081
-		 * are interested in ser and manually call the master signal handler
1081
+		 * are interested in kamailio and manually call the main signal handler
1082 1082
 		 * if the signal!= slow timer signal -- andrei */
1083 1083
 		sig_usr(sig);
1084 1084
 #endif
... ...
@@ -1769,7 +1769,7 @@ int main_loop(void)
1769 1769
 		if (!tcp_disable){
1770 1770
 				/* start tcp  & tls receivers */
1771 1771
 			if (tcp_init_children()<0) goto error;
1772
-				/* start tcp+tls master proc */
1772
+				/* start tcp+tls main attendant proc */
1773 1773
 			pid = fork_process(PROC_TCP_MAIN, "tcp main process", 0);
1774 1774
 			if (pid<0){
1775 1775
 				LM_CRIT("cannot fork tcp main process: %s\n", strerror(errno));