diff options
-rwxr-xr-x | autogen.sh | 17 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/gnutls_cache.c | 9 | ||||
-rw-r--r-- | src/mod_gnutls.c | 1 |
4 files changed, 13 insertions, 20 deletions
@@ -1,25 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if [ -z $ACLOCAL ]; then | ||
4 | ACLOCAL=aclocal | ||
5 | fi | ||
6 | if [ -z $AUTOCONF ]; then | ||
7 | AUTOCONF=autoconf | ||
8 | fi | ||
9 | if [ -z $AUTOHEADER ]; then | ||
10 | AUTOHEADER=autoheader | ||
11 | fi | ||
12 | if [ -z $AUTORECONF ]; then | 3 | if [ -z $AUTORECONF ]; then |
13 | AUTORECONF=autoreconf | 4 | AUTORECONF=autoreconf |
14 | fi | 5 | fi |
15 | 6 | ||
16 | #rm -rf autom4te.cache | 7 | #rm -rf autom4te.cache |
17 | $AUTORECONF -f -i | 8 | $AUTORECONF -f -v -i |
18 | #touch stamp-h.in | 9 | #touch stamp-h.in |
19 | 10 | ||
20 | for x in providers/*; do | ||
21 | if [ -e $x/autogen.sh ]; then | ||
22 | echo Generating Config files in $x | ||
23 | (cd $x; ./autogen.sh $*) | ||
24 | fi | ||
25 | done | ||
diff --git a/configure.ac b/configure.ac index 5345dc8..1e3e91c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -47,13 +47,15 @@ AC_ARG_ENABLE(srp, | |||
47 | AS_HELP_STRING([--disable-srp], | 47 | AS_HELP_STRING([--disable-srp], |
48 | [unconditionally disable the SRP functionality]), | 48 | [unconditionally disable the SRP functionality]), |
49 | use_srp=$enableval, use_srp=yes) | 49 | use_srp=$enableval, use_srp=yes) |
50 | |||
51 | SRP_CFLAGS="" | ||
50 | if test "$use_srp" != "no"; then | 52 | if test "$use_srp" != "no"; then |
51 | AC_DEFINE_UNQUOTED(ENABLE_SRP, 1, [whether to enable SRP]) | 53 | SRP_CFLAGS="-DENABLE_SRP=1" |
52 | fi | 54 | fi |
53 | AC_MSG_CHECKING([whether to enable SRP functionality]) | 55 | AC_MSG_CHECKING([whether to enable SRP functionality]) |
54 | AC_MSG_RESULT($use_srp) | 56 | AC_MSG_RESULT($use_srp) |
55 | 57 | ||
56 | MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES}" | 58 | MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES}" |
57 | MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}" | 59 | MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}" |
58 | 60 | ||
59 | AC_SUBST(MODULE_CFLAGS) | 61 | AC_SUBST(MODULE_CFLAGS) |
diff --git a/src/gnutls_cache.c b/src/gnutls_cache.c index 83e7bb5..90f5a86 100644 --- a/src/gnutls_cache.c +++ b/src/gnutls_cache.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /** | 1 | /** |
2 | * Copyright 2004-2005 Paul Querna | 2 | * Copyright 2004-2005 Paul Querna |
3 | * Portions Copyright 2008 Nikos Mavrogiannopoulos | ||
3 | * | 4 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 6 | * you may not use this file except in compliance with the License. |
@@ -345,6 +346,7 @@ static int dbm_cache_expire(mgs_handle_t *ctxt) | |||
345 | break; | 346 | break; |
346 | } | 347 | } |
347 | } | 348 | } |
349 | apr_dbm_freedatum( dbm, dbmval); | ||
348 | 350 | ||
349 | } | 351 | } |
350 | apr_dbm_nextkey(dbm, &dbmkey); | 352 | apr_dbm_nextkey(dbm, &dbmkey); |
@@ -401,20 +403,25 @@ static gnutls_datum_t dbm_cache_fetch(void* baton, gnutls_datum_t key) | |||
401 | } | 403 | } |
402 | 404 | ||
403 | if (dbmval.dptr == NULL || dbmval.dsize <= sizeof(apr_time_t)) { | 405 | if (dbmval.dptr == NULL || dbmval.dsize <= sizeof(apr_time_t)) { |
406 | apr_dbm_freedatum( dbm, dbmval); | ||
404 | apr_dbm_close(dbm); | 407 | apr_dbm_close(dbm); |
405 | return data; | 408 | return data; |
406 | } | 409 | } |
407 | apr_dbm_close(dbm); | ||
408 | 410 | ||
409 | data.size = dbmval.dsize - sizeof(apr_time_t); | 411 | data.size = dbmval.dsize - sizeof(apr_time_t); |
410 | 412 | ||
411 | data.data = gnutls_malloc(data.size); | 413 | data.data = gnutls_malloc(data.size); |
412 | if (data.data == NULL) { | 414 | if (data.data == NULL) { |
415 | apr_dbm_freedatum( dbm, dbmval); | ||
416 | apr_dbm_close(dbm); | ||
413 | return data; | 417 | return data; |
414 | } | 418 | } |
415 | 419 | ||
416 | memcpy(data.data, dbmval.dptr+sizeof(apr_time_t), data.size); | 420 | memcpy(data.data, dbmval.dptr+sizeof(apr_time_t), data.size); |
417 | 421 | ||
422 | apr_dbm_freedatum( dbm, dbmval); | ||
423 | apr_dbm_close(dbm); | ||
424 | |||
418 | return data; | 425 | return data; |
419 | } | 426 | } |
420 | 427 | ||
diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c index a8363fe..cc760e6 100644 --- a/src/mod_gnutls.c +++ b/src/mod_gnutls.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include "mod_gnutls.h" | 18 | #include "mod_gnutls.h" |
19 | 19 | ||
20 | |||
21 | static void gnutls_hooks(apr_pool_t * p) | 20 | static void gnutls_hooks(apr_pool_t * p) |
22 | { | 21 | { |
23 | ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL, | 22 | ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL, |