Module: ngircd.git
Branch: master
Commit: b3a6c33da0b12ba74dc395979b677813d4bc2c0f
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b3a6c33d…
Author: Florian Westphal <fw(a)strlen.de>
Date: Sat May 29 13:06:19 2010 +0200
configure: make implicit declarations fatal
from bugzilla #105:
"ngircd-16 works great under openbsd4.7/i386, but it segfaults on
openbsd4.7/amd64."
Caused by missing function prototypes and the resulting truncation of
pointer to int.
Lets try to catch these bugs during compilation instead of SIGSEGV.
---
configure.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index 6d9312d..8526af6 100644
--- a/configure.in
+++ b/configure.in
@@ -542,6 +542,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
# Add additional CFLAGS, eventually specified on the command line, but after
# running this configure script. Useful for "-Werror" for example.
+test "$GCC" = "yes" && CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
# -- Generate files --
Module: ngircd.git
Branch: master
Commit: 10657f88819f5caa8c43d68474dff299816b0db1
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=10657f88…
Author: Florian Westphal <fw(a)strlen.de>
Date: Sat May 29 13:06:19 2010 +0200
configure: make implicit declarations fatal
from bugzilla #105:
"ngircd-16 works great under openbsd4.7/i386, but it segfaults on
openbsd4.7/amd64."
Caused by missing function prototypes and the resulting truncation of
pointer to int.
Lets try to catch these bugs during compilation instead of SIGSEGV.
---
configure.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 6d9312d..5e90f09 100644
--- a/configure.in
+++ b/configure.in
@@ -542,7 +542,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
# Add additional CFLAGS, eventually specified on the command line, but after
# running this configure script. Useful for "-Werror" for example.
-test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration $CFLAGS_END"
# -- Generate files --
Module: ngircd.git
Branch: master
Commit: 55190f2d3ddf9b4bd43b0555df784c95eed82390
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=55190f2d…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat May 22 17:03:54 2010 +0200
Don't access already freed memory in IRC_KILL()
It is not possible to call Conn_Close() after Client_Destroy() has been
called, because Conn_Close wants to access the CLIENT structure which
then has been freed already.
Fix IRC_KILL to use Conn_Close() for local clients and Client_Destroy()
for remote clients only (and never both).
---
src/ngircd/irc.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index b4db3b7..0cb9a6e 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -160,11 +160,15 @@ IRC_KILL( CLIENT *Client, REQUEST *Req )
Client_Type( c ), Req->argv[0] );
}
- /* Kill client NOW! */
+ /* Kill the client NOW:
+ * - Close the local connection (if there is one),
+ * - Destroy the CLIENT structure for remote clients.
+ * Note: Conn_Close() removes the CLIENT structure as well. */
conn = Client_Conn( c );
- Client_Destroy( c, NULL, reason, false );
- if( conn > NONE )
- Conn_Close( conn, NULL, reason, true );
+ if(conn > NONE)
+ Conn_Close(conn, NULL, reason, true);
+ else
+ Client_Destroy(c, NULL, reason, false);
}
else
Log( LOG_NOTICE, "Client with nick \"%s\" is unknown here.", Req->argv[0] );
Module: ngircd.git
Branch: master
Commit: 6dc80bd195ad0760bb560177d6f91c86b7698758
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=6dc80bd1…
Author: Florian Westphal <fw(a)strlen.de>
Date: Fri May 14 19:43:08 2010 +0200
fix "beeing" typo
reported by Fabio Scotoni via bugzilla #101.
---
src/ngircd/irc-login.c | 2 +-
src/ngircd/irc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index 2de4bd5..c8b44db 100644
--- a/src/ngircd/irc-login.c
+++ b/src/ngircd/irc-login.c
@@ -356,7 +356,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
* RFC 1459: announce the new client only after receiving the
* USER command, first we need more information! */
if (Req->argc < 7) {
- LogDebug("Client \"%s\" is beeing registered (RFC 1459) ...",
+ LogDebug("Client \"%s\" is being registered (RFC 1459) ...",
Client_Mask(c));
Client_SetType(c, CLIENT_GOTNICK);
} else
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 67ad2a6..b4db3b7 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -70,7 +70,7 @@ IRC_ERROR( CLIENT *Client, REQUEST *Req )
* disconnect clients. It can be used by IRC operators and servers, for example
* to "solve" nick collisions after netsplits.
* Please note that this function is also called internally, without a real
- * KILL command beeing received over the network! Client is Client_ThisServer()
+ * KILL command being received over the network! Client is Client_ThisServer()
* in this case. */
GLOBAL bool
IRC_KILL( CLIENT *Client, REQUEST *Req )