General:
-Beta release 20Dec05:
Changes to 1.38.3:
20Dec05
+- Modify gui on command to set only GUI mode and not batch.
+- Modify .messages command to always print messages regardless
+ of the mode.
+- If GUI mode is on, suppress automatic printing of
+ You have messages.
+- Delete old bnet packet code.
+- Ignore new BNET_START_SELECT and BNET_END_SELECT signals in
+ wx-console.
+- Modify restore command in wx-console to set gui on and to use
+ only .messages instead of messages. Hopefully this fixes bug
+ #514.
+Beta release 20Dec05:
+20Dec05
- Fix seg fault in exit of acquire when canceling a job --
reported by Wolfgang Denk
19Dec05
Changes to 1.39.3:
20Dec05
+- Modify gui on command to set only GUI mode and not batch.
+- Modify .messages command to always print messages regardless
+ of the mode.
+- If GUI mode is on, suppress automatic printing of
+ You have messages.
+- Delete old bnet packet code.
+- Ignore new BNET_START_SELECT and BNET_END_SELECT signals in
+ wx-console.
+- Modify restore command in wx-console to set gui on and to use
+ only .messages instead of messages. Hopefully this fixes bug
+ #514.
+- Fix seg fault in exit of acquire when canceling a job --
+ reported by Wolfgang Denk
- Pull in latest reservation system changes from 1.38
- Make .messages command always print messages regardless
of the automessages flag.
export LDFLAGS=-L/usr/lib64/mysql
%endif
+%configure \
+ --prefix=/usr \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/bacula \
+ --with-scriptdir=/etc/bacula \
+ --enable-smartalloc \
+ --enable-client-only \
+ --enable-static-fd
+
+make
+
%configure \
--prefix=/usr \
--sbindir=/usr/sbin \
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
+
# install the init scripts
%if %{su9}
cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
+touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
+cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
+rm -f src/filed/static-bacula-fd
# now clean up permissions that are left broken by the install
chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
export LDFLAGS=-L/usr/lib64/mysql
%endif
+%configure \
+ --prefix=/usr \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/bacula \
+ --with-scriptdir=/etc/bacula \
+ --enable-smartalloc \
+ --enable-client-only \
+ --enable-static-fd
+
+make
+
%configure \
--prefix=/usr \
--sbindir=/usr/sbin \
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
+
# install the init scripts
%if %{su9}
cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
+touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
+cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
+rm -f src/filed/static-bacula-fd
# now clean up permissions that are left broken by the install
chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
export LDFLAGS=-L/usr/lib64/mysql
%endif
+%configure \
+ --prefix=/usr \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/bacula \
+ --with-scriptdir=/etc/bacula \
+ --enable-smartalloc \
+ --enable-client-only \
+ --enable-static-fd
+
+make
+
%configure \
--prefix=/usr \
--sbindir=/usr/sbin \
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
+
# install the init scripts
%if %{su9}
cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
+touch $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/rpm_release
+cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/linux/cdrom/bacula/bin/bacula-fd
+rm -f src/filed/static-bacula-fd
# now clean up permissions that are left broken by the install
chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
fd = jcr->file_bsock;
set_jcr_job_status(jcr, JS_Running);
-#ifdef xxx
- if (!send_include_list(jcr)) {
- restore_cleanup(jcr, JS_ErrorTerminated);
- return false;
- }
-
- if (!send_exclude_list(jcr)) {
- restore_cleanup(jcr, JS_ErrorTerminated);
- return false;
- }
-#endif
-
/*
* send Storage daemon address to the File daemon,
* then wait for File daemon to make connection
Copyright (C) 2000-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
bool quit; /* if set, quit */
bool verbose; /* set for normal UA verbosity */
bool batch; /* set for non-interactive mode */
+ bool gui; /* set if talking to GUI program */
uint32_t pint32_val; /* positive integer */
int32_t int32_val; /* positive/negative */
int64_t int64_val; /* big int */
switch (find_arg_keyword(ua, kw)) {
case 0:
- ua->auto_display_messages = 1;
+ ua->auto_display_messages = true;
break;
case 1:
- ua->auto_display_messages = 0;
+ ua->auto_display_messages = false;
break;
default:
bsendmsg(ua, _("ON or OFF keyword missing.\n"));
}
/*
- * Turn batch processing on/off
+ * Turn GUI mode on/off
*/
int gui_cmd(UAContext *ua, const char *cmd)
{
switch (find_arg_keyword(ua, kw)) {
case 0:
- ua->batch = true;
- ua->jcr->gui = true;
+ ua->jcr->gui = ua->gui = true;
break;
case 1:
- ua->batch = false;
- ua->jcr->gui = false;
+ ua->jcr->gui = ua->gui = false;
break;
default:
bsendmsg(ua, _("ON or OFF keyword missing.\n"));
do_truncate = true;
}
if (do_truncate) {
- ftruncate(fileno(con_fd), 0L);
+ (void)ftruncate(fileno(con_fd), 0L);
}
console_msg_pending = FALSE;
ua->user_notified_msg_pending = FALSE;
item = -1;
goto done;
}
+// bnet_sig(ua->UA_sock, BNET_START_SELECT);
bsendmsg(ua, ua->prompt[0]);
for (i=1; i < ua->num_prompts; i++) {
bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
}
+// bnet_sig(ua->UA_sock, BNET_END_SELECT);
for ( ;; ) {
/* First item is the prompt string, not the items */
pm_strcpy(ua->cmd, "messages");
qmessagescmd(ua, ua->cmd);
ua->user_notified_msg_pending = FALSE;
- } else if (!ua->user_notified_msg_pending && console_msg_pending) {
+ } else if (!ua->gui && !ua->user_notified_msg_pending && console_msg_pending) {
bsendmsg(ua, _("You have messages.\n"));
ua->user_notified_msg_pending = TRUE;
}
+++ /dev/null
-/*
- * Network Packet Utility Routines
- *
- * by Kern Sibbald, July MMII
- *
- *
- * Version $Id$
- */
-/*
- Copyright (C) 2002-2004 Kern Sibbald and John Walker
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- */
-
-#ifdef implemented
-
-#include "bacula.h"
-
-/*
- * Receive a message from the other end. Each message consists of
- * two packets. The first is a header that contains the size
- * of the data that follows in the second packet.
- * Returns number of bytes read
- * Returns 0 on end of file
- * Returns -1 on hard end of file (i.e. network connection close)
- * Returns -2 on error
- */
-int32_t
-bnet_recv_pkt(BSOCK *bsock, BPKT *pkt, int *version)
-{
- unser_declare;
- short lversion;
- int type;
-
- unser_begin(bsock->msg, 0);
- unser_uint16(lversion);
- *version = (int)lversion;
-
-
- for ( ; pkt->type != BP_EOF; pkt++) {
- if (pkt->id) {
- ser_int8(BP_ID);
- ser_string((char *)pkt->id);
- }
- ser_int8(pkt->type);
- switch (pkt->type) {
- case BP_CHAR:
- ser_int8(*(int8_t *)pkt->value);
- break;
- case BP_INT32:
- ser_int32(*(int32_t *)pkt->value);
- break;
- case BP_UINT32:
- break;
- ser_unit32(*(uint32_t *)pkt->value);
- break;
- case BP_INT64:
- ser_int64(*(int64_t *)pkt->value);
- break;
- case BP_BTIME:
- case BP_UTIME:
- case BP_UINT64:
- ser_uint64(*(uint64_t *)pkt->value);
- break;
- case BP_POOL:
- case BP_STRING:
- case BP_NAME:
- ser_string((char *)pkt->value);
- break;
- case BP_BYTES:
- ser_uint32(*(uint32_t *)pkt->len);
- ser_bytes((char *)pkt->value, pkt->len);
- break;
- default:
- Emsg1(M_ABORT, 0, _("Unknown BPKT type: %d\n"), pkt->type);
- }
- }
- unser_end(bsock->msg, 0);
-
-}
-
-/*
- * Send a message over the network. The send consists of
- * two network packets. The first is sends a 32 bit integer containing
- * the length of the data packet which follows.
- *
- * Returns: 0 on failure
- * 1 on success
- */
-int
-bnet_send_pkt(BSOCK *bsock, BPKT *pkt, int version)
-{
- ser_declare;
-
- ser_begin(bsock->msg, 0);
- ser_uint16(version);
-
- for ( ; pkt->type != BP_EOF; pkt++) {
- if (pkt->id) {
- ser_int8(BP_ID);
- ser_string((char *)pkt->id);
- }
- ser_int8(pkt->type);
- switch (pkt->type) {
- case BP_CHAR:
- ser_int8(*(int8_t *)pkt->value);
- break;
- case BP_INT32:
- ser_int32(*(int32_t *)pkt->value);
- break;
- case BP_UINT32:
- break;
- ser_unit32(*(uint32_t *)pkt->value);
- break;
- case BP_INT64:
- ser_int64(*(int64_t *)pkt->value);
- break;
- case BP_BTIME:
- case BP_UTIME:
- case BP_UINT64:
- ser_uint64(*(uint64_t *)pkt->value);
- break;
- case BP_POOL:
- case BP_STRING:
- case BP_NAME:
- ser_string((char *)pkt->value);
- break;
- case BP_BYTES:
- ser_uint32(*(uint32_t *)pkt->len);
- ser_bytes((char *)pkt->value, pkt->len);
- break;
- default:
- Emsg1(M_ABORT, 0, _("Unknown BPKT type: %d\n"), pkt->type);
- }
- }
- ser_end(bsock->msg, 0);
-}
-
-#endif
BNET_HB_RESPONSE = -7, /* Only response permited to HB */
BNET_PROMPT = -8, /* Prompt for UA */
BNET_BTIME = -9, /* Send UTC btime */
- BNET_BREAK = -10 /* Stop current command -- ctl-c */
+ BNET_BREAK = -10, /* Stop current command -- ctl-c */
+ BNET_START_SELECT = -11, /* Start of a selection list */
+ BNET_END_SELECT = -12 /* End of a select list */
};
#define BNET_SETBUF_READ 1 /* Arg for bnet_set_buffer_size */
#define BNET_TLS_OK 1 /* can do, but not required on my end */
#define BNET_TLS_REQUIRED 2 /* TLS is required */
-/*
- * This is the structure of the in memory BPKT
- */
-typedef struct s_bpkt {
- char *id; /* String identifier or name of field */
- uint8_t type; /* field type */
- uint32_t len; /* field length for string, name, bytes */
- void *value; /* pointer to value */
-} BPKT;
-
-/*
- * These are the data types that can be sent.
- * For all values other than string, the storage space
- * is assumed to be allocated in the receiving packet.
- * For BP_STRING if the *value is non-zero, it is a
- * pointer to a POOLMEM buffer, and the Memory Pool
- * routines will be used to assure that the length is
- * adequate. NOTE!!! This pointer will be changed
- * if the memory is reallocated (sort of like Mmsg(&pool)
- * does). If the pointer is NULL, a POOLMEM
- * buffer will be allocated.
- */
-#define BP_EOF 0 /* end of file */
-#define BP_CHAR 1 /* Character */
-#define BP_INT32 1 /* 32 bit integer */
-#define BP_UINT32 3 /* Unsigned 32 bit integer */
-#define BP_INT64 4 /* 64 bit integer */
-#define BP_STRING 5 /* string */
-#define BP_NAME 6 /* Name string -- limited length */
-#define BP_BYTES 7 /* Binary bytes */
-#define BP_FLOAT32 8 /* 32 bit floating point */
-#define BP_FLOAT64 9 /* 64 bit floating point */
*p = 0;
}
else { /* Mac (\r only) */
- ungetc(ch, fd); /* Push next character back to fd */
+ (void)ungetc(ch, fd); /* Push next character back to fd */
}
break;
}
} else {
::close(fd); /* use system close so correct mode will be used on open */
fd = -1;
+ clear_opened();
Dmsg0(100, "Close fd for mode change.\n");
}
}
use_count = 1;
update_pos_dev(this); /* update position */
set_os_device_parameters(this); /* do system dependent stuff */
+ } else {
+ clear_opened();
}
/* Stop any open() timer we started */
Mmsg(errmsg, _("Could not open file device %s. No Volume name given.\n"),
print_name());
fd = -1;
+ clear_opened();
return;
}
dev_errno = errno;
Mmsg2(errmsg, _("Could not open: %s, ERR=%s\n"), archive_name.c_str(),
be.strerror());
+ clear_opened();
Dmsg1(29, "open failed: %s", errmsg);
Emsg0(M_FATAL, 0, errmsg);
} else {
Mmsg(errmsg, _("Could not open file device %s. No Volume name given.\n"),
print_name());
fd = -1;
+ clear_opened();
return;
}
/* Use system close() */
::close(fd);
fd = -1;
+ clear_opened();
} else {
part_size = filestat.st_size;
dev_errno = 0;
}
}*/
}
+ } else {
+ clear_opened();
}
}