]> git.sur5r.net Git - bacula/bacula/commitdiff
Integrate Phil's code, lex updates
authorKern Sibbald <kern@sibbald.com>
Sun, 9 Mar 2003 21:43:14 +0000 (21:43 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 9 Mar 2003 21:43:14 +0000 (21:43 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@374 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/filed/win32/bin/CygwinInstall.bat [new file with mode: 0755]
bacula/src/lib/bnet.c
bacula/src/lib/lex.c

index 3ac47139e9156093f0928fb09eea464be99ce210..04dc7f2e4878f4736424d092c8f5ec0e61c43306 100644 (file)
@@ -1,5 +1,5 @@
                  Kern's ToDo List
-                 01 March 2003 
+                 09 March 2003 
 
 Documentation to do: (a little bit at a time)
 - Document running a test version.
@@ -8,17 +8,20 @@ Documentation to do: (a little bit at a time)
 - Document how to automatically backup all local partitions
 - Document problems with Verify and pruning.
 - Document how to use multiple databases.
+- Document Maximum File Size
 
 
 Testing to do: (painful)
-- that console command line options work
+- that ALL console command line options work and are always implemented
 - blocksize recognition code.
 - multiple simultaneous Volumes
 
 For 1.30 release:
-- Implement max_file_size in block.c
+- Fix "access not allowed" for backup of files on WinXP.
+- Fix Error: bnet.c:408 gethostbyname() for lpmatou failed: ERR=Operation not permited
+  loop.
 - Add code if there is no mtio.h.
-- Add a section to the doc on Manual cycling
+- Add a section to the doc on Manual cycling of Volumes.
 - Look at purge jobs volume (at least document it, and see if it is
   logical).
 - Add list volumes pool=*
@@ -878,3 +881,4 @@ Done: (see kernsdone for more)
   scheduled.
 - Implement TCP/IP connection for MySQL
 - Pull a canceled job from the Scheduling queue.
+- Implement max_file_size in block.c (already done, just tweaked).
diff --git a/bacula/src/filed/win32/bin/CygwinInstall.bat b/bacula/src/filed/win32/bin/CygwinInstall.bat
new file mode 100755 (executable)
index 0000000..10c4329
--- /dev/null
@@ -0,0 +1,3 @@
+cd \bacula\bin
+bacula-fd.exe /install 
+
index bb0757db9113bebdce5b91526638335807746e82..9035e5cf70ffedefdef968d3b90c4ccd87a20689 100644 (file)
@@ -30,6 +30,7 @@
 
 
 #include "bacula.h"
+#include "jcr.h"
 
 extern time_t watchdog_time;
 
@@ -494,13 +495,17 @@ bnet_open(void *jcr, char *name, char *host, char *service, int port)
  * Try to connect to host for max_retry_time at retry_time intervals.
  */
 BSOCK *
-bnet_connect(void *jcr, int retry_interval, int max_retry_time, char *name,
+bnet_connect(void *vjcr, int retry_interval, int max_retry_time, char *name,
             char *host, char *service, int port, int verbose)
 {
    int i;
    BSOCK *bsock;
+   JCR *jcr = (JCR *)vjcr;
 
    for (i=0; (bsock = bnet_open(jcr, name, host, service, port)) == NULL; i -= retry_interval) {
+     if (job_cancelled(jcr)) {
+       break;
+     }
      Dmsg4(100, "Unable to connect to %s on %s:%d. ERR=%s\n",
              name, host, port, strerror(errno));
       if (i < 0) {
index 6e9118d054cbb383a36a4aa1af4d69280f54ad52..9474ab64443c215b3b687eb7bf56f4e8c58d28de 100644 (file)
@@ -153,8 +153,9 @@ lex_open_file(LEX *lf, char *filename, LEX_ERROR_HANDLER *scan_error)
 int
 lex_get_char(LEX *lf)
 {
-   if (lf->ch == L_EOF)
+   if (lf->ch == L_EOF) {
       Emsg0(M_ABORT, 0, "get_char: called after EOF\n");
+   }
    if (lf->ch == L_EOL) {
       if (fgets(lf->line, MAXSTRING, lf->fd) == NULL) {
         lf->ch = L_EOF;
@@ -357,10 +358,16 @@ lex_get_token(LEX *lf, int expect)
            if (ch == L_EOL) {
               lf->state = lex_none;
               token = T_EOL;
+           } else if (ch == L_EOF) {
+              token = T_ERROR;
            }
            break;
         case lex_number:
             Dmsg2(290, "Lex state lex_number ch=%x %c\n", ch, ch);
+           if (ch == L_EOF) {
+              token = T_ERROR;
+              break;
+           }
            /* Might want to allow trailing specifications here */
            if (B_ISDIGIT(ch)) {
               add_str(lf, ch);
@@ -377,10 +384,18 @@ lex_get_token(LEX *lf, int expect)
            lex_unget_char(lf);
            break;
         case lex_ip_addr:
+           if (ch == L_EOF) {
+              token = T_ERROR;
+              break;
+           }
             Dmsg1(290, "Lex state lex_ip_addr ch=%x\n", ch);
            break;
         case lex_string:
             Dmsg1(290, "Lex state lex_string ch=%x\n", ch);
+           if (ch == L_EOF) {
+              token = T_ERROR;
+              break;
+           }
             if (ch == '\n' || ch == L_EOL || ch == '=' || ch == '}' || ch == '{' ||
                 ch == ';' || ch == ',' || ch == '#' || (B_ISSPACE(ch)) ) {
               lex_unget_char(lf);    
@@ -415,6 +430,10 @@ lex_get_token(LEX *lf, int expect)
            break;
         case lex_quoted_string:
             Dmsg2(290, "Lex state lex_quoted_string ch=%x %c\n", ch, ch);
+           if (ch == L_EOF) {
+              token = T_ERROR;
+              break;
+           }
            if (ch == L_EOL) {
               esc_next = FALSE;
               break;
@@ -436,6 +455,10 @@ lex_get_token(LEX *lf, int expect)
            add_str(lf, ch);
            break;
         case lex_include:            /* scanning a filename */
+           if (ch == L_EOF) {
+              token = T_ERROR;
+              break;
+           }
             if (B_ISSPACE(ch) || ch == '\n' || ch == L_EOL || ch == '}' || ch == '{' ||
                 ch == ';' || ch == ','   || ch == '"' || ch == '#') {
               lf->state = lex_none;
@@ -536,7 +559,7 @@ lex_get_token(LEX *lf, int expect)
 
    case T_STRING:
       if (token != T_IDENTIFIER && token != T_UNQUOTED_STRING && token != T_QUOTED_STRING) {
-         scan_err2(lf, "expected a name, got %s: %s",
+         scan_err2(lf, "expected a string, got %s: %s",
               lex_tok_to_str(token), lf->str);
         token = T_ERROR;
       } else {