]> git.sur5r.net Git - bacula/bacula/commitdiff
- While using the rescue CDROM after my computer would not
authorKern Sibbald <kern@sibbald.com>
Sat, 18 Dec 2004 10:27:32 +0000 (10:27 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 18 Dec 2004 10:27:32 +0000 (10:27 +0000)
  boot, I realized that it would be very useful to have
  a umount_disks. So, it is not implemented, along with
  updates to the READMEs and some minor tweaks.
- Moved mounting the CDROM in the rescue boot from /cdrom
  to /mnt/cdrom (more standard location).
- Reboot in CDROM rescue should now work -- requires -d
  option (no write) to work.
- Hopefully fixed all the IPV6/4 problems and buffer
  problems with networking in lib. Bugs 190 and 204.
  Cleaned up a lot of #ifdefing problems by using routines
  in address_conf.c

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1763 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/verify.c
bacula/src/lib/address_conf.c
bacula/src/lib/address_conf.h
bacula/src/lib/bnet_server.c
bacula/src/stored/autochanger.c
bacula/src/version.h

index ce2cc6e6d5c459a20ba6b6f8b205bc71c77b0c02..4d166b42ea84cf54c213a53cbf4967c78b4ec04c 100644 (file)
@@ -1,5 +1,5 @@
                     Kern's ToDo List
-                     08 December 2004
+                     17 December 2004
 
 Major development:      
 Project                     Developer
@@ -43,6 +43,9 @@ For 1.37:
 - Fix orphanned buffers:
    Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
    Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+- Upgrade to MySQL 4.1.1 See:  
+  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
+
 
 Regression tests (Jo):
 - Add Pool/Storage override regression test.
@@ -59,6 +62,10 @@ Regression tests (Jo):
 - Add database test to regression. Test each function like delete,
   purge, ...
 
+- AntiVir can slow down backups on Win32 systems. 
+- Win32 systems with FAT32 can be much slower than NTFS for
+  more than 1000 files per directory.
+
 
 1.37 Possibilities:
 - Can one write tapes faster with 8192 byte block sizes?
index 5e02da421978f64f169cfc70a61d736f3debdd44..f239fa57b8809ad3d0fc87cc2b3f8cb91e5a8728 100644 (file)
@@ -288,7 +288,7 @@ bool do_verify(JCR *jcr)
       level="disk_to_catalog";
       break;
    default:
-      Jmsg2(jcr, M_FATAL, 0, _("Unimplemented save level %d(%c)\n"), jcr->JobLevel,
+      Jmsg2(jcr, M_FATAL, 0, _("Unimplemented Verify level %d(%c)\n"), jcr->JobLevel,
         jcr->JobLevel);
       goto bail_out;
    }
index a1fe35a10cf7001f624ec2334532efd1a33627fd..9e655f380e6b7001ea799c4754546df6c574edd5 100644 (file)
 
 
 #include "bacula.h"
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
 
 static int add_address(dlist **out, IPADDR::i_type type, unsigned short defaultport, int family,
                const char *hostname_str, const char *port_str, char **errstr);
@@ -176,10 +182,14 @@ void IPADDR::set_addr6(struct in6_addr *ip6)
 const char *IPADDR::get_address(char *outputbuf, int outlen)
 {
    outputbuf[0] = '\0';
-#if defined(HAVE_INET_NTOP) && defined(HAVE_IPV6)
+#ifdef HAVE_INET_NTOP
+# ifdef HAVE_IPV6
    inet_ntop(saddr->sa_family, saddr->sa_family == AF_INET ?
              (void*)&(saddr4->sin_addr) : (void*)&(saddr6->sin6_addr),
              outputbuf, outlen);
+# else
+   inet_ntop(saddr->sa_family, (void*)&(saddr4->sin_addr), outputbuf, outlen);
+# endif
 #else
    bstrncpy(outputbuf, inet_ntoa(saddr4->sin_addr), outlen);
 #endif
@@ -538,17 +548,48 @@ int sockaddr_get_port_net_order(const struct sockaddr *client_addr)
    return -1;
 }
 
-int  sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len)
+int sockaddr_get_port(const struct sockaddr *client_addr)
+{
+   if (client_addr->sa_family == AF_INET) {
+      return ntohs(((struct sockaddr_in *)client_addr)->sin_port);
+   }
+#ifdef HAVE_IPV6
+   else {
+      return ntohs(((struct sockaddr_in6 *)client_addr)->sin6_port);
+   }
+#endif
+   return -1;
+}
+
+
+char *sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len)
 {
 #ifdef HAVE_INET_NTOP
    /* MA Bug 5 the problem was that i mixed up sockaddr and in_addr */
    inet_ntop(sa->sa_family,
+# ifdef HAVE_IPV6
             sa->sa_family == AF_INET ? 
                 (void*)&(((struct sockaddr_in*)sa)->sin_addr) :
                 (void*)&(((struct sockaddr_in6*)sa)->sin6_addr),
+# else
+                (void*)&(((struct sockaddr_in*)sa)->sin_addr) :
+# endif /* HAVE_IPV6 */
             buf, len);
 #else
    bstrncpy(buf, inet_ntoa(((struct sockaddr_in *)sa)->sin_addr), len);
 #endif
-   return 1;
+   return buf;
 }
