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

Comparing ircd-hybrid/trunk/src/s_bsd_poll.c (file contents):
Revision 1592 by michael, Sat Oct 27 21:02:32 2012 UTC vs.
Revision 1736 by michael, Sun Jan 13 09:31:46 2013 UTC

# Line 43 | Line 43
43  
44   static struct pollfd *pollfds;
45   static int pollmax = -1;  /* highest FD number */
46 static dlink_node *hookptr;
46  
48 /*
49 * changing_fdlimit
50 *
51 * Resize pollfds array if necessary.
52 */
53 static void *
54 changing_fdlimit(va_list args)
55 {
56  int old_fdlimit = hard_fdlimit;
57
58  pass_callback(hookptr, va_arg(args, int));
59
60  if (hard_fdlimit != old_fdlimit)
61    pollfds = MyRealloc(pollfds, sizeof(struct pollfd) * hard_fdlimit);
62
63  return NULL;
64 }
47  
48   /*
49   * init_netio
# Line 78 | Line 60 | init_netio(void)
60  
61    for (fd = 0; fd < hard_fdlimit; fd++)
62      pollfds[fd].fd = -1;
81
82  hookptr = install_hook(fdlimit_cb, changing_fdlimit);
63   }
64  
65   /*

Diff Legend

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