Commit Graph

240 Commits

Author SHA1 Message Date
Florian Westphal 93df629b69 changed connection structure to array-api 2006-02-16 19:21:57 +00:00
Florian Westphal 66060dbce9 new Function: LogDebug() 2006-02-08 17:33:28 +00:00
Florian Westphal a17745d6d7 Make connid same as connection fd. 2006-02-08 15:20:21 +00:00
Florian Westphal 1249acfdba removed obsolete "int Conn_MaxFD" 2006-02-02 21:00:21 +00:00
Florian Westphal 4b2f966b7e Fix Bugzilla #64 -- ngicrd did not reconnect to other servers after failed forward dns lookup. 2005-12-09 09:26:55 +00:00
Alexander Barton 6b21249151 Remove direct call of Conf_UnsetServer(): it's already indirectly called
by Conn_Close() a few lines above.
2005-11-21 15:06:37 +00:00
Alexander Barton bc09a3e487 Changed Handle_Write() to not close sockets itself but to call Conn_Close. 2005-10-11 19:29:23 +00:00
Florian Westphal b65358b17c avoid 2nd time() call in Check_Servers(), improve comments 2005-09-24 02:48:46 +00:00
Florian Westphal e9f3e69f36 use io_close instead of plain close in Conn_ExitListeners() 2005-09-24 02:20:00 +00:00
Florian Westphal 5b2364b236 merge new resolver code 2005-09-12 19:10:20 +00:00
Florian Westphal 4db29b0076 Minimal changes (needed for merging resolver changes) 2005-09-11 11:42:48 +00:00
Florian Westphal 468a1c7767 Handle_Write(): Report write attempts on closed sockets when in debug mode. 2005-09-05 09:10:08 +00:00
Florian Westphal cae9a3aee5 small formatting change 2005-09-02 17:01:23 +00:00
Alexander Barton af9123fd82 Cleaned up some code, comments and log/debug messages. 2005-09-02 13:28:30 +00:00
Florian Westphal c65343e719 reformatted a few lines. 2005-08-30 22:08:00 +00:00
Alexander Barton c12dc45f17 Added prefix to connection statistic NOTICE. 2005-08-29 11:11:15 +00:00
Florian Westphal 58b8fb5d12 remove unneeded variable "bool action" 2005-08-28 16:51:20 +00:00
Florian Westphal 2f105b1c0a if the request is empty, remove \r\n (or single \n or \r) from receive buffer. 2005-08-28 00:19:29 +00:00
Florian Westphal a2cdc08c39 fix handling of empty requests 2005-08-27 23:42:23 +00:00
Alexander Barton e728bd2e1a Changed handling of timeouts for unregistered connections: don't reset
the counter if data is received and disconnect clients earlier.
2005-08-27 23:33:10 +00:00
Alexander Barton c2f5399b51 Fixed format string bug in "connection statistics" message; code cleanups. 2005-08-15 23:02:40 +00:00
Alexander Barton 1c14e2e0a2 Removed some line feeds in debug statements. 2005-08-02 22:48:57 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +00:00
Florian Westphal 51ccb5928a internal changes needed for future ssl support 2005-07-29 09:29:47 +00:00
Florian Westphal 46a191caf6 changed RES_STAT buffer to array 2005-07-28 16:13:09 +00:00
Alexander Barton 74cb2e2768 Eliminate some compiler warnings ("unused parameter"). 2005-07-22 21:31:05 +00:00
Florian Westphal efbfe4ae83 removed unneeded variable "bsize" 2005-07-13 16:06:55 +00:00
Florian Westphal c92e57fec3 add better error checks for io_ routines 2005-07-12 20:44:46 +00:00
Florian Westphal 248d75e566 fix embarassing buffer-off-by one 2005-07-11 20:58:05 +00:00
Florian Westphal 4715b17106 make Conn_NewListener local to conn.c 2005-07-11 14:56:38 +00:00
Florian Westphal 70facb7f6e made a few config options unsigned. 2005-07-11 14:11:35 +00:00
Florian Westphal e50d049074 minor cosmetic changes 2005-07-09 21:35:20 +00:00
Alexander Barton 02b0a51517 Renamed "Rendezvous" to "Zeroconf". 2005-07-08 16:18:38 +00:00
Florian Westphal 0d180a913f use new io event API. 2005-07-07 18:49:04 +00:00
Alexander Barton 9a6b6f527b Handle oversized messages which should be sent to the network better. 2005-07-02 14:36:03 +00:00
Alexander Barton 0e3ce63ec1 Fix compiler warning "comparision between signed and unsigned". 2005-06-26 13:43:59 +00:00
Florian Westphal 1cf8ccd8fe Make sure SimpleMessage() sends <= 512 chars 2005-06-12 17:21:46 +00:00
Alexander Barton 5195555c5a Removed CONNECTION[].starttime, now saved in CLIENT structure. 2005-06-12 16:28:55 +00:00
Florian Westphal ae98008c1c remove Try_Write(), Call Handle_Write() directly instead. 2005-06-04 11:49:20 +00:00
Florian Westphal 8ac701d6c8 add FreeRes_stat(), wait for resolver timeout. 2005-06-01 21:28:50 +00:00
Alexander Barton cd0dc8627d Don't exit server if closing of a socket fails; instead ignore it and
pray that this will be "the right thing" ...
2005-05-22 23:55:57 +00:00
Florian Westphal e7c2c86aee removed "my_connects" fd_set. 2005-04-23 14:28:44 +00:00
Florian Westphal 8304210c06 fix spelling 2005-04-16 20:50:03 +00:00
Florian Westphal b4363162ce s/malloc(x*y)/calloc(x,y)/ 2005-04-16 09:19:49 +00:00
Florian Westphal 326607eea1 changed type of Conf_ListenPorts[] from "unsigned int" to UINT16. 2005-03-20 13:54:06 +00:00
Florian Westphal bfba1f37ed Init_Conn_Struct(): Zero structure using memset(). 2005-03-20 11:00:31 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton a40a026d15 Fixed detection of IRC lines which are too long to send. Detected by
Florian Westphal, <westphal@foo.fh-furtwangen.de>.
2005-01-19 23:33:53 +00:00
Alexander Barton 429b5f3ec9 Fixed a memory leak when resizing the connection pool and realloc() failed.
Now we don't fall back to malloc(), which should be sane anyway.
Patch from Florian Westphal, <westphal@foo.fh-furtwangen.de>.
2005-01-17 11:57:39 +00:00
Alexander Barton 58736b3902 Fixed indentation and added some more debug code. 2004-12-22 17:37:41 +00:00
Alexander Barton c1f32e8214 Made ngIRCd compile on HP/UX 10.20 with native HP pre-ANSI C compiler and
most probably other older C compilers on other systems.
2004-10-20 13:47:32 +00:00
Alexander Barton eee2762852 Changed "read buffer" to "receive buffer" as suggested by Goetz. 2004-10-04 23:23:41 +00:00
Alexander Barton c79fa28a66 Added some missing words: "address" :-) 2004-10-04 23:09:04 +00:00
Alexander Barton a49a580a77 Fixed wrong buffer size calculation for resolver results. 2004-05-30 16:25:51 +00:00
Alexander Barton c23bbe6b65 Fixed a warning message of the compiler when not using IDENT lookups. 2004-05-11 00:53:14 +00:00
Alexander Barton 3012c232eb Fixed resolver when using IDENT lookups, cleaned up code. 2004-05-11 00:01:11 +00:00
Alexander Barton 1d8da4b525 Fixed a wrong assert() which could cause the daemon to exit spuriously
when closing down connections.
2004-04-25 14:06:11 +00:00
Alexander Barton cb76d96efb Fixed some warnings of non-gcc-compilers (e. g. original Apple compiler on
A/UX): "warning: illegal pointer combination, op =".
2004-03-11 22:16:31 +00:00
Alexander Barton 33f4e6763b Better logging while establishing and shutting down connections.
Results of the resolver are now discarded after the client is registered.
2004-02-28 02:01:01 +00:00
Alexander Barton b90bedbcb2 Fixed (optional) TCP Wrapper test which was broken and could result in
false results. Thanks to Fuminori Tanizaki <tany@mcnet.ad.jp>!
2004-02-03 20:28:30 +00:00
Alexander Barton bb98fd8c85 The type of service (TOS) of all sockets is set to "interactive" now. 2004-01-25 16:06:34 +00:00
Alexander Barton b79b315dd4 Added optional support for IDENT lookups (configure switch "--with-ident"). 2003-12-27 13:01:12 +00:00
Alexander Barton c40592d2ce Removed "USE_" prefixes of configuration #defines. 2003-12-26 15:55:07 +00:00
Alexander Barton 7b6e26628a Fixed and enhanced penalty handling; changed internal time resoluiton of
the server to one second. Code cleanup.
2003-11-05 23:24:48 +00:00
Alexander Barton 2981fe9eb7 New configuration option "MaxConnectionsIP". 2003-11-05 21:41:01 +00:00
Alexander Barton e33ab90379 New configuration option "Listen" to bind the server to a specific ip. 2003-09-11 12:05:28 +00:00
Alexander Barton b9f16c9635 Fixed typo in debug output. 2003-08-30 20:28:54 +00:00
Alexander Barton 83194a23a3 The server tried to connect to other servers only once when DNS or socket
failures occured.
2003-04-25 16:47:52 +00:00
Alexander Barton c3dfd63bf3 Fixed up some castings. 2003-04-21 10:52:26 +00:00
Alexander Barton 62796722f1 Changed all PACKAGE's to PACKAGE_NAME and all VERSION's to PACKAGE_VERSION. 2003-03-31 15:54:21 +00:00
Alexander Barton 59a0fb8cd9 New function Conn_SyncServerStruct(). 2003-03-27 01:20:22 +00:00
Alexander Barton e744936d19 New function Simple_Message(). Better error reporting to clients on connect. 2003-03-07 17:16:49 +00:00
Alexander Barton 439c945d56 Added support for TCP Wrappers. 2003-03-07 14:35:52 +00:00
Alexander Barton 29bd35bc4f - Added optional support for Rendezvous. 2003-02-23 12:04:05 +00:00
Alexander Barton cf4ad8d6f7 - Conn_Close() ignores recursive calls for the same link now. 2003-02-21 19:19:27 +00:00
Alexander Barton 9eee0c883b - Client structures are removed correctly now if an outgoing connection can't be estahlished. 2003-01-15 14:28:59 +00:00
Alexander Barton 8dadb17f83 - Changed "once"-server-config-flag into a generic flag.
- Changed semantics of "NGIRCd_Passive".
2002-12-31 16:13:29 +00:00
Alexander Barton b77dae3499 - Reorganized code for new modules "conn-func.c" and "conn-func.h". 2002-12-30 17:14:59 +00:00
Alexander Barton e68cdf304f - New source files "conn-zip.c" and "conn-zip.h". 2002-12-30 16:07:23 +00:00
Alexander Barton a2544e496c - Cleaned up handling of server configuration structures. 2002-12-30 00:01:42 +00:00
Alexander Barton e21b9d842c - If the server can't close a socket, it panics now.
- Quite enhanced logging :-)
2002-12-27 13:20:13 +00:00
Alexander Barton 695631b298 - replaced a lot of strcpy() calls with strlcpy() which is more secure. 2002-12-26 17:04:54 +00:00
Alexander Barton 6626395c88 - replaced a lot of strcat() calls with strlcat() which is more secure. 2002-12-26 16:48:14 +00:00
Alexander Barton 397c5e2e02 - renamed variables to fit new signal handler.
- moved call to NGIRCd_Rehash() to Conn_Handler().
2002-12-19 04:35:26 +00:00
Alexander Barton a02bf31d50 - new functions Conn_ResetWCounter() and Conn_WCounter(). 2002-12-18 13:50:22 +00:00
Alexander Barton 902ad91212 - new allocated connection structures will be initialized correctly now. 2002-12-17 11:46:54 +00:00
Alexander Barton 490f28ffd1 - new file header format (in english);
- new file ident semantics.
2002-12-12 12:24:18 +00:00
Alexander Barton 6591f17f0a - Logging von Verbindungen, die geschlossen werden/wurden verbessert. 2002-12-03 18:57:10 +00:00
Alexander Barton cde9dfdb77 - Verhalten von Conn_RecvQ() und Conn_SendQ() bei Kompression korrigiert. 2002-12-02 13:56:24 +00:00
Alexander Barton 39219230b2 - neue Befehle: Conn_StartTime(), Conn_SendQ(), Conn_RecvQ(), Conn_SendMsg(),
Conn_RecvMsg(), Conn_SendBytes[Zip](), Conn_RecvBytes[Zip]().
2002-12-02 13:19:37 +00:00
Alexander Barton a1437f1ad0 - der Server verschickt keine "NOTICE AUTH"'s mehr. 2002-11-29 17:36:50 +00:00
Alexander Barton 1d8cb34bc8 - "NOTICE AUTH" und Statistiken werden im Strict-RFC-Modus nicht mehr erzeugt. 2002-11-29 13:13:42 +00:00
Alexander Barton 93a39e8782 - Vor dem Schliessen einer Verbindung wird versucht, den Buffer zu leeren. 2002-11-28 16:56:20 +00:00
Alexander Barton d3a6537fce - beim Umschalten auf Kompression wurden evtl. bereits gelesene Daten nicht
entpackt, der Datenstrom war somit dann korrumpiert.
2002-11-28 12:17:38 +00:00
Alexander Barton 65f3adca21 - Unterstuetzung fuer komprimierte Server-Server-Links implementiert. 2002-11-26 23:07:24 +00:00
Alexander Barton 5ecb00ed23 - volle Lesebuffer und Timeouts behandelt Conn_Handle() nun besser.
- Handle_Buffer() liefert nun ein Ergebnis.
2002-11-23 17:04:07 +00:00
Alexander Barton 22b7b07932 - select() in Try_Write() hat falschen (keinen!) Timeout verwendet;
- der Timeout fuer das select() in Conn_Handler() ist nun TIME_RES (=2).
2002-11-23 16:09:57 +00:00
Alexander Barton a0c032b2ff - neue Funktionen Conn_InitListeners() und Conn_ExitListeners(). 2002-11-22 17:58:19 +00:00
Alexander Barton ffb90f4cb5 - Logging vom Resolver und Connection-Statistiken verbessert. 2002-11-22 16:35:19 +00:00
Alexander Barton c6b9f3a13d - angenommene Socketes werden nun korrekt auf "non-blocking" gestellt;
- beim Senden und Empfangen wird EAGAIN ("Blockierung") nun abgefangen.
2002-11-20 15:48:41 +00:00