ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_auth.c
(Generate patch)

Comparing:
ircd-hybrid/src/s_auth.c (file contents), Revision 33 by knight, Sun Oct 2 20:50:00 2005 UTC vs.
ircd-hybrid-7.2/src/s_auth.c (file contents), Revision 650 by michael, Thu Jun 8 07:00:17 2006 UTC

# Line 117 | Line 117 | make_auth_request(struct Client *client)
117    request->client  = client;
118    request->timeout = CurrentTime + CONNECTTIMEOUT;
119  
120 <  return (request);
120 >  return request;
121   }
122  
123   /*
# Line 135 | Line 135 | release_auth_client(struct Client *clien
135     */
136    client->localClient->allow_read = MAX_FLOOD;
137    comm_setflush(&client->localClient->fd, 1000, flood_recalc, client);
138 +
139    if ((client->node.prev != NULL) || (client->node.next != NULL))
140    {
141      sendto_realops_flags(UMODE_ALL, L_OPER,
# Line 146 | Line 147 | release_auth_client(struct Client *clien
147    }
148    else
149      dlinkAdd(client, &client->node, &global_client_list);
150 +
151 +  client_p->since  = client_p->lasttime = client_p->firsttime = CurrentTime;
152 +  client_p->flags |= FLAGS_FINISHED_AUTH;
153 +
154    read_packet(&client->localClient->fd, client);
155   }
156  
# Line 544 | Line 549 | read_auth_reply(fde_t *fd, void *data)
549    int count;
550    char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */
551  
552 +  /* Why?
553 +   * Well, recv() on many POSIX systems is a per-packet operation,
554 +   * and we do not necessarily want this, because on lowspec machines,
555 +   * the ident response may come back fragmented, thus resulting in an
556 +   * invalid ident response, even if the ident response was really OK.
557 +   *
558 +   * So PLEASE do not change this code to recv without being aware of the
559 +   * consequences.
560 +   *
561 +   *    --nenolod
562 +   */
563 + #ifndef _WIN32
564 +  len = read(fd->fd, buf, AUTH_BUFSIZ);
565 + #else
566    len = recv(fd->fd, buf, AUTH_BUFSIZ, 0);
567 + #endif
568    
569    if (len < 0)
570    {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)