Hello,

Thanks for the feedback.  I have also tested it here and it works on my Ubuntu 16.04 system, so I will commit it so it will be in the next version (9.0.5).

Thanks for finding this and bringing it to my attention.

Best regards,

Kern


On 10/23/2017 04:19 PM, Jesper Schmitz Mouridsen wrote:
Hello.

Just followed your suggestion and it works. as well.

Here the corrected patch just for reference.

--- src/qt-console/bcomm/dircomm.cpp.orig       2017-10-22 07:27:18 UTC
+++ src/qt-console/bcomm/dircomm.cpp
@@ -331,7 +331,7 @@ int DirComm::read()
    while (m_sock) {
       for (;;) {
          if (!m_sock) break;
-         stat = m_sock->wait_data_intr(0, 50000);
+         stat = m_sock->wait_data_intr(0, 50);
          if (stat > 0) {
             break;
          }


Kern Sibbald skrev den 2017-10-22 20:39:
Hello,

Neither of the two pieces of code look correct to me.

The first argument to wait_data_intr is the number of seconds to wait,
and the second is the number of milliseconds to wait.  I suspect that
the author wanted to wait 50 milliseconds, which seems to me to be
about the time one would want to wait between checking for other
messages.  However, the original code waits 50,000 milliseconds which
is 50 seconds -- very long.

You changed the code to wait 5 seconds, but both seem to me to be large.

Could you try using:

    stat = m_sock->wait_data_intr(0, 50);

and see if it solves your problem?

That does work too.


Please let me know.

Best regards,

Kern



On 10/22/2017 06:38 PM, Jesper Schmitz Mouridsen wrote:
Hi list.

I tried out the rather new bacula9 port on FreeBSD 11.1-RELEASE.
I could successfully use the bconsole utility, but the qt4-bat just hang at "initializing.."

The following patch fixes it..

--- src/qt-console/bcomm/dircomm.cpp.orig       2017-10-22 07:27:18 UTC
+++ src/qt-console/bcomm/dircomm.cpp
@@ -331,7 +331,7 @@ int DirComm::read()
    while (m_sock) {
       for (;;) {
          if (!m_sock) break;
-         stat = m_sock->wait_data_intr(0, 50000);
+         stat = m_sock->wait_data_intr(5, 0);
          if (stat > 0) {
             break;
          }
It seems specific to FreeBSD though.

Can anyone explain the difference between the two systems? And why the high value in the first place?
It gives tv.u_sec = 50.000.000, at lib/bsys.c:1184:
      tv.tv_usec = msec * 1000;
      perhaps that is a mistake?

Regards
Jesper Schmitz Mouridsen

------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to