Commits

Jilles Tjoelker  committed 827fcb5

Remove ^M on line endings.

  • Participants
  • Parent commits 8b7e4cd

Comments (0)

Files changed (20)

File include/cache.h

-/* $Id: cache.h 24250 2007-08-22 19:15:08Z androsyn $ */
-#ifndef INCLUDED_CACHE_H
-#define INCLUDED_CACHE_H
-
-#define HELP_MAX	100
-
-#define CACHELINELEN	81
-#define CACHEFILELEN	30
-/* two servernames, a gecos, three spaces, ":1", '\0' */
-#define LINKSLINELEN	(HOSTLEN + HOSTLEN + REALLEN + 6)
-
-#define HELP_USER	0x001
-#define HELP_OPER	0x002
-
-struct Client;
-
-struct cachefile
-{
-	char name[CACHEFILELEN];
-	rb_dlink_list contents;
-	int flags;
-};
-
-struct cacheline
-{
-	char data[CACHELINELEN];
-	rb_dlink_node linenode;
-};
-
-extern struct cachefile *user_motd;
-extern struct cachefile *oper_motd;
-extern struct cacheline *emptyline;
-
-extern char user_motd_changed[MAX_DATE_STRING];
-extern rb_dlink_list links_cache_list;
-
-void init_cache(void);
-struct cachefile *cache_file(const char *, const char *, int);
-void cache_links(void *unused);
-void free_cachefile(struct cachefile *);
-
-void load_help(void);
-
-void send_user_motd(struct Client *);
-void send_oper_motd(struct Client *);
-void cache_user_motd(void);
-
-struct Dictionary;
-extern struct Dictionary *help_dict_oper;
-extern struct Dictionary *help_dict_user;
-#endif
-
+/* $Id: cache.h 24250 2007-08-22 19:15:08Z androsyn $ */
+#ifndef INCLUDED_CACHE_H
+#define INCLUDED_CACHE_H
+
+#define HELP_MAX	100
+
+#define CACHELINELEN	81
+#define CACHEFILELEN	30
+/* two servernames, a gecos, three spaces, ":1", '\0' */
+#define LINKSLINELEN	(HOSTLEN + HOSTLEN + REALLEN + 6)
+
+#define HELP_USER	0x001
+#define HELP_OPER	0x002
+
+struct Client;
+
+struct cachefile
+{
+	char name[CACHEFILELEN];
+	rb_dlink_list contents;
+	int flags;
+};
+
+struct cacheline
+{
+	char data[CACHELINELEN];
+	rb_dlink_node linenode;
+};
+
+extern struct cachefile *user_motd;
+extern struct cachefile *oper_motd;
+extern struct cacheline *emptyline;
+
+extern char user_motd_changed[MAX_DATE_STRING];
+extern rb_dlink_list links_cache_list;
+
+void init_cache(void);
+struct cachefile *cache_file(const char *, const char *, int);
+void cache_links(void *unused);
+void free_cachefile(struct cachefile *);
+
+void load_help(void);
+
+void send_user_motd(struct Client *);
+void send_oper_motd(struct Client *);
+void cache_user_motd(void);
+
+struct Dictionary;
+extern struct Dictionary *help_dict_oper;
+extern struct Dictionary *help_dict_user;
+#endif
+

File include/client.h

 
 struct ZipStats
 {
-	unsigned long long in;
-	unsigned long long in_wire;
-	unsigned long long out;
-	unsigned long long out_wire;
-	double in_ratio;
+	unsigned long long in;
+	unsigned long long in_wire;
+	unsigned long long out;
+	unsigned long long out_wire;
+	double in_ratio;
 	double out_ratio;
 };
 

File include/common.h

 
 /* Right out of the RFC */
 #define IRCD_BUFSIZE 512
-
-/* readbuf size */
+
+/* readbuf size */
 #define READBUF_SIZE 16384
 
 #endif /* INCLUDED_common_h */

File include/hash.h

 #define U_MAX_BITS 17
 #define U_MAX 131072 /* 2^17 */
 
-/* Client fd hash table size, used in hash.c */
+/* Client fd hash table size, used in hash.c */
 #define CLI_FD_MAX 4096
 
 /* Channel hash table size, hash.c/s_debug.c */
 extern struct ConfItem *hash_find_resv(const char *name);
 extern void clear_resv_hash(void);
 
-void add_to_cli_fd_hash(struct Client *client_p);
-void del_from_cli_fd_hash(struct Client *client_p);
+void add_to_cli_fd_hash(struct Client *client_p);
+void del_from_cli_fd_hash(struct Client *client_p);
 struct Client *find_cli_fd_hash(int fd);
 
 extern void hash_stats(struct Client *);

File include/listener.h

 
 struct Client;
 
-struct Listener
-{
-	struct Listener *next;	/* list node pointer */
-	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;
-	struct DNSQuery *dns_query;
-	char vhost[HOSTLEN + 1];	/* virtual name of listener */
+struct Listener
+{
+	struct Listener *next;	/* list node pointer */
+	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;
+	struct DNSQuery *dns_query;
+	char vhost[HOSTLEN + 1];	/* virtual name of listener */
 };
 
 extern void add_listener(int port, const char *vaddr_ip, int family, int ssl);

File include/monitor.h

 	rb_dlink_list users;
 };
 
-extern struct monitor *monitorTable[];
-
-#define MONITOR_HASH_BITS 16
+extern struct monitor *monitorTable[];
+
+#define MONITOR_HASH_BITS 16
 #define MONITOR_HASH_SIZE (1<<MONITOR_HASH_BITS)
 
 void free_monitor(struct monitor *);

File include/s_conf.h

 #ifdef RB_IPV6
 	int specific_ipv6_vhost;
 #endif
-	char *ssl_private_key;
-	char *ssl_ca_cert;
-	char *ssl_cert;
-	char *ssl_dh_params;
+	char *ssl_private_key;
+	char *ssl_ca_cert;
+	char *ssl_cert;
+	char *ssl_dh_params;
 	int ssld_count;
 };
 

File include/s_stats.h

 	unsigned int is_cl;	/* number of client connections */
 	unsigned int is_sv;	/* number of server connections */
 	unsigned int is_ni;	/* connection but no idea who it was */
-	unsigned long long int is_cbs;	/* bytes sent to clients */
-	unsigned long long int is_cbr;	/* bytes received to clients */
-	unsigned long long int is_sbs;	/* bytes sent to servers */
+	unsigned long long int is_cbs;	/* bytes sent to clients */
+	unsigned long long int is_cbr;	/* bytes received to clients */
+	unsigned long long int is_sbs;	/* bytes sent to servers */
 	unsigned long long int is_sbr;	/* bytes received to servers */
 	time_t is_cti;		/* time spent connected by clients */
 	time_t is_sti;		/* time spent connected by servers */

File modules/core/m_server.c

 		/* NOT REACHED */
 		break;
 	case -5:
-		sendto_realops_snomask(SNO_GENERAL, L_ALL,
-		     "Connection from servername %s requires SSL/TLS but is plaintext",
-		     name);
-		ilog(L_SERVER, "Access denied, requires SSL/TLS but is plaintext from %s", 
-		     log_client_name(client_p, SHOW_IP));
-
-		exit_client(client_p, client_p, client_p, "Access denied, requires SSL/TLS but is plaintext");
+		sendto_realops_snomask(SNO_GENERAL, L_ALL,
+		     "Connection from servername %s requires SSL/TLS but is plaintext",
+		     name);
+		ilog(L_SERVER, "Access denied, requires SSL/TLS but is plaintext from %s", 
+		     log_client_name(client_p, SHOW_IP));
+
+		exit_client(client_p, client_p, client_p, "Access denied, requires SSL/TLS but is plaintext");
 		return 0;
 	}
 

File modules/m_connect.c

 		return 0;
 	}
 
-	if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
-	{
-		sendto_one_notice(source_p,
-				  ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
-				  parv[1]);
-		return 0;
+	if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
+	{
+		sendto_one_notice(source_p,
+				  ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
+				  parv[1]);
+		return 0;
 	}
 
 	/*
 		return 0;
 	}
 
-	if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
-	{
-		sendto_one_notice(source_p,
-				  ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
-				  parv[1]);
-		return 0;
+	if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
+	{
+		sendto_one_notice(source_p,
+				  ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
+				  parv[1]);
+		return 0;
 	}
 
 	/*

File modules/m_info.c

 		&opers_see_all_users,
 		"Farconnect notices available or operspy accountability limited"
 	},
-	{
-		"max_connections",
-		OUTPUT_DECIMAL,
-		&maxconnections,
-		"Max number connections"
+	{
+		"max_connections",
+		OUTPUT_DECIMAL,
+		&maxconnections,
+		"Max number connections"
 	},
 	{
 		"anti_nick_flood",

File modules/m_set.c

 {
 	if(newval > 0)
 	{
-		if(newval > maxconnections - MAX_BUFFER)
-		{
-			sendto_one_notice(source_p,
-					  ":You cannot set MAXCLIENTS to > %d",
-					  maxconnections - MAX_BUFFER);
-			return;
+		if(newval > maxconnections - MAX_BUFFER)
+		{
+			sendto_one_notice(source_p,
+					  ":You cannot set MAXCLIENTS to > %d",
+					  maxconnections - MAX_BUFFER);
+			return;
 		}
 
 		if(newval < 32)

File modules/m_stats.c

 		{
 			if(ServerConfAutoconn(server_p))
 				*s++ = 'A';
-			if(ServerConfSSL(server_p))
+			if(ServerConfSSL(server_p))
 				*s++ = 'S';
 			if(ServerConfTb(server_p))
 				*s++ = 'T';
 
 	memcpy(&sp, &ServerStats, sizeof(struct ServerStatistics));
 
-	RB_DLINK_FOREACH(ptr, serv_list.head)
-	{
-		target_p = ptr->data;
-
-		sp.is_sbs += target_p->localClient->sendB;
-		sp.is_sbr += target_p->localClient->receiveB;
-		sp.is_sti += rb_current_time() - target_p->localClient->firsttime;
-		sp.is_sv++;
-	}
-
-	RB_DLINK_FOREACH(ptr, lclient_list.head)
-	{
-		target_p = ptr->data;
-
-		sp.is_cbs += target_p->localClient->sendB;
-		sp.is_cbr += target_p->localClient->receiveB;
-		sp.is_cti += rb_current_time() - target_p->localClient->firsttime;
-		sp.is_cl++;
+	RB_DLINK_FOREACH(ptr, serv_list.head)
+	{
+		target_p = ptr->data;
+
+		sp.is_sbs += target_p->localClient->sendB;
+		sp.is_sbr += target_p->localClient->receiveB;
+		sp.is_sti += rb_current_time() - target_p->localClient->firsttime;
+		sp.is_sv++;
+	}
+
+	RB_DLINK_FOREACH(ptr, lclient_list.head)
+	{
+		target_p = ptr->data;
+
+		sp.is_cbs += target_p->localClient->sendB;
+		sp.is_cbr += target_p->localClient->receiveB;
+		sp.is_cti += rb_current_time() - target_p->localClient->firsttime;
+		sp.is_cl++;
 	}
 
 	RB_DLINK_FOREACH(ptr, unknown_list.head)
 	sendto_one_numeric(source_p, RPL_STATSDEBUG, "T :Client Server");
 	sendto_one_numeric(source_p, RPL_STATSDEBUG,
 			   "T :connected %u %u", sp.is_cl, sp.is_sv);
-	sendto_one_numeric(source_p, RPL_STATSDEBUG,
-				"T :bytes sent %lluK %lluK",
-				sp.is_cbs / 1024, 
-				sp.is_sbs / 1024);
-	sendto_one_numeric(source_p, RPL_STATSDEBUG,
-				"T :bytes recv %lluK %lluK",
-				sp.is_cbr / 1024, 
+	sendto_one_numeric(source_p, RPL_STATSDEBUG,
+				"T :bytes sent %lluK %lluK",
+				sp.is_cbs / 1024, 
+				sp.is_sbs / 1024);
+	sendto_one_numeric(source_p, RPL_STATSDEBUG,
+				"T :bytes recv %lluK %lluK",
+				sp.is_cbr / 1024, 
 				sp.is_sbr / 1024);
-	sendto_one_numeric(source_p, RPL_STATSDEBUG,
-				"T :time connected %lu %lu",
+	sendto_one_numeric(source_p, RPL_STATSDEBUG,
+				"T :time connected %lu %lu",
 				(long int)sp.is_cti, (long int)sp.is_sti);
 }
 

File src/client.c

 	{
 		struct server_conf *server_p;
 
-		ServerStats.is_sv++;
-		ServerStats.is_sbs += client_p->localClient->sendB;
-		ServerStats.is_sbr += client_p->localClient->receiveB;
+		ServerStats.is_sv++;
+		ServerStats.is_sbs += client_p->localClient->sendB;
+		ServerStats.is_sbr += client_p->localClient->receiveB;
 		ServerStats.is_sti += rb_current_time() - client_p->localClient->firsttime;
 
 		/*
 	}
 	else if(IsClient(client_p))
 	{
-		ServerStats.is_cl++;
-		ServerStats.is_cbs += client_p->localClient->sendB;
-		ServerStats.is_cbr += client_p->localClient->receiveB;
+		ServerStats.is_cl++;
+		ServerStats.is_cbs += client_p->localClient->sendB;
+		ServerStats.is_cbr += client_p->localClient->receiveB;
 		ServerStats.is_cti += rb_current_time() - client_p->localClient->firsttime;
 	}
 	else
 	HASH_WALK_END
 }
 
-void
-add_to_cli_fd_hash(struct Client *client_p)
-{
-	rb_dlinkAddAlloc(client_p, &clientbyfdTable[hash_cli_fd(rb_get_fd(client_p->localClient->F))]);
-}
-
-
-void
-del_from_cli_fd_hash(struct Client *client_p)
-{
-	unsigned int hashv;
-	hashv = hash_cli_fd(rb_get_fd(client_p->localClient->F));
-	rb_dlinkFindDestroy(client_p, &clientbyfdTable[hashv]);
-}
-
-struct Client *
-find_cli_fd_hash(int fd)
-{
-	struct Client *target_p;
-	rb_dlink_node *ptr;
-	unsigned int hashv;
-	hashv = hash_cli_fd(fd);
-	RB_DLINK_FOREACH(ptr, clientbyfdTable[hashv].head)
-	{
-		target_p = ptr->data;
-		if(rb_get_fd(target_p->localClient->F) == fd)
-			return target_p;
-	}
-	return  NULL;	
+void
+add_to_cli_fd_hash(struct Client *client_p)
+{
+	rb_dlinkAddAlloc(client_p, &clientbyfdTable[hash_cli_fd(rb_get_fd(client_p->localClient->F))]);
+}
+
+
+void
+del_from_cli_fd_hash(struct Client *client_p)
+{
+	unsigned int hashv;
+	hashv = hash_cli_fd(rb_get_fd(client_p->localClient->F));
+	rb_dlinkFindDestroy(client_p, &clientbyfdTable[hashv]);
+}
+
+struct Client *
+find_cli_fd_hash(int fd)
+{
+	struct Client *target_p;
+	rb_dlink_node *ptr;
+	unsigned int hashv;
+	hashv = hash_cli_fd(fd);
+	RB_DLINK_FOREACH(ptr, clientbyfdTable[hashv].head)
+	{
+		target_p = ptr->data;
+		if(rb_get_fd(target_p->localClient->F) == fd)
+			return target_p;
+	}
+	return  NULL;	
 }
 
 static void
 #include "serno.h"
 #include "sslproc.h"
 
-/* /quote set variables */
+/* /quote set variables */
 struct SetOptions GlobalSetOptions;
-
-/* configuration set from ircd.conf */
-struct config_file_entry ConfigFileEntry;
-/* server info set from ircd.conf */
-struct server_info ServerInfo;
-/* admin info set from ircd.conf */
+
+/* configuration set from ircd.conf */
+struct config_file_entry ConfigFileEntry;
+/* server info set from ircd.conf */
+struct server_info ServerInfo;
+/* admin info set from ircd.conf */
 struct admin_info AdminInfo;
 
-struct Counter Count;
+struct Counter Count;
 struct ServerStatistics ServerStats;
 
 int maxconnections;
 struct timeval SystemTime;
-struct Client me;		/* That's me */
+struct Client me;		/* That's me */
 struct LocalUser meLocalUser;	/* That's also part of me */
 
-rb_dlink_list lclient_list = { NULL, NULL, 0 };
-rb_dlink_list global_client_list = { NULL, NULL, 0 };
-rb_dlink_list global_channel_list = { NULL, NULL, 0 };
-
-rb_dlink_list unknown_list;        /* unknown clients ON this server only */
-rb_dlink_list serv_list;           /* local servers to this server ONLY */
-rb_dlink_list global_serv_list;    /* global servers on the network */
-rb_dlink_list local_oper_list;     /* our opers, duplicated in lclient_list */
+rb_dlink_list lclient_list = { NULL, NULL, 0 };
+rb_dlink_list global_client_list = { NULL, NULL, 0 };
+rb_dlink_list global_channel_list = { NULL, NULL, 0 };
+
+rb_dlink_list unknown_list;        /* unknown clients ON this server only */
+rb_dlink_list serv_list;           /* local servers to this server ONLY */
+rb_dlink_list global_serv_list;    /* global servers on the network */
+rb_dlink_list local_oper_list;     /* our opers, duplicated in lclient_list */
 rb_dlink_list oper_list;           /* network opers */
 
-time_t startup_time;
-
-int default_server_capabs = CAP_MASK;
-
-int splitmode;
-int splitchecking;
-int split_users;
-int split_servers;
-int eob_count;
-
-unsigned long initialVMTop = 0;  /* top of virtual memory at init */
-const char *logFileName = LPATH;
+time_t startup_time;
+
+int default_server_capabs = CAP_MASK;
+
+int splitmode;
+int splitchecking;
+int split_users;
+int split_servers;
+int eob_count;
+
+unsigned long initialVMTop = 0;  /* top of virtual memory at init */
+const char *logFileName = LPATH;
 const char *pidFileName = PPATH;
 
 char **myargv;
-int dorehash = 0;
-int dorehashbans = 0;
-int doremotd = 0;
-int kline_queued = 0;
-int server_state_foreground = 0;
-int opers_see_all_users = 0;
-int ssl_ok = 0;
-int zlib_ok = 1;
-
-int testing_conf = 0;
-
-struct config_channel_entry ConfigChannel;
-rb_bh *channel_heap;
-rb_bh *ban_heap;
-rb_bh *topic_heap;
-rb_bh *member_heap;
-
-rb_bh *client_heap = NULL;
-rb_bh *lclient_heap = NULL;
-rb_bh *pclient_heap = NULL;
-
-char current_uid[IDLEN];
-
-/* patricia */
-rb_bh *prefix_heap;
-rb_bh *node_heap;
-rb_bh *patricia_heap;
-
-rb_bh *linebuf_heap;
-
+int dorehash = 0;
+int dorehashbans = 0;
+int doremotd = 0;
+int kline_queued = 0;
+int server_state_foreground = 0;
+int opers_see_all_users = 0;
+int ssl_ok = 0;
+int zlib_ok = 1;
+
+int testing_conf = 0;
+
+struct config_channel_entry ConfigChannel;
+rb_bh *channel_heap;
+rb_bh *ban_heap;
+rb_bh *topic_heap;
+rb_bh *member_heap;
+
+rb_bh *client_heap = NULL;
+rb_bh *lclient_heap = NULL;
+rb_bh *pclient_heap = NULL;
+
+char current_uid[IDLEN];
+
+/* patricia */
+rb_bh *prefix_heap;
+rb_bh *node_heap;
+rb_bh *patricia_heap;
+
+rb_bh *linebuf_heap;
+
 rb_bh *dnode_heap;
 
 /*
 static void
 ircd_die_cb(const char *str)
 {
-	if(str != NULL)
+	if(str != NULL)
 	{
 		/* Try to get the message out to currently logged in operators. */
 		sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str);
 static void
 init_sys(void)
 {
-#if defined(RLIMIT_NOFILE) && defined(HAVE_SYS_RESOURCE_H)
-	struct rlimit limit;
-
-	if(!getrlimit(RLIMIT_NOFILE, &limit))
-	{
-		maxconnections = limit.rlim_cur;
-		if(maxconnections <= MAX_BUFFER)
-		{
-			fprintf(stderr, "ERROR: Shell FD limits are too low.\n");
-			fprintf(stderr, "ERROR: ircd-ratbox reserves %d FDs, shell limits must be above this\n", MAX_BUFFER);
-			exit(EXIT_FAILURE);
-		}
-		return;
-	}
-#endif /* RLIMIT_FD_MAX */
+#if defined(RLIMIT_NOFILE) && defined(HAVE_SYS_RESOURCE_H)
+	struct rlimit limit;
+
+	if(!getrlimit(RLIMIT_NOFILE, &limit))
+	{
+		maxconnections = limit.rlim_cur;
+		if(maxconnections <= MAX_BUFFER)
+		{
+			fprintf(stderr, "ERROR: Shell FD limits are too low.\n");
+			fprintf(stderr, "ERROR: ircd-ratbox reserves %d FDs, shell limits must be above this\n", MAX_BUFFER);
+			exit(EXIT_FAILURE);
+		}
+		return;
+	}
+#endif /* RLIMIT_FD_MAX */
 	maxconnections = MAXCONNECTIONS;
 }
 
 	memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
 	/* memset( &ConfigFileEntry, 0, sizeof(ConfigFileEntry)); */
 
-	GlobalSetOptions.maxclients = ServerInfo.default_max_clients;
-
-	if(GlobalSetOptions.maxclients > (maxconnections - MAX_BUFFER) || (GlobalSetOptions.maxclients <= 0))
+	GlobalSetOptions.maxclients = ServerInfo.default_max_clients;
+
+	if(GlobalSetOptions.maxclients > (maxconnections - MAX_BUFFER) || (GlobalSetOptions.maxclients <= 0))
 		GlobalSetOptions.maxclients = maxconnections - MAX_BUFFER;
 
 	GlobalSetOptions.autoconn = 1;
 	}
 	strlcpy(me.info, ServerInfo.description, sizeof(me.info));
 
-	if(ServerInfo.ssl_cert != NULL && ServerInfo.ssl_private_key != NULL)
-	{
-		/* just do the rb_setup_ssl_server to validate the config */
-		if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params))
-		{
-			ilog(L_MAIN, "WARNING: Unable to setup SSL.");
-			ssl_ok = 0;
-		}
-		else
-			ssl_ok = 1;
+	if(ServerInfo.ssl_cert != NULL && ServerInfo.ssl_private_key != NULL)
+	{
+		/* just do the rb_setup_ssl_server to validate the config */
+		if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params))
+		{
+			ilog(L_MAIN, "WARNING: Unable to setup SSL.");
+			ssl_ok = 0;
+		}
+		else
+			ssl_ok = 1;
 	}
 
 	if (testing_conf)

File src/listener.c

 			   ntohs(((struct sockaddr_in *)&listener->addr)->sin_port),
 #endif
 			   IsOperAdmin(source_p) ? listener->name : me.name,
-			   listener->ref_count, (listener->active) ? "active" : "disabled",
+			   listener->ref_count, (listener->active) ? "active" : "disabled",
 			   listener->ssl ? " ssl" : "");
 	}
 }
 	new_client->localClient->F = F;
 	add_to_cli_fd_hash(new_client);
 	new_client->localClient->listener = listener;
-	new_client->localClient->ssl_ctl = ssl_ctl;
-	if(ssl_ctl != NULL || rb_fd_ssl(F))
+	new_client->localClient->ssl_ctl = ssl_ctl;
+	if(ssl_ctl != NULL || rb_fd_ssl(F))
 		SetSSL(new_client);
 
 	++listener->ref_count;
 	struct ConfItem *aconf;
 	static time_t last_oper_notice = 0;
 
-	if(listener->ssl && (!ssl_ok || !get_ssld_count()))
-	{
-		rb_close(F);
-		return 0;
+	if(listener->ssl && (!ssl_ok || !get_ssld_count()))
+	{
+		rb_close(F);
+		return 0;
 	}
 
 	if((maxconnections - 10) < rb_get_fd(F)) /* XXX this is kinda bogus */
 	return 1;
 }
 
-static void
-accept_ssld(rb_fde_t *F, struct sockaddr *addr, struct sockaddr *laddr, struct Listener *listener)
-{
-	ssl_ctl_t *ctl;
-	rb_fde_t *xF[2];
-	rb_socketpair(AF_UNIX, SOCK_STREAM, 0, &xF[0], &xF[1], "Incoming ssld Connection");
-	ctl = start_ssld_accept(F, xF[1], rb_get_fd(xF[0])); /* this will close F for us */
-	add_connection(listener, xF[0], addr, ctl, 1);
+static void
+accept_ssld(rb_fde_t *F, struct sockaddr *addr, struct sockaddr *laddr, struct Listener *listener)
+{
+	ssl_ctl_t *ctl;
+	rb_fde_t *xF[2];
+	rb_socketpair(AF_UNIX, SOCK_STREAM, 0, &xF[0], &xF[1], "Incoming ssld Connection");
+	ctl = start_ssld_accept(F, xF[1], rb_get_fd(xF[0])); /* this will close F for us */
+	add_connection(listener, xF[0], addr, ctl, 1);
 }
 
 static void
 		rb_close(F);
 	}
 	
-	if(listener->ssl)
-		accept_ssld(F, addr, (struct sockaddr *)&lip, listener);
-	else
+	if(listener->ssl)
+		accept_ssld(F, addr, (struct sockaddr *)&lip, listener);
+	else
 		add_connection(listener, F, addr, NULL, 1);
 }

File src/newconf.c

 	}
 }
 
-static void
-conf_set_listen_port(void *data)
-{
-	conf_set_listen_port_both(data, 0);
-}
-
-static void
-conf_set_listen_sslport(void *data)
-{
-	conf_set_listen_port_both(data, 1);
+static void
+conf_set_listen_port(void *data)
+{
+	conf_set_listen_port_both(data, 0);
+}
+
+static void
+conf_set_listen_sslport(void *data)
+{
+	conf_set_listen_port_both(data, 1);
 }
 
 static void
 		yy_server->flags &= ~SERVER_COMPRESSED;
 	}
 #endif
-	if(ServerConfCompressed(yy_server) && ServerConfSSL(yy_server))
-	{
-		conf_report_error("Ignoring compressed for connect block %s -- "
-				       "ssl and compressed are mutually exclusive (OpenSSL does its own compression)", 
-				       yy_server->name);
-		yy_server->flags &= ~SERVER_COMPRESSED;
+	if(ServerConfCompressed(yy_server) && ServerConfSSL(yy_server))
+	{
+		conf_report_error("Ignoring compressed for connect block %s -- "
+				       "ssl and compressed are mutually exclusive (OpenSSL does its own compression)", 
+				       yy_server->name);
+		yy_server->flags &= ~SERVER_COMPRESSED;
 	}
 
 	add_server_conf(yy_server);
 	{ "vhost", 		CF_QSTRING, conf_set_serverinfo_vhost,	0, NULL },
 	{ "vhost6", 		CF_QSTRING, conf_set_serverinfo_vhost6,	0, NULL },
 
-	{ "ssl_private_key",    CF_QSTRING, NULL, 0, &ServerInfo.ssl_private_key },
-	{ "ssl_ca_cert",        CF_QSTRING, NULL, 0, &ServerInfo.ssl_ca_cert },
-	{ "ssl_cert",           CF_QSTRING, NULL, 0, &ServerInfo.ssl_cert },   
-	{ "ssl_dh_params",      CF_QSTRING, NULL, 0, &ServerInfo.ssl_dh_params },
+	{ "ssl_private_key",    CF_QSTRING, NULL, 0, &ServerInfo.ssl_private_key },
+	{ "ssl_ca_cert",        CF_QSTRING, NULL, 0, &ServerInfo.ssl_ca_cert },
+	{ "ssl_cert",           CF_QSTRING, NULL, 0, &ServerInfo.ssl_cert },   
+	{ "ssl_dh_params",      CF_QSTRING, NULL, 0, &ServerInfo.ssl_dh_params },
 	{ "ssld_count",		CF_INT,	    NULL, 0, &ServerInfo.ssld_count },
 
 	{ "default_max_clients",CF_INT,     NULL, 0, &ServerInfo.default_max_clients },

File src/s_conf.c

 	if(ServerInfo.network_desc == NULL)
 		ServerInfo.network_desc = rb_strdup(NETWORK_DESC_DEFAULT);
 
-	if(ServerInfo.ssld_count < 1)
+	if(ServerInfo.ssld_count < 1)
 		ServerInfo.ssld_count = 1;
 
-	if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params))
-	{
-		ilog(L_MAIN, "WARNING: Unable to setup SSL.");
-		ssl_ok = 0;
-	} else {
-		ssl_ok = 1;
-		send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params);
-	}
-
-	if(ServerInfo.ssld_count > get_ssld_count())
-	{
-		int start = ServerInfo.ssld_count - get_ssld_count();
-		/* start up additional ssld if needed */
-		start_ssldaemon(start, ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params);
-				
+	if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params))
+	{
+		ilog(L_MAIN, "WARNING: Unable to setup SSL.");
+		ssl_ok = 0;
+	} else {
+		ssl_ok = 1;
+		send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params);
+	}
+
+	if(ServerInfo.ssld_count > get_ssld_count())
+	{
+		int start = ServerInfo.ssld_count - get_ssld_count();
+		/* start up additional ssld if needed */
+		start_ssldaemon(start, ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params);
+				
 	}
 
 	if((ConfigFileEntry.client_flood < CLIENT_FLOOD_MIN) ||
 	if(IsIOError(to))
 		return;
 
-	/* Something wants us to not send anything currently */
-	/* if(IsCork(to))
-		return; */
-
-	/* try to flush later when the write event resets this */
-	if(IsFlush(to))
+	/* Something wants us to not send anything currently */
+	/* if(IsCork(to))
+		return; */
+
+	/* try to flush later when the write event resets this */
+	if(IsFlush(to))
 		return;
 
 #ifdef USE_IODEBUG_HOOKS
 		}
 	}
 
-	if(rb_linebuf_len(&to->localClient->buf_sendq))
-	{
-		SetFlush(to);
-		rb_setselect(to->localClient->F, RB_SELECT_WRITE,
-			       send_queued_write, to);
-	}
-	else
+	if(rb_linebuf_len(&to->localClient->buf_sendq))
+	{
+		SetFlush(to);
+		rb_setselect(to->localClient->F, RB_SELECT_WRITE,
+			       send_queued_write, to);
+	}
+	else
 		ClearFlush(to);
 }
 
-void
-send_pop_queue(struct Client *to)
-{
-	if(to->from != NULL)
-		to = to->from;
-	if(!MyConnect(to) || IsIOError(to))
-		return;
-	if(rb_linebuf_len(&to->localClient->buf_sendq) > 0)
-		send_queued(to);
+void
+send_pop_queue(struct Client *to)
+{
+	if(to->from != NULL)
+		to = to->from;
+	if(!MyConnect(to) || IsIOError(to))
+		return;
+	if(rb_linebuf_len(&to->localClient->buf_sendq) > 0)
+		send_queued(to);
 }
 
 /* send_queued_write()