Trying to migrate on ratbox3's listener.
This commit is contained in:
parent
f503e634fd
commit
ae9fc63bfd
|
@ -609,7 +609,7 @@ extern void close_connection(struct Client *);
|
|||
extern void init_uid(void);
|
||||
extern char *generate_uid(void);
|
||||
|
||||
void allocate_away(struct Client *);
|
||||
void allocate_away(struct Client *);
|
||||
void free_away(struct Client *);
|
||||
|
||||
#endif /* INCLUDED_client_h */
|
||||
|
|
|
@ -29,26 +29,25 @@
|
|||
|
||||
#include "ircd_defs.h"
|
||||
|
||||
struct Client;
|
||||
|
||||
struct Listener
|
||||
{
|
||||
struct Listener *next; /* list node pointer */
|
||||
const char *name; /* listener name */
|
||||
int fd; /* file descriptor */
|
||||
int ref_count; /* number of connection references */
|
||||
int active; /* current state of listener */
|
||||
int index; /* index into poll array */
|
||||
struct irc_sockaddr_storage addr;
|
||||
struct DNSQuery *dns_query;
|
||||
char vhost[HOSTLEN + 1]; /* virtual name of listener */
|
||||
};
|
||||
|
||||
extern void add_listener(int port, const char *vaddr_ip, int family);
|
||||
extern void close_listener(struct Listener *listener);
|
||||
extern void close_listeners(void);
|
||||
extern const char *get_listener_name(const struct Listener *listener);
|
||||
extern void show_ports(struct Client *client);
|
||||
extern void free_listener(struct Listener *);
|
||||
struct Client;
|
||||
|
||||
struct Listener
|
||||
{
|
||||
rb_dlink_node node;
|
||||
const char *name; /* listener name */
|
||||
rb_fde_t *F; /* file descriptor */
|
||||
int ref_count; /* number of connection references */
|
||||
int active; /* current state of listener */
|
||||
int ssl; /* ssl listener */
|
||||
struct rb_sockaddr_storage addr;
|
||||
char vhost[HOSTLEN + 1]; /* virtual name of listener */
|
||||
};
|
||||
|
||||
void add_listener(int port, const char *vaddr_ip, int family, int ssl);
|
||||
void close_listener(struct Listener *listener);
|
||||
void close_listeners(void);
|
||||
const char *get_listener_name(struct Listener *listener);
|
||||
void show_ports(struct Client *client);
|
||||
void free_listener(struct Listener *);
|
||||
|
||||
#endif /* INCLUDED_listener_h */
|
||||
|
|
1049
src/listener.c
1049
src/listener.c
File diff suppressed because it is too large
Load Diff
|
@ -758,9 +758,9 @@ conf_set_listen_port(void *data)
|
|||
}
|
||||
if(listener_address == NULL)
|
||||
{
|
||||
add_listener(args->v.number, listener_address, AF_INET);
|
||||
add_listener(args->v.number, listener_address, AF_INET, 0);
|
||||
#ifdef IPV6
|
||||
add_listener(args->v.number, listener_address, AF_INET6);
|
||||
add_listener(args->v.number, listener_address, AF_INET6, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -773,7 +773,7 @@ conf_set_listen_port(void *data)
|
|||
#endif
|
||||
family = AF_INET;
|
||||
|
||||
add_listener(args->v.number, listener_address, family);
|
||||
add_listener(args->v.number, listener_address, family, 0);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue