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

Diff of /lbbs/src/net_server.c

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

Revision 1.52 by sysadm, Thu Jun 5 08:36:02 2025 UTC Revision 1.54 by sysadm, Thu Jun 5 09:13:22 2025 UTC
# Line 296  int net_server(const char *hostaddr, in_ Line 296  int net_server(const char *hostaddr, in_
296                  {                  {
297                          if (events[i].data.fd == socket_server[0] || events[i].data.fd == socket_server[1])                          if (events[i].data.fd == socket_server[0] || events[i].data.fd == socket_server[1])
298                          {                          {
299                                  SSH_v2 = (events[i].data.fd == socket_server[1]);                                  SSH_v2 = (events[i].data.fd == socket_server[1] ? 1 : 0);
300    
301                                  while (!SYS_server_exit) // Accept all incoming connections until error                                  while (!SYS_server_exit) // Accept all incoming connections until error
302                                  {                                  {
303                                          addrlen = sizeof(sin);                                          addrlen = sizeof(sin);
304                                          socket_client = accept(events[i].data.fd, (struct sockaddr *)&sin, &addrlen);                                          socket_client = accept(socket_server[SSH_v2], (struct sockaddr *)&sin, &addrlen);
305                                          if (socket_client < 0)                                          if (socket_client < 0)
306                                          {                                          {
307                                                  if (errno == EAGAIN || errno == EWOULDBLOCK)                                                  if (errno == EAGAIN || errno == EWOULDBLOCK)
# Line 324  int net_server(const char *hostaddr, in_ Line 324  int net_server(const char *hostaddr, in_
324    
325                                          port_client = ntohs(sin.sin_port);                                          port_client = ntohs(sin.sin_port);
326    
327                                          log_common("Accept connection from %s:%d\n", hostaddr_client, port_client);                                          log_common("Accept %sconnection from %s:%d\n", (SSH_v2 ? "" : "SSH2 "), hostaddr_client, port_client);
328    
329                                          if (SYS_child_process_count - 1 < BBS_max_client)                                          if (SYS_child_process_count - 1 < BBS_max_client)
330                                          {                                          {


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

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