+
+#ifdef HAVE_OLD_SOCKOPT
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+   struct in_addr inaddr;
+
+   if((inaddr.s_addr = inet_addr(cp)) != INADDR_NONE) {
+      inp->s_addr = inaddr.s_addr;
+      return 1;
+   }
+   return 0;
+}
+#endif
index 9f618da1c554160e323f0e76f0fd05ad03824e06..42fe083d6007a9e3b131f129e37697d34a22f043 100644 (file)
@@ -29,7 +29,7 @@
 class IPADDR : public SMARTALLOC {
  public:
    typedef enum { R_SINGLE, R_SINGLE_PORT, R_SINGLE_ADDR, R_MULTIPLE,
-                  R_DEFAULT, R_EMPTY
+                 R_DEFAULT, R_EMPTY
    } i_type;
    IPADDR(int af);
    IPADDR(const IPADDR & src);
@@ -87,4 +87,8 @@ extern int get_first_port_host_order(dlist * addrs);
 extern const char *build_addresses_str(dlist *addrs, char *buf, int blen);
 
 extern int sockaddr_get_port_net_order(const struct sockaddr *sa);
-extern int sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
+extern int sockaddr_get_port(const struct sockaddr *sa);
+extern char *sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
+#ifdef HAVE_OLD_SOCKOPT
+extern int inet_aton(const char *cp, struct in_addr *inp);
+#endif
index 8d8cfbb15e3e04768a04403675f183738f60a28a..7a70051fa63c0950d5b212be174d10639fe869bf 100644 (file)
@@ -182,20 +182,10 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq,
            fromhost(&request);
            if (!hosts_access(&request)) {
               V(mutex);
-#ifndef HAVE_INET_NTOP
               Jmsg2(NULL, M_SECURITY, 0,
                      _("Connection from %s:%d refused by hosts.access\n"),
-                    inet_ntoa(((sockaddr_in *)&cli_addr)->sin_addr),
-                    ntohs(((sockaddr_in *)&cli_addr)->sin_port));
-#else
-              Jmsg2(NULL, M_SECURITY, 0,
-                     _("Connection from %s:%d refused by hosts.access\n"),
-                    inet_ntop(clilen == sizeof(sockaddr_in) ? AF_INET : AF_INET6,
-                              &clilen, buf, clilen),
-                    ntohs(clilen == sizeof(sockaddr_in) ? 
-                          ((sockaddr_in *)&cli_addr)->sin_port :
-                           ((sockaddr_in6 *)&cli_addr)->sin6_port));
-#endif
+                    sockaddr_to_ascii(&cli_addr, buf, sizeof(buf)),
+                    sockaddr_get_port(&cli_addr));
               close(newsockfd);
               continue;
            }
@@ -214,12 +204,7 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq,
 
            /* see who client is. i.e. who connected to us. */
            P(mutex);
-#ifdef HAVE_INET_NTOP
-           inet_ntop(clilen == sizeof(sockaddr_in) ? AF_INET : AF_INET6, &clilen,
-                     buf, sizeof(buf));
-#else
-           bstrncpy(buf, inet_ntoa(((sockaddr_in *)&cli_addr)->sin_addr), sizeof(buf));      /* NOT thread safe, use mutex */
-#endif
+           sockaddr_to_ascii(&cli_addr, buf, sizeof(buf));
            V(mutex);
            BSOCK *bs; 
             bs = init_bsock(NULL, newsockfd, "client", buf, fd_ptr->port, &cli_addr);
index 4c4aa2f90bf9abb027c5aa674c9d5d6bf062b985..a9811c43e81d96c5c4f4f7485d81999269a6a740 100644 (file)
@@ -156,7 +156,7 @@ static int get_autochanger_loaded_slot(JCR *jcr)
    changer = edit_device_codes(jcr, changer, jcr->device->changer_command, 
                 "loaded");
    status = run_program(changer, timeout, results);
-   Dmsg3(100, "run_prog: %s stat=%d result=%s\n", changer, status, results);
+   Dmsg3(50, "run_prog: %s stat=%d result=%s\n", changer, status, results);
    if (status == 0) {
       loaded = atoi(results);
       if (loaded > 0) {
@@ -191,7 +191,7 @@ void invalid_slot_in_catalog(DCR *dcr)
        dcr->VolCatInfo.VolCatName, dcr->VolCatInfo.Slot);
    dcr->VolCatInfo.InChanger = false;
    dev->VolCatInfo.InChanger = false;
-   Dmsg0(100, "update vol info in mount\n");
+   Dmsg0(400, "update vol info in mount\n");
    dir_update_volume_info(dcr, true);  /* set new status */
 }
 
@@ -291,7 +291,7 @@ char *edit_device_codes(JCR *jcr, char *omsg, const char *imsg, const char *cmd)
    char add[20];
 
    *omsg = 0;
-   Dmsg1(400, "edit_device_codes: %s\n", imsg);
+   Dmsg1(800, "edit_device_codes: %s\n", imsg);
    for (p=imsg; *p; p++) {
       if (*p == '%') {
         switch (*++p) {
@@ -341,9 +341,9 @@ char *edit_device_codes(JCR *jcr, char *omsg, const char *imsg, const char *cmd)
         add[1] = 0;
         str = add;
       }
-      Dmsg1(400, "add_str %s\n", str);
+      Dmsg1(900, "add_str %s\n", str);
       pm_strcat(&omsg, (char *)str);
-      Dmsg1(400, "omsg=%s\n", omsg);
+      Dmsg1(800, "omsg=%s\n", omsg);
    }
    return omsg;
 }
index 10a0c89b5eaa029f88aaa269a789b846d9592b6e..332a26409d357bba9b44bcc2eab529376b4e07f9 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #undef  VERSION
 #define VERSION "1.37.1"
-#define BDATE   "17 December 2004"
-#define LSMDATE "17Dec04"
+#define BDATE   "18 December 2004"
+#define LSMDATE "18Dec04"
 
 /* Debug flags */
 #undef  DEBUG