From: Kern Sibbald Date: Sat, 19 May 2007 08:28:14 +0000 (+0000) Subject: kes Cleanup incorrect email addresses in bsmtp. X-Git-Tag: Release-2.2.0~460 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92cf8cf933a73e237480d80bce981f30ac87728e;p=bacula%2Fbacula kes Cleanup incorrect email addresses in bsmtp. kes Make bat display initial messages rather than discard them. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4831 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 1423e0c4bc..a4d1f74bd9 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -49,8 +49,10 @@ Professional Needs: - Synthetic Full, Diff, Inc (Virtual, Reconstructed) - SD to SD - Modules for Databases, Exchange, ... +- Novell NSS backup http://www.novell.com/coolsolutions/tools/18952.html Priority: +- Unicode input http://en.wikipedia.org/wiki/Byte_Order_Mark - How does restore JobId=nnn work? (Dirk) - What does: restore select fileset="TestSet" client="workplay-fd" pool="Default" > storage="File2" before="2007-02-05 23:05:04" do? (Dirk) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 04f50c8331..d7ebbef4ec 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -158,7 +158,7 @@ void Console::connect() QObject::connect(m_notifier, SIGNAL(activated(int)), this, SLOT(read_dir(int))); write(".api 1"); - discardToPrompt(); + displayToPrompt(); beginNewCommand(); dir_cmd(".jobs", job_list); diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index ec64b6042b..561bd75f19 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -67,7 +67,7 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent) readSettings(); - foreach(Console *console, m_consoleHash){ + foreach(Console *console, m_consoleHash) { console->connect(); } m_currentConsole = (Console*)getFromHash(m_firstItem); diff --git a/bacula/src/tools/bsmtp.c b/bacula/src/tools/bsmtp.c index 1397ff4d7f..d0b6066e68 100644 --- a/bacula/src/tools/bsmtp.c +++ b/bacula/src/tools/bsmtp.c @@ -70,13 +70,37 @@ static int mailport = 25; static char my_hostname[MAXSTRING]; static bool content_utf8 = false; +/* + * Take input that may have names and other stuff and strip + * it down to the mail box address ... i.e. what is enclosed + * in < >. Otherwise add < >. + */ +static char *cleanup_addr(char *addr, char *buf, int buf_len) +{ + char *p, *q; + + if ((p = strchr(from_addr, '<')) == NULL) { + snprintf(buf, buf_len, "<%s>", addr); + } else { + /* Copy */ + for (q=buf; *p && *p!='>'; ) { + *q++ = *p++; + } + if (*p) { + *q++ = *p; + } + *q = 0; + } + Dmsg2(100, "cleanup in=%s out=%s\n", addr, buf); + return buf; +} /* * examine message from server */ static void get_response(void) { - char buf[MAXSTRING]; + char buf[1000]; Dmsg0(50, "Calling fgets on read socket rfp.\n"); buf[3] = 0; @@ -184,7 +208,7 @@ __MINGW_IMPORT long _dstbias; */ int main (int argc, char *argv[]) { - char buf[MAXSTRING]; + char buf[1000]; struct sockaddr_in sin; struct hostent *hp; int i, ch; @@ -405,27 +429,15 @@ hp: */ get_response(); /* banner */ chat("helo %s\r\n", my_hostname); - if (strchr(from_addr, '<') == NULL) { - chat("mail from:<%s>\r\n", from_addr); - } else { - chat("mail from:%s\r\n", from_addr); - } - + chat("mail from:%s\r\n", cleanup_addr(from_addr, buf, sizeof(buf))); + for (i = 0; i < argc; i++) { Dmsg1(20, "rcpt to: %s\n", argv[i]); - if (strchr(argv[i], '<') == NULL) { - chat("rcpt to:<%s>\r\n", argv[i]); - } else { - chat("rcpt to:%s\r\n", argv[i]); - } + chat("rcpt to:%s\r\n", cleanup_addr(argv[i], buf, sizeof(buf))); } if (cc_addr) { - if (strchr(cc_addr, '<') == NULL) { - chat("rcpt to:<%s>\r\n", cc_addr); - } else { - chat("rcpt to:%s\r\n", cc_addr); - } + chat("rcpt to:%s\r\n", cleanup_addr(cc_addr, buf, sizeof(buf))); } Dmsg0(20, "Data\n"); chat("data\r\n"); diff --git a/bacula/src/version.h b/bacula/src/version.h index 7189096cd9..7dc9356f23 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.1.8" -#define BDATE "16 May 2007" -#define LSMDATE "16May07" +#define VERSION "2.1.10" +#define BDATE "18 May 2007" +#define LSMDATE "18May07" #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/src/win32/installer/Readme.txt b/bacula/src/win32/installer/Readme.txt index 34f5036a0d..5535f9b8cf 100644 --- a/bacula/src/win32/installer/Readme.txt +++ b/bacula/src/win32/installer/Readme.txt @@ -4,9 +4,9 @@ Bacula - Windows Version Disclaimer Please note, only the Win32 Client (File daemon) is supported. All the other components (Director, Storage daemon, their utilities) are provided on an "as is" basis. Unfortunately, they are neither properly tested, -documented, or supported. This means that we cannot accept bug reports -against the non-supported components. For them to be supported, we need -three things from the Open Source community: +documented, or supported. This means that we cannot ensure that bug reports +against the non-supported components will be fixed. For them to be supported, +we need three things from the Open Source community: 1. Full documentation of the Windows particularities of the Director, the Storage daemon, and their utilities in the Bacula manual. @@ -56,6 +56,10 @@ when it happens the daemon will not start since Bacula cannot find the directory The workaround is to manually edit the appropriate conf file and ensure that it is written out in UTF-8 format. +The conf files can be edited with any UTF-8 compatible editor, or on most +modern Win32 machines, you can edit them with notepad, then choose UTF-8 +output encoding before saving them. + Storage and Director Services ----------------------------- diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 6c921cf06b..53dd863cbb 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,9 @@ Technical notes on version 2.1 General: +18May07 +kes Cleanup incorrect email addresses in bsmtp. +kes Make bat display initial messages rather than discard them. 16May07 kes First cut of adding .mod to the run command. kes Implement auto display of messages in bat.