Difference for socket/loop.c from version 1.35 to 1.36


version 1.35 version 1.36
Line 1
 
Line 1
   
 /*  /*
  * static char *rcsid_loop_c =   * static char *rcsid_loop_c =
  *    "$Id: loop.c,v 1.35 2005/12/05 23:34:04 akirschbaum Exp $";   *    "$Id: loop.c,v 1.36 2005/12/07 18:25:56 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 602
 
Line 602
      LOG(llevError, "accept failed: %s\n", strerror_local(errno));       LOG(llevError, "accept failed: %s\n", strerror_local(errno));
  }   }
  else {   else {
      InitConnection(&init_sockets[newsocknum],ntohl(addr.sin_addr.s_addr));       char buf[MAX_BUF];
        long ip;
        NewSocket *ns;
   
        ns = &init_sockets[newsocknum];
   
        ip = ntohl(addr.sin_addr.s_addr);
        sprintf(buf, "%ld.%ld.%ld.%ld", (ip>>24)&255, (ip>>16)&255, (ip>>8)&255, ip&255);
   
        if (checkbanned(NULL, buf)) {
    LOG(llevInfo, "Banned host tried to connect: [%s]\n", buf);
    close(init_sockets[newsocknum].fd);
    init_sockets[newsocknum].fd = -1;
        }
        else {
    InitConnection(ns, buf);
      socket_info.nconns++;       socket_info.nconns++;
  }   }
     }      }
       }
   
     /* Check for any exceptions/input on the sockets */      /* Check for any exceptions/input on the sockets */
     if (pollret) for(i=1;i<socket_info.allocated_sockets;i++) {      if (pollret) for(i=1;i<socket_info.allocated_sockets;i++) {


Legend:
line(s) removed in v.1.35 
line(s) changed
 line(s) added in v.1.36

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:35