From 8816678a26a56569ea9f21f3e30281f7ad4dcf6f Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 31 Jul 2007 12:10:32 +0000 Subject: [PATCH] kes Fix configure so that it puts config.out in the cwd rather than in src/qt-console kes Attempt to fix the locking problem reported by Eric in bug #906. kes Make berrno class to leave errno unchanged after constructor call. kes Make bnet_server use the heap rather than the stack to allocate its socket fd pointers to avoid a crash at termination. Problem reported by Ryan Novosielski and bugs pointed out by Martin Simmons. 30Jul07 kes Create new depkgs and depkgs-qt separating the qwt out of depkgs and putting it in depkgs-qt along with Qt4.3. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5269 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 2 +- bacula/configure | 2 +- bacula/src/lib/berrno.h | 1 + bacula/src/lib/bnet_server.c | 3 +-- bacula/src/stored/acquire.c | 2 +- bacula/src/version.h | 4 ++-- bacula/technotes-2.1 | 11 +++++++++++ 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index dd4264c5d8..9e2d02e7a9 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -2241,10 +2241,10 @@ chmod 755 src/win32/build-depkgs-mingw32 if test "${support_bat}" = "yes" ; then cd src/qt-console - a=`pwd` chmod 755 install_conf_file build-depkgs-qt-console echo "Creating bat Makefile" qmake + cd ${BUILD_DIR} fi diff --git a/bacula/configure b/bacula/configure index 01602b2fb1..faf475fd16 100755 --- a/bacula/configure +++ b/bacula/configure @@ -35905,10 +35905,10 @@ chmod 755 src/win32/build-depkgs-mingw32 if test "${support_bat}" = "yes" ; then cd src/qt-console - a=`pwd` chmod 755 install_conf_file build-depkgs-qt-console echo "Creating bat Makefile" qmake + cd ${BUILD_DIR} fi diff --git a/bacula/src/lib/berrno.h b/bacula/src/lib/berrno.h index 7cd5016670..039f93063d 100644 --- a/bacula/src/lib/berrno.h +++ b/bacula/src/lib/berrno.h @@ -78,6 +78,7 @@ inline berrno::berrno(int pool) #ifdef HAVE_WIN32 format_win32_message(); #endif + errno = m_berrno; } inline berrno::~berrno() diff --git a/bacula/src/lib/bnet_server.c b/bacula/src/lib/bnet_server.c index 95cbc2f93a..76d58a2162 100644 --- a/bacula/src/lib/bnet_server.c +++ b/bacula/src/lib/bnet_server.c @@ -96,8 +96,7 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq, Dmsg1(100, "Addresses %s\n", build_addresses_str(addrs, allbuf, sizeof(allbuf))); foreach_dlist(p, addrs) { - /* Allocate on stack frame -- no need to free */ - fd_ptr = (s_sockfd *)alloca(sizeof(s_sockfd)); + fd_ptr = (s_sockfd *)malloc(sizeof(s_sockfd)); fd_ptr->port = p->get_port_net_order(); /* * Open a TCP socket diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 51827a3351..f1efa71188 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -133,9 +133,9 @@ bool acquire_device_for_read(DCR *dcr) stat = search_res_for_device(rctx); release_reserve_messages(jcr); /* release queued messages */ unlock_reservations(); + dev->dblock(BST_DOING_ACQUIRE); if (stat == 1) { dcr->VolumeName[0] = 0; - dev->dblock(BST_DOING_ACQUIRE); Jmsg(jcr, M_INFO, 0, _("Media Type change. New device %s chosen.\n"), dev->print_name()); bstrncpy(dcr->VolumeName, vol->VolumeName, sizeof(dcr->VolumeName)); diff --git a/bacula/src/version.h b/bacula/src/version.h index ab8365e800..2674f5bf87 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.1.29" -#define BDATE "29 July 2007" -#define LSMDATE "29Jul07" +#define BDATE "31 July 2007" +#define LSMDATE "31Jul07" #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n" #define BYEAR "2007" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index c951df563d..39979af2ff 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,17 @@ Technical notes on version 2.1 General: +31Jul07 +kes Fix configure so that it puts config.out in the cwd rather than + in src/qt-console +kes Attempt to fix the locking problem reported by Eric in bug #906. +kes Make berrno class to leave errno unchanged after constructor call. +kes Make bnet_server use the heap rather than the stack to allocate + its socket fd pointers to avoid a crash at termination. Problem + reported by Ryan Novosielski and bugs pointed out by Martin Simmons. +30Jul07 +kes Create new depkgs and depkgs-qt separating the qwt out of depkgs + and putting it in depkgs-qt along with Qt4.3. 29Jul07 kes Rework code in acquire.c that switches drives for reading when the Media Type does not match. This should fix bug #906 -- 2.39.5