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

Comparing ircd-hybrid-7.2/src/s_bsd.c (file contents):
Revision 549 by michael, Thu Apr 20 12:46:18 2006 UTC vs.
Revision 896 by michael, Sat Nov 3 08:54:09 2007 UTC

# Line 49 | Line 49
49   #include "s_conf.h"
50   #include "s_log.h"
51   #include "s_serv.h"
52 #include "s_stats.h"
52   #include "send.h"
53   #include "memory.h"
54   #include "s_user.h"
# Line 201 | Line 200 | close_connection(struct Client *client_p
200  
201    assert(NULL != client_p);
202  
203 +  if (!IsDead(client_p))
204 +  {
205 +    /* attempt to flush any pending dbufs. Evil, but .. -- adrian */
206 +    /* there is still a chance that we might send data to this socket
207 +     * even if it is marked as blocked (COMM_SELECT_READ handler is called
208 +     * before COMM_SELECT_WRITE). Let's try, nothing to lose.. -adx
209 +     */
210 +    ClearSendqBlocked(client_p);
211 +    send_queued_write(client_p);
212 +  }
213 +
214    if (IsServer(client_p))
215    {
216 <    ServerStats->is_sv++;
217 <    ServerStats->is_sbs += client_p->localClient->send.bytes;
218 <    ServerStats->is_sbr += client_p->localClient->recv.bytes;
219 <    ServerStats->is_sti += CurrentTime - client_p->firsttime;
216 >    ++ServerStats.is_sv;
217 >    ServerStats.is_sbs += client_p->localClient->send.bytes;
218 >    ServerStats.is_sbr += client_p->localClient->recv.bytes;
219 >    ServerStats.is_sti += CurrentTime - client_p->firsttime;
220  
221      /* XXX Does this even make any sense at all anymore?
222       * scheduling a 'quick' reconnect could cause a pile of
# Line 237 | Line 247 | close_connection(struct Client *client_p
247    }
248    else if (IsClient(client_p))
249    {
250 <    ServerStats->is_cl++;
251 <    ServerStats->is_cbs += client_p->localClient->send.bytes;
252 <    ServerStats->is_cbr += client_p->localClient->recv.bytes;
253 <    ServerStats->is_cti += CurrentTime - client_p->firsttime;
250 >    ++ServerStats.is_cl;
251 >    ServerStats.is_cbs += client_p->localClient->send.bytes;
252 >    ServerStats.is_cbr += client_p->localClient->recv.bytes;
253 >    ServerStats.is_cti += CurrentTime - client_p->firsttime;
254    }
255    else
256 <    ServerStats->is_ni++;
247 <
248 <  if (!IsDead(client_p))
249 <  {
250 <    /* attempt to flush any pending dbufs. Evil, but .. -- adrian */
251 <    /* there is still a chance that we might send data to this socket
252 <     * even if it is marked as blocked (COMM_SELECT_READ handler is called
253 <     * before COMM_SELECT_WRITE). Let's try, nothing to lose.. -adx
254 <     */
255 <    ClearSendqBlocked(client_p);
256 <    send_queued_write(client_p);
257 <  }
256 >    ++ServerStats.is_ni;
257  
258   #ifdef HAVE_LIBCRYPTO
259    if (client_p->localClient->fd.ssl)
# Line 550 | Line 549 | comm_connect_tcp(fde_t *fd, const char *
549      fd->dns_query = MyMalloc(sizeof(struct DNSQuery));
550      fd->dns_query->ptr = fd;
551      fd->dns_query->callback = comm_connect_dns_callback;
552 <    gethost_byname(host, fd->dns_query);
552 >    if (aftype == AF_INET6)
553 >      gethost_byname_type(host, fd->dns_query, T_AAAA);
554 >    else
555 >      gethost_byname_type(host, fd->dns_query, T_A);
556    }
557    else
558    {

Diff Legend

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