]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bsock.c
Attempt to fix bat seg faults
[bacula/bacula] / bacula / src / lib / bsock.c
index 63f90f5385348abac00d7229ccc9f8fc9ce3d06d..a33a3dc917e32620b666d6e5dc0c3099f33527b4 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -774,7 +774,7 @@ void BSOCK::restore_blocking (int flags)
  *            0 if timeout
  *           -1 if error
  */
-int BSOCK::wait_data(int sec)
+int BSOCK::wait_data(int sec, int usec)
 {
    fd_set fdset;
    struct timeval tv;
@@ -783,7 +783,7 @@ int BSOCK::wait_data(int sec)
    FD_SET((unsigned)m_fd, &fdset);
    for (;;) {
       tv.tv_sec = sec;
-      tv.tv_usec = 0;
+      tv.tv_usec = usec;
       switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) {
       case 0:                      /* timeout */
          b_errno = 0;
@@ -804,7 +804,7 @@ int BSOCK::wait_data(int sec)
 /*
  * As above, but returns on interrupt
  */
-int BSOCK::wait_data_intr(int sec)
+int BSOCK::wait_data_intr(int sec, int usec)
 {
    fd_set fdset;
    struct timeval tv;
@@ -812,7 +812,7 @@ int BSOCK::wait_data_intr(int sec)
    FD_ZERO(&fdset);
    FD_SET((unsigned)m_fd, &fdset);
    tv.tv_sec = sec;
-   tv.tv_usec = 0;
+   tv.tv_usec = usec;
    switch (select(m_fd + 1, &fdset, NULL, NULL, &tv)) {
    case 0:                      /* timeout */
       b_errno = 0;
@@ -822,6 +822,7 @@ int BSOCK::wait_data_intr(int sec)
       return -1;                /* error return */
    default:
       b_errno = 0;
+      break;
    }
    return 1;
 }
@@ -978,7 +979,7 @@ bail_out:
    bsnprintf(msg, msglen, _("Authorization problem with Director at \"%s:%d\"\n"
              "Most likely the passwords do not agree.\n"
              "If you are using TLS, there may have been a certificate validation error during the TLS handshake.\n"
-             "Please see http://www.bacula.org/rel-manual/faq.html#AuthorizationErrors for help.\n"), 
+             "Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.\n"), 
              dir->host(), dir->port());
    return false;
 }