~ubuntu-branches/ubuntu/trusty/haproxy/trusty-updates

« back to all changes in this revision

Viewing changes to src/fd.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20091019223145-rymupk5njs544bvp
ImportĀ upstreamĀ versionĀ 1.3.22

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <common/config.h>
20
20
 
21
21
#include <proto/fd.h>
 
22
#include <proto/port_range.h>
22
23
 
23
24
struct fdtab *fdtab = NULL;     /* array of all the file descriptors */
24
25
int maxfd;                      /* # of the highest fd + 1 */
36
37
void fd_delete(int fd)
37
38
{
38
39
        EV_FD_CLO(fd);
 
40
        port_range_release_port(fdtab[fd].port_range, fdtab[fd].local_port);
 
41
        fdtab[fd].port_range = NULL;
39
42
        close(fd);
40
43
        fdtab[fd].state = FD_STCLOSE;
41
44