Skip to content

Commit

Permalink
core: use main term for fields and in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 2, 2020
1 parent b26133f commit 5664f88
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/core/io_wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ static void destroy_devpoll(io_wait_h* h)
#ifdef HAVE_SELECT
static int init_select(io_wait_h* h)
{
FD_ZERO(&h->master_rset);
FD_ZERO(&h->master_wset);
FD_ZERO(&h->main_rset);
FD_ZERO(&h->main_wset);
return 0;
}
#endif
Expand All @@ -279,7 +279,7 @@ char* check_poll_method(enum poll_types poll_method)
char* ret;

ret=0;
if (_os_ver==0)
if (_os_ver==0)
_os_ver=get_sys_version(0,0,0);
switch(poll_method){
case POLL_NONE:
Expand Down
26 changes: 13 additions & 13 deletions src/core/io_wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ typedef struct io_wait_handler {
int dpoll_fd;
#endif
#ifdef HAVE_SELECT
fd_set master_rset; /* read set */
fd_set master_wset; /* write set */
fd_set main_rset; /* read set */
fd_set main_wset; /* write set */
int max_fd_select; /* maximum select used fd */
#endif
} io_wait_h;
Expand Down Expand Up @@ -400,9 +400,9 @@ inline static int io_watch_add( io_wait_h* h,
case POLL_SELECT:
fd_array_setup(events);
if (likely(events & POLLIN))
FD_SET(fd, &h->master_rset);
FD_SET(fd, &h->main_rset);
if (unlikely(events & POLLOUT))
FD_SET(fd, &h->master_wset);
FD_SET(fd, &h->main_wset);
if (h->max_fd_select<fd) h->max_fd_select=fd;
break;
#endif
Expand Down Expand Up @@ -619,9 +619,9 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx, int flags)
#ifdef HAVE_SELECT
case POLL_SELECT:
if (likely(events & POLLIN))
FD_CLR(fd, &h->master_rset);
FD_CLR(fd, &h->main_rset);
if (unlikely(events & POLLOUT))
FD_CLR(fd, &h->master_wset);
FD_CLR(fd, &h->main_wset);
if (unlikely(h->max_fd_select && (h->max_fd_select==fd)))
/* we don't know the prev. max, so we just decrement it */
h->max_fd_select--;
Expand Down Expand Up @@ -810,13 +810,13 @@ inline static int io_watch_chg(io_wait_h* h, int fd, short events, int idx )
case POLL_SELECT:
fd_array_chg(events);
if (unlikely(del_events & POLLIN))
FD_CLR(fd, &h->master_rset);
FD_CLR(fd, &h->main_rset);
else if (unlikely(add_events & POLLIN))
FD_SET(fd, &h->master_rset);
FD_SET(fd, &h->main_rset);
if (likely(del_events & POLLOUT))
FD_CLR(fd, &h->master_wset);
FD_CLR(fd, &h->main_wset);
else if (likely(add_events & POLLOUT))
FD_SET(fd, &h->master_wset);
FD_SET(fd, &h->main_wset);
break;
#endif
#ifdef HAVE_SIGIO_RT
Expand Down Expand Up @@ -992,10 +992,10 @@ inline static int io_wait_loop_select(io_wait_h* h, int t, int repeat)
int r;
struct fd_map* fm;
int revents;

again:
sel_rset=h->master_rset;
sel_wset=h->master_wset;
sel_rset=h->main_rset;
sel_wset=h->main_wset;
timeout.tv_sec=t;
timeout.tv_usec=0;
ret=n=select(h->max_fd_select+1, &sel_rset, &sel_wset, 0, &timeout);
Expand Down
2 changes: 1 addition & 1 deletion src/core/tcp_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define TCP_CON_MAX_ALIASES (4*3)

#define TCP_CHILD_TIMEOUT 5 /* after 5 seconds, the child "returns"
* the connection to the tcp master process */
* the connection to the tcp maing process */
#define TCP_MAIN_SELECT_TIMEOUT 5 /* how often "tcp main" checks for timeout*/
#define TCP_CHILD_SELECT_TIMEOUT 2 /* the same as above but for children */

Expand Down
2 changes: 1 addition & 1 deletion src/core/tcp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4130,7 +4130,7 @@ inline static int send2child(struct tcp_connection* tcpconn)
tcpconn);
/* first make sure this child doesn't have pending request for
* tcp_main (to avoid a possible deadlock: e.g. child wants to
* send a release command, but the master fills its socket buffer
* send a release command, but the main attendant fills its socket buffer
* with new connection commands => deadlock) */
/* answer tcp_send requests first */
while(unlikely((tcpconn->state != S_CONN_BAD) &&
Expand Down
2 changes: 1 addition & 1 deletion src/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ void slow_timer_main()
* on signal delivery for the signals it doesn't wait on
* (on darwin 8.8.0, g4 1.5Ghz I've measured a 36s delay!).
* To work arround this bug, we sigwait() on all the signals we
* are interested in ser and manually call the master signal handler
* are interested in kamailio and manually call the main signal handler
* if the signal!= slow timer signal -- andrei */
sig_usr(sig);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ int main_loop(void)
if (!tcp_disable){
/* start tcp & tls receivers */
if (tcp_init_children()<0) goto error;
/* start tcp+tls master proc */
/* start tcp+tls main attendant proc */
pid = fork_process(PROC_TCP_MAIN, "tcp main process", 0);
if (pid<0){
LM_CRIT("cannot fork tcp main process: %s\n", strerror(errno));
Expand Down

0 comments on commit 5664f88

Please sign in to comment.