From 03ee43ca89edaf4dfa79412dc91aa89694634445 Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Sun, 15 Nov 2009 20:14:28 +0000 Subject: [PATCH] [BUG] fatal() on nick change on gamesurge network Some time gamesurge sends a "foo NICK :foo" which we didn't handle correctly. --- configure.ac | 6 +++--- src/util.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 67ae587..f81b667 100644 --- a/configure.ac +++ b/configure.ac @@ -60,12 +60,12 @@ AS_IF([test "x$enable_debug" = "xyes"], [ ]) AM_CONDITIONAL(OIDENTD, test x$enable_identd = xyes) AS_IF([test "x$with_openssl" != "xno"], [ + AC_CHECK_LIB(ssl, SSL_read, [], [ + AC_MSG_ERROR([library 'ssl' is required for OpenSSL support]) + ], -lssl) AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [ AC_MSG_ERROR([library 'crypto' is required for OpenSSL support]) ], -lcrypto) - AC_CHECK_LIB(ssl, SSL_read, [with_openssl=yes], [ - AC_MSG_ERROR([library 'ssl' is required for OpenSSL support]) - ]) ]) AC_CONFIG_FILES([Makefile]) diff --git a/src/util.c b/src/util.c index 3881057..d8bf50d 100644 --- a/src/util.c +++ b/src/util.c @@ -723,6 +723,8 @@ list_t *hash_keys(hash_t *hash) void hash_rename_key(hash_t *h, const char *oldk, const char *newk) { assert(h && oldk && newk); + if (strcmp(oldk, newk) == 0) + return; hash_insert(h, newk, hash_remove(h, oldk)); }