diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-05-17 12:24:36 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-05-17 12:24:36 +0200 |
commit | 61aecee532a9da6d7acc277051142e393872eaa4 (patch) | |
tree | 87735fa7e182fbf2bf116ce738cef6630204c7d8 | |
parent | d4719a9b32f3fc1b3c180ba0eed0baa8a0454dc2 (diff) | |
download | knot-61aecee532a9da6d7acc277051142e393872eaa4.tar.gz |
Imported Upstream version 1.0.5upstream/1.0.5
-rw-r--r-- | RELNOTES | 7 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/knot/server/journal.c | 18 |
4 files changed, 32 insertions, 15 deletions
@@ -1,3 +1,10 @@ +v1.0.5 - May 17, 2012 +--------------------- + +Bugfixes: + * Fixed bug with creating journal files. + + v1.0.4 - May 16, 2012 --------------------- @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for knot 1.0.4. +# Generated by GNU Autoconf 2.68 for knot 1.0.5. # # Report bugs to <knot-dns@labs.nic.cz>. # @@ -570,8 +570,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='knot' PACKAGE_TARNAME='knot' -PACKAGE_VERSION='1.0.4' -PACKAGE_STRING='knot 1.0.4' +PACKAGE_VERSION='1.0.5' +PACKAGE_STRING='knot 1.0.5' PACKAGE_BUGREPORT='knot-dns@labs.nic.cz' PACKAGE_URL='' @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures knot 1.0.4 to adapt to many kinds of systems. +\`configure' configures knot 1.0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1373,7 +1373,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of knot 1.0.4:";; + short | recursive ) echo "Configuration of knot 1.0.5:";; esac cat <<\_ACEOF @@ -1491,7 +1491,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -knot configure 1.0.4 +knot configure 1.0.5 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2041,7 +2041,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by knot $as_me 1.0.4, which was +It was created by knot $as_me 1.0.5, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2859,7 +2859,7 @@ fi # Define the identity of the package. PACKAGE='knot' - VERSION='1.0.4' + VERSION='1.0.5' cat >>confdefs.h <<_ACEOF @@ -15070,7 +15070,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by knot $as_me 1.0.4, which was +This file was extended by knot $as_me 1.0.5, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15136,7 +15136,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -knot config.status 1.0.4 +knot config.status 1.0.5 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1f413cc..2410e0a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- AC_PREREQ([2.65]) -AC_INIT([knot], [1.0.4], [knot-dns@labs.nic.cz]) +AC_INIT([knot], [1.0.5], [knot-dns@labs.nic.cz]) AM_INIT_AUTOMAKE([gnu -Wall -Werror]) AC_CONFIG_SRCDIR([src/knot/main.c]) AC_CONFIG_HEADERS([src/config.h]) diff --git a/src/knot/server/journal.c b/src/knot/server/journal.c index 9203f79..f901837 100644 --- a/src/knot/server/journal.c +++ b/src/knot/server/journal.c @@ -434,6 +434,12 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag /* Open journal file for r/w (returns error if not exists). */ int fd = open(fn, O_RDWR); if (fd < 0) { + if (errno == ENOENT) { + if(journal_create(fn, JOURNAL_NCOUNT) == KNOTD_EOK) { + return journal_open(fn, fslimit, mode, bflags); + } + } + return NULL; } @@ -479,8 +485,10 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag "it will be flushed.\n", fn); fcntl(fd, F_SETLK, &fl); close(fd); - journal_create(fn, JOURNAL_NCOUNT); - return journal_open(fn, fslimit, mode, bflags); + if (journal_create(fn, JOURNAL_NCOUNT) == KNOTD_EOK) { + return journal_open(fn, fslimit, mode, bflags); + } + return NULL; } crc_t crc = 0; if (!sfread(&crc, sizeof(crc_t), fd)) { @@ -506,8 +514,10 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag "it will be flushed.\n", fn); fcntl(fd, F_SETLK, &fl); close(fd); - journal_create(fn, JOURNAL_NCOUNT); - return journal_open(fn, fslimit, mode, bflags); + if (journal_create(fn, JOURNAL_NCOUNT) == KNOTD_EOK) { + return journal_open(fn, fslimit, mode, bflags); + } + return NULL; } /* Check for lazy mode. */ |