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

Comparing ircd-hybrid-7.2/src/s_bsd.c (file contents):
Revision 1012 by michael, Fri Sep 18 10:14:09 2009 UTC vs.
Revision 1013 by michael, Sun Oct 18 14:26:49 2009 UTC

# Line 58 | Line 58 | static const char *comm_err_str[] = { "C
58  
59   struct Callback *setup_socket_cb = NULL;
60  
61 < static void comm_connect_callback(fde_t *fd, int status);
61 > static void comm_connect_callback(fde_t *, int);
62   static PF comm_connect_timeout;
63   static void comm_connect_dns_callback(void *, const struct irc_ssaddr *, const char *);
64   static PF comm_connect_tryconnect;
# Line 213 | Line 213 | close_connection(struct Client *client_p
213       * If the connection has been up for a long amount of time, schedule
214       * a 'quick' reconnect, else reset the next-connect cycle.
215       */
216 <    if ((conf = find_conf_exact(SERVER_TYPE,
217 <                                  client_p->name, client_p->username,
218 <                                  client_p->host)))
216 >    if ((conf = find_conf_exact(SERVER_TYPE, client_p->name,
217 >                                client_p->username, client_p->host)))
218      {
219        /*
220         * Reschedule a faster reconnect, if this was a automatically
# Line 223 | Line 222 | close_connection(struct Client *client_p
222         * a rehash in between, the status has been changed to
223         * CONF_ILLEGAL). But only do this if it was a "good" link.
224         */
225 <      aconf = (struct AccessItem *)map_to_conf(conf);
226 <      aclass = (struct ClassItem *)map_to_conf(aconf->class_ptr);
225 >      aconf  = map_to_conf(conf);
226 >      aclass = map_to_conf(aconf->class_ptr);
227        aconf->hold = time(NULL);
228        aconf->hold += (aconf->hold - client_p->since > HANGONGOODLINK) ?
229          HANGONRETRYDELAY : ConFreq(aclass);
231      if (nextconnect > aconf->hold)
232        nextconnect = aconf->hold;
230      }
231    }
232    else if (IsClient(client_p))
# Line 327 | Line 324 | add_connection(struct Listener *listener
324    memcpy(&new_client->localClient->ip, irn, sizeof(struct irc_ssaddr));
325  
326    irc_getnameinfo((struct sockaddr*)&new_client->localClient->ip,
327 <        new_client->localClient->ip.ss_len,  new_client->sockhost,
328 <        HOSTIPLEN, NULL, 0, NI_NUMERICHOST);
327 >        new_client->localClient->ip.ss_len, new_client->sockhost,
328 >        sizeof(new_client->sockhost), NULL, 0, NI_NUMERICHOST);
329    new_client->localClient->aftype = new_client->localClient->ip.ss.ss_family;
330   #ifdef IPV6
331    if (new_client->sockhost[0] == ':')
# Line 737 | Line 734 | comm_accept(struct Listener *lptr, struc
734     * reserved fd limit, but we can deal with that when comm_open()
735     * also does it. XXX -- adrian
736     */
737 <  newfd = accept(lptr->fd.fd, (struct sockaddr *)pn, (socklen_t *)&addrlen);
737 >  newfd = accept(lptr->fd.fd, (struct sockaddr *)pn, &addrlen);
738    if (newfd < 0)
739      return -1;
740  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines