Module: ngircd.git
Branch: master
Commit: d76910ce7b9fad5679b7c614ed086e036560e37d
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d76910ce…
Author: Florian Westphal <fw(a)strlen.de>
Date: Fri Sep 11 22:51:00 2009 +0200
conn.c: fix resolver server address backlog
if more than one ip address is returned for a single host
name, ngircd is supposed to try other addresses in case
connect() to the first address returned fails for some
reason.
Alexander Barton noticed that this did not work at all,
as the additional results were not stored.
---
src/ngircd/conn.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index d6ad1e7..cd5921a 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1826,7 +1826,8 @@ cb_Connect_to_Server(int fd, UNUSED short events)
size_t len;
ng_ipaddr_t dest_addrs[4]; /* we can handle at most 3; but we read up to
four so we can log the 'more than we can handle'
- condition */
+ condition. First result is tried immediately, rest
+ is saved for later if needed. */
LogDebug("Resolver: Got forward lookup callback on fd %d, events %d", fd, events);
@@ -1851,13 +1852,13 @@ cb_Connect_to_Server(int fd, UNUSED short events)
LogDebug("Got result from resolver: %u structs (%u bytes).", len/sizeof(ng_ipaddr_t), len);
- memset(&Conf_Server[i].dst_addr, 0, sizeof(&Conf_Server[i].dst_addr));
+ memset(&Conf_Server[i].dst_addr, 0, sizeof(Conf_Server[i].dst_addr));
if (len > sizeof(ng_ipaddr_t)) {
/* more than one address for this hostname, remember them
* in case first address is unreachable/not available */
len -= sizeof(ng_ipaddr_t);
- if (len > sizeof(&Conf_Server[i].dst_addr)) {
- len = sizeof(&Conf_Server[i].dst_addr);
+ if (len > sizeof(Conf_Server[i].dst_addr)) {
+ len = sizeof(Conf_Server[i].dst_addr);
Log(LOG_NOTICE,
"Notice: Resolver returned more IP Addresses for host than we can handle, additional addresses dropped.");
}
Module: ngircd.git
Branch: master
Commit: 933da741c6485e090990f296ad89e6173583829b
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=933da741…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Sep 2 14:28:09 2009 +0200
Fix --with-{openssl|gnutls} to accept path names
This patch fixes --with-openssl and --with-gnutls and enables both to
accept path names, so that you can use "./configure --with-XXX=/path".
All the other --with-XXX parameters support this already.
---
configure.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index d10f6ec..1940834 100644
--- a/configure.in
+++ b/configure.in
@@ -315,7 +315,7 @@ fi
AC_ARG_WITH(openssl,
[ --with-openssl enable SSL support using OpenSSL],
- [ if test "$withval" = "yes"; then
+ [ if test "$withval" != "no"; then
if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS"
CPPFLAGS="-I$withval/include $CPPFLAGS"
@@ -332,7 +332,7 @@ AC_ARG_WITH(openssl,
AC_ARG_WITH(gnutls,
[ --with-gnutls enable SSL support using gnutls],
- [ if test "$withval" = "yes"; then
+ [ if test "$withval" != "no"; then
if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS"
CPPFLAGS="-I$withval/include $CPPFLAGS"