Module: ngircd.git
Branch: master
Commit: 05cc9bf9b064c7048f6b197462a686c5a9100798
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=05cc9bf9…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Jan 6 03:26:24 2012 +0100
Conn_Write(): Make sure there is a client when detecting its type
The assert(client != NULL) got triggered during our tests, so there is
an error path that resulted in the connection being still established
(sock >= 0) but the client structure already freed.
So Conn_Write() should handle it!
---
src/ngircd/conn.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index d9d73e8..5f3c18a 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -936,22 +936,25 @@ Conn_Write( CONN_ID Idx, char *Data, size_t Len )
assert( Data != NULL );
assert( Len > 0 );
- c = Conn_GetClient(Idx);
- assert( c != NULL);
-
- /* Servers do get special write buffer limits, so they can generate
- * all the messages that are required while peering. */
- if (Client_Type(c) == CLIENT_SERVER)
- writebuf_limit = WRITEBUFFER_SLINK_LEN;
-
/* Is the socket still open? A previous call to Conn_Write()
* may have closed the connection due to a fatal error.
* In this case it is sufficient to return an error, as well. */
- if( My_Connections[Idx].sock <= NONE ) {
+ if (My_Connections[Idx].sock <= NONE) {
LogDebug("Skipped write on closed socket (connection %d).", Idx);
return false;
}
+ /* Make sure that there still exists a CLIENT structure associated
+ * with this connection and check if this is a server or not: */
+ c = Conn_GetClient(Idx);
+ if (c) {
+ /* Servers do get special write buffer limits, so they can
+ * generate all the messages that are required while peering. */
+ if (Client_Type(c) == CLIENT_SERVER)
+ writebuf_limit = WRITEBUFFER_SLINK_LEN;
+ } else
+ LogDebug("Write on socket without client (connection %d)!?", Idx);
+
#ifdef ZLIB
if ( Conn_OPTION_ISSET( &My_Connections[Idx], CONN_ZIP )) {
/* Compressed link:
Module: ngircd.git
Branch: master
Commit: cc06e1ff89ae4b7ffc8d95a8ab1d9b6787a5d142
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=cc06e1ff…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Jan 6 02:26:04 2012 +0100
Proc_Close(): Only close socket if it is still valid
It could be invalid when calling Proc_Close() a 2nd time, for exmaple,
which could happen when we hit a timeout doing IDENT requests :-(
---
src/ngircd/proc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/proc.c b/src/ngircd/proc.c
index 7addb47..e062cd0 100644
--- a/src/ngircd/proc.c
+++ b/src/ngircd/proc.c
@@ -154,7 +154,10 @@ Proc_Read(PROC_STAT *proc, void *buffer, size_t buflen)
GLOBAL void
Proc_Close(PROC_STAT *proc)
{
- io_close(proc->pipe_fd);
+ /* Close socket, if it exists */
+ if (proc->pipe_fd >= 0)
+ io_close(proc->pipe_fd);
+
Proc_InitStruct(proc);
}
Module: ngircd.git
Branch: master
Commit: e0f8ce093ad2cc389fe8ffd404addaf609451b3f
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e0f8ce09…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Jan 4 23:30:55 2012 +0100
README: update features list, borrow from list on our website
---
README | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/README b/README
index f9b3662..1ea96ef 100644
--- a/README
+++ b/README
@@ -44,12 +44,14 @@ WHOIS, WHOWAS.
III. Features (or: why use ngIRCd?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- no problems with servers which have dynamic IP addresses
-- simple, easy understandable configuration file,
-- freely published open-source C source code,
-- ngIRCd will be developed on in the future.
+- well arranged (lean) configuration file
+- simple to build/install, configure and maintain
+- supports IPv6 and SSL
+- no problems with servers that have dynamic IP addresses
+- freely available, modern, portable and tidy C-source
- wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
IRIX, Linux, Mac OS X, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
+- ngIRCd is being actively developed since 2001.
IV. Documentation