]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
Update #include's: remove unused and add missing ones
[ngircd-alex.git] / src / ngircd / conn.c
index fef568e4a17094b2513b9fbc9a722ed18a83f3d2..75b77942d966858da2200fd6e7cb660b981b141b 100644 (file)
 #define CONN_MODULE
 
 #include "portab.h"
-#include "conf-ssl.h"
-#include "io.h"
 
 /**
  * @file
  * Connection management
  */
 
-#include "imp.h"
 #include <assert.h>
 #ifdef PROTOTYPES
 # include <stdarg.h>
@@ -34,8 +31,9 @@
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/socket.h>
-#include <sys/time.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <time.h>
 #include <netinet/in.h>
 # include <tcpd.h>                     /* for TCP Wrappers */
 #endif
 
-#include "array.h"
-#include "defines.h"
-
-#include "exp.h"
 #include "conn.h"
 
-#include "imp.h"
 #include "ngircd.h"
-#include "array.h"
-#include "client.h"
 #include "class.h"
-#include "conf.h"
-#include "conn-encoding.h"
+#ifdef ICONV
+# include "conn-encoding.h"
+#endif
 #include "conn-ssl.h"
 #include "conn-zip.h"
 #include "conn-func.h"
+#include "io.h"
 #include "log.h"
 #include "ng_ipaddr.h"
 #include "parse.h"
 #include "resolve.h"
-#include "tool.h"
-
-#include "exp.h"
-
 
 #define SERVER_WAIT (NONE - 1)
 
@@ -84,7 +73,6 @@
 
 #define SD_LISTEN_FDS_START 3
 
-
 static bool Handle_Write PARAMS(( CONN_ID Idx ));
 static bool Conn_Write PARAMS(( CONN_ID Idx, char *Data, size_t Len ));
 static int New_Connection PARAMS(( int Sock, bool IsSSL ));
@@ -100,7 +88,6 @@ static void Simple_Message PARAMS(( int Sock, const char *Msg ));
 static int NewListener PARAMS(( const char *listen_addr, UINT16 Port ));
 static void Account_Connection PARAMS((void));
 
-
 static array My_Listeners;
 static array My_ConnArray;
 static size_t NumConnections, NumConnectionsMax, NumConnectionsAccepted;
@@ -811,16 +798,6 @@ SSL_WantWrite(const CONNECTION *c)
        return false;
 }
 
-#else
-
-static inline bool
-SSL_WantRead(UNUSED const CONNECTION *c)
-{ return false; }
-
-static inline bool
-SSL_WantWrite(UNUSED const CONNECTION *c)
-{ return false; }
-
 #endif
 
 
@@ -883,8 +860,10 @@ Conn_Handler(void)
                        if (wdatalen > 0)
 #endif
                        {
+#ifdef SSL_SUPPORT
                                if (SSL_WantRead(&My_Connections[i]))
                                        continue;
+#endif
                                io_event_add(My_Connections[i].sock,
                                             IO_WANTWRITE);
                        }