/[LeafOK_CVS]/lbbs/src/bbs_net.c
ViewVC logotype

Diff of /lbbs/src/bbs_net.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.93 by sysadm, Thu Dec 18 01:39:32 2025 UTC Revision 1.94 by sysadm, Thu Dec 18 02:17:39 2025 UTC
# Line 871  static int bbsnet_connect(int n) Line 871  static int bbsnet_connect(int n)
871                  for (int i = 0; i < nfds; i++)                  for (int i = 0; i < nfds; i++)
872                  {                  {
873  #ifdef HAVE_SYS_EPOLL_H  #ifdef HAVE_SYS_EPOLL_H
874                          if (events[i].data.fd == STDIN_FILENO)                          if (events[i].events & (EPOLLRDHUP | EPOLLHUP | EPOLLERR))
875    #else
876                            if (pfds[i].revents & (POLLRDHUP | POLLHUP | POLLERR))
877    #endif
878                            {
879    #ifdef _DEBUG
880    #ifdef HAVE_SYS_EPOLL_H
881                                    log_error("FD (%d) error events (%d)\n", events[i].data.fd, events[i].events);
882    #else
883                                    log_error("FD (%d) error events (%d)\n", pfds[i].fd, pfds[i].revents);
884    #endif
885    #endif
886                                    loop = 0;
887                                    break;
888                            }
889    
890    #ifdef HAVE_SYS_EPOLL_H
891                            if (events[i].data.fd == STDIN_FILENO && (events[i].events & EPOLLIN))
892  #else  #else
893                          if (pfds[i].fd == STDIN_FILENO && (pfds[i].revents & POLLIN))                          if (pfds[i].fd == STDIN_FILENO && (pfds[i].revents & POLLIN))
894  #endif  #endif
# Line 905  static int bbsnet_connect(int n) Line 922  static int bbsnet_connect(int n)
922                          }                          }
923    
924  #ifdef HAVE_SYS_EPOLL_H  #ifdef HAVE_SYS_EPOLL_H
925                          if (events[i].data.fd == STDOUT_FILENO)                          if (events[i].data.fd == STDOUT_FILENO && (events[i].events & EPOLLOUT))
926  #else  #else
927                          if (pfds[i].fd == STDOUT_FILENO && (pfds[i].revents & POLLOUT))                          if (pfds[i].fd == STDOUT_FILENO && (pfds[i].revents & POLLOUT))
928  #endif  #endif


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1