From: Kern Sibbald Date: Tue, 27 Jan 2004 21:00:46 +0000 (+0000) Subject: Fix run pool problem + remove bad ASSERTs X-Git-Tag: Release-7.0.0~9727 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66a7562af75866b2d7f0ff4058c74764a9108b7b;p=bacula%2Fbacula Fix run pool problem + remove bad ASSERTs git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1020 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 89de4c46fa..b591919231 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 17 January 2004 + 27 January 2004 Documentation to do: (any release a little bit at a time) - Document running a test version. @@ -249,6 +249,13 @@ For 1.33 In SD allow Device to have Multiple MediaTypes After 1.33: +- Look at www.nu2.nu/pebuilder as a helper for full windows + bare metal restore. +From Chris Hull: + it seems to be complaining about 12:00pm which should be a valid 12 + hour time. I changed the time to 11:59am and everything works fine. + Also 12:00am works fine. 0:00pm also works (which I don't think + should). None of the values 12:00pm - 12:59pm work for that matter. Ideas from Jerry Scharf: First let's point out some big pluses that bacula has for this it's open source diff --git a/bacula/src/cats/drop_mysql_database.in b/bacula/src/cats/drop_mysql_database.in index e5dfb60e8c..ff9ff481da 100644 --- a/bacula/src/cats/drop_mysql_database.in +++ b/bacula/src/cats/drop_mysql_database.in @@ -5,12 +5,16 @@ bindir=@SQL_BINDIR@ -if $bindir/mysql $* -f <cmd, "SELECT Path.Path,Filename.Name FROM File,\ -Filename,Path WHERE File.JobId=%u AND Filename.FilenameId=File.FilenameId \ -AND Path.PathId=File.PathId", + Mmsg(&mdb->cmd, "SELECT " FN " AS Filename FROM File," +"Filename,Path WHERE File.JobId=%u AND Filename.FilenameId=File.FilenameId " +"AND Path.PathId=File.PathId", jobid); if (!QUERY_DB(jcr, mdb, mdb->cmd)) { diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index 137bd84883..cdadff6116 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -592,6 +592,7 @@ static int insert_file_into_findex_list(UAContext *ua, RESTORE_CTX *rx, char *fi strip_trailing_junk(file); split_path_and_filename(rx, file); Mmsg(&rx->query, uar_jobid_fileindex, date, rx->path, rx->fname, rx->ClientName); + Dmsg1(000, "Query=%s\n", rx->query); rx->found = false; /* Find and insert jobid and File Index */ if (!db_sql_query(ua->db, rx->query, jobid_fileindex_handler, (void *)rx)) { diff --git a/bacula/src/filed/win32/bin/chmod.exe b/bacula/src/filed/win32/bin/chmod.exe new file mode 100644 index 0000000000..18078e1a29 Binary files /dev/null and b/bacula/src/filed/win32/bin/chmod.exe differ diff --git a/bacula/src/lib/bnet_server.c b/bacula/src/lib/bnet_server.c index c4b2a76ddf..3f5ccf0b20 100644 --- a/bacula/src/lib/bnet_server.c +++ b/bacula/src/lib/bnet_server.c @@ -128,7 +128,7 @@ bnet_thread_server(char *bind_addr, int port, int max_clients, workq_t *client_w FD_SET(sockfd, &sockset); errno = 0; if ((stat = select(sockfd+1, &sockset, NULL, NULL, NULL)) < 0) { - if (errno == EINTR) { + if (errno == EINTR || errno == EAGAIN) { continue; } /* Error, get out */ @@ -141,7 +141,7 @@ bnet_thread_server(char *bind_addr, int port, int max_clients, workq_t *client_w do { clilen = sizeof(cli_addr); newsockfd = accept(sockfd, (struct sockaddr *)&cli_addr, &clilen); - } while (newsockfd < 0 && errno == EINTR); + } while (newsockfd < 0 && (errno == EINTR || errno == EAGAIN)); if (newsockfd < 0) { continue; } @@ -212,7 +212,7 @@ bnet_bind(int port) * Open a TCP socket */ for (tlog=0; (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0; tlog -= 10 ) { - if (errno == EINTR) { + if (errno == EINTR || errno == EAGAIN) { continue; } if (tlog <= 0) { @@ -238,7 +238,7 @@ bnet_bind(int port) serv_addr.sin_port = htons(port); for (tlog=0; bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0; tlog -= 5 ) { - if (errno == EINTR) { + if (errno == EINTR || errno == EAGAIN) { continue; } if (tlog <= 0) { @@ -280,7 +280,7 @@ bnet_accept(BSOCK *bsock, char *who) */ ready = sockset; if ((stat = select(bsock->fd+1, &ready, NULL, NULL, NULL)) < 0) { - if (errno == EINTR) { + if (errno == EINTR || errno = EAGAIN) { errno = 0; continue; } @@ -291,7 +291,7 @@ bnet_accept(BSOCK *bsock, char *who) do { clilen = sizeof(cli_addr); newsockfd = accept(bsock->fd, (struct sockaddr *)&cli_addr, &clilen); - } while (newsockfd < 0 && errno == EINTR); + } while (newsockfd < 0 && (errno == EINTR || errno = EAGAIN)); if (newsockfd >= 0) { break; }