Commit Graph

3711 Commits

Author SHA1 Message Date
Vasily Galkin 95f2a840be Windows 8+: make waiting for messages correspond to emptiness check
Fixes high cpu usage spikes on win10.
When queue was containing messages of only non-QS_POSTMESSAGE type the
"while (m_buffer->isEmpty())" busy-looped in EventQueue::getEvent
since isEmpty was true (checked only QS_POSTMESSAGE message type),
but waitForEvent returned immediately (checked more message types).

Investigation shows that the difference was introduced in
https://github.com/debauchee/barrier/commit/dbfb04a6e
to fix a problem with bad behaviour of GetQueueStatus
Researching showed that a similar problem was fixed in Qt,
and the solution was
"pass different flags to GetQueueStatus depending on version of windows"
https://bugreports.qt.io/browse/QTBUG-29097

So this patch makes changes to a barrier non-GUI core similar to Qt fix.
2020-05-29 14:09:48 +03:00
Jonathan Martens 21eadc9661
Fix Auto config missing hostname prompt #704
I think this might fix the prompt for a missing hostname when auto config is checked
2020-05-29 10:11:55 +02:00
Povilas Kanapickas 722b7d6cc4 XWindowsEventQueueBuffer: Fix delays when waiting for new events
QLength() may return 0 even if there are events pending because they
need to be read from the display socket in order to become visible. We
must use XPending() which will poll the socket if QLength() == 0.
2020-05-20 22:11:14 +03:00
Vasily Galkin 8ab6ad64f9 Remove unused IEventQueue::isEmpty() method to simplify code understanding
Current code base don't use IEventQueue::isEmpty() method.
Remove it to simplify IEventQueue API and to remove confusion with
IEventQueueBuffer with same name.

The IEventQueueBuffer::isEmpty() and all its implementations kept unchanged
2020-05-13 01:35:40 +03:00
Dom Rodriguez dbd10820c3
Merge pull request #585 from chewi/pthread
Use -pthread flag and simplify pthread build logic
2020-05-12 23:13:16 +01:00
Dom Rodriguez fe0f3303d7
Merge pull request #655 from simons-public/elevate-bind-failure-to-error
Elevate XSocketAddressInUse to ERROR
2020-05-12 23:06:15 +01:00
Dom Rodriguez 81d4758c28
Merge pull request #579 from eson57/patch-1
Update gui_sv.ts
2020-05-12 22:09:21 +01:00
Dom Rodriguez db63edde69
Merge pull request #615 from scarabeusiv/patch-1
Fix desktop file Categories to match standard
2020-05-12 21:54:01 +01:00
Dom Rodriguez dc2869f48b
Merge pull request #664 from simons-public/fix-gui-status
Change log level on several status messages (Fixes #652, Fixes #516)
2020-05-12 21:40:38 +01:00
Chris Simons 639415ea44
Merge pull request #2 from plessbd/patch-3
A few more log cleanups
2020-05-12 13:07:45 -07:00
Ben Plessinger 5636e9cb40
A few more log cleanups
Fix a few more log messages to be consistent
2020-05-12 15:49:19 -04:00
Dom Rodriguez 5d82510ee8
Merge pull request #653 from simons-public/tis-tsm-fix
Fix TIS/TSM in logs
2020-05-12 18:54:57 +01:00
Chris Simons a9421a9cd3 Change log level on several status messages (Fixes #652, Fixes #516)
This changes the log level for several statuses (started server,
connected to server, server status:) from CLOG_NOTE or CLOG_INFO to
CLOG_PRINT so they will be printed to stdout regardless of the log
level. This allows the GUI to accurately report the status of the
`barriers` or `barrierc` processes in src/gui/src/MainWindow.cpp#L379-L399.
2020-05-11 20:36:51 -07:00
Chris Simons 7a2b38ad56 replace tabs with spaces 2020-05-07 16:56:42 -07:00
Dom Rodriguez 2d2e92989c
Merge pull request #658 from simons-public/select-fingerprint
Allow selecting Fingerprint Qlabel
2020-05-07 15:20:39 +01:00
Chris Simons 6653de6450 Allow selecting Fingerprint Qlabel
Setting the Fingerprint label to TextSelectableByMouse allows users to
copy/paste the fingerprint so it can be easily added to "TrustedServers.txt"
on a client machine (i.e. via SSH).
2020-05-06 20:40:17 -07:00
Chris Simons b3349ddfec Elevate XSocketAddressInUse to ERROR
Errors where the socket address is in use will keep the server from connecting
with clients. This should be reported as an ERROR instead of a warning. Also,
if the retry time is shorter issues will be more obvious, since the error will
cause the log to scroll visibly.
2020-05-06 15:36:34 -07:00
Chris Simons 30c77497df Fix TIS/TSM in logs
Silences the "is calling TIS/TSM in non-main thread environment"
messages in the log when running a MacOS server as it is a red herring
that causes a lot of issues to be filed.
2020-05-06 15:32:46 -07:00
Dom Rodriguez 675a17d6e8
Merge pull request #648 from simons-public/use-macdeployqt
Use macdeployqt
2020-05-06 18:48:53 +01:00
Chris Simons b5c7eb45ef Change MacOS Build Steps
The Azure Pipelines MacOS vmImage has an old version of OpenSSL (1.0.2t)
installed at /usr/local/opt/openssl. Normally with Homebrew this directory
would be linked to the currenly installed version of OpenSSL (1.1.x) in
/usr/local/Cellar, but since it has been installed manually here it interferes
with linking libssl.a and libcrypto.a static libraries which causes the build
to fail.
2020-05-05 20:04:25 -07:00
Chris Simons 0deaaad2c9 added barrierc and barriers to macdeployqt targets
macdeployqt needs "-executable=filename" to propery
change linking on other variables

also renamed the cmake target from "Barrier_dmg" to
"Barrier_MacOS" to properly reflect earlier changes
2020-05-04 09:37:18 -07:00
Chris Simons e0051d17d8 Homebrew (Ruby) throws an error when it gets `SIGPIPE` from the `--max-count` on `grep`. 2020-05-02 13:58:22 -07:00
Chris Simons fb3eaa3e3c Add warnings for users manually running `build_installer.sh` and `reref_dylibs.sh` manually 2020-05-02 13:27:58 -07:00
Chris Simons 8cd59ebee7 Use `build_dist.sh` in CMake instead of `build_installer.sh`
Have CMake always build a bundle, the `build_dist.sh` script will only build a dmg if the build type is "Release"
2020-05-02 12:33:09 -07:00
Chris Simons e37277fe8f Add script that uses macdeployqt instead of `reref_dylibs.sh` shell script to create the `.app` bundle 2020-05-02 12:30:18 -07:00
Tomáš Chvátal f0d2459247
Fix desktop file Categories to match standard
It requires more sections than Utility;
2020-04-07 10:30:41 +02:00
Dom Rodriguez b6a1b57420
Merge pull request #592 from chewi/qt-gui-only
Only require Qt5 when building the GUI
2020-03-26 11:48:15 +00:00
Dom Rodriguez 79c191ab2b
Merge pull request #580 from the-wes/patch-1
Add more detailed description of what Barrier does, fixes #551
2020-03-26 11:21:15 +00:00
Dom Rodriguez 11edf04107
Merge pull request #574 from shymega/enhancement/readme-0
README: Add OpenBSD to list of supported OSes
2020-03-18 21:40:49 +00:00
James Le Cuirot af0ce63733
Only require Qt5 when building the GUI
Commit 6c888437 made Qt5 mandatory for all builds when it is only
required for the GUI. There's already a find_package call in src/gui,
it just needed the REQUIRED flag to be added.
2020-03-17 22:45:20 +00:00
James Le Cuirot a0b3124f80
Use -pthread flag and simplify pthread build logic
Sometimes -lpthread is not enough. This has caused build failures on
Gentoo Linux in the past.

The logic also seems needlessly complex. We check for HAVE_PTHREAD on
UNIX platforms even though CMake errors out if pthreads are not
found. Similarly, we have a fallback for HAVE_PTHREAD_SIGNAL being
false even though we always set it to true.
2020-03-10 21:10:48 +00:00
the-wes b2324f0d24
Add more detailed description of what Barrier does 2020-03-03 02:17:38 -08:00
Åke Engelbrektson 6fb4512617
Update gui_sv.ts
Hi, 
Please, add updated Swedish translation.
2020-03-03 10:57:39 +01:00
Dom Rodriguez 3afa54d0da
README: Add OpenBSD to list of supported OSes 2020-02-26 00:42:41 +00:00
Adrian Lucrèce Céleste e8d7cd3f10
Merge pull request #539 from MicaelJarniac/patch-2
Build status badges added to a table
2020-02-25 17:22:57 -05:00
Adrian Lucrèce Céleste e5999f01a8
Merge pull request #553 from maxiberta/disable-wayland
Disable wayland support in the snap
2020-02-13 09:20:32 -05:00
Adrian Lucrèce Céleste 72d1c8cd65
Merge pull request #557 from galkinvv/fix-loop-tcp-disconnection
Fix infinite loop on fast TCP disconnection
2020-02-13 09:20:22 -05:00
Vasily Galkin c79120c049 Fix infinite loop on fast TCP disconnection
The commit a841b28 changed the condition for removing job from processing.
New flag MultiplexerJobStatus::continue_servicing become used
instead of checking pointer for NULL.
However for cases when TCPSocket::newJob() returns nullptr
the behaviour changed: earlier the job was removed, but after change
it is called again, since MultiplexerJobStatus equal to {true, nullptr}
means "run this job again".

This leads to problem with eating CPU and RAM on linux
https://github.com/debauchee/barrier/issues/470

There is similar windows problem, but not sure it is related.
https://github.com/debauchee/barrier/issues/552

Since it looks that the goal of a841b28 was only clarifying
object ownership and not changing job deletion behaviour,
this commit tries to get original behaviour and fix the bugs above
by returning {false, nullptr} instead of {true, nullptr}
when TCPSocket::newJob() returns nullptr.
2020-02-09 23:27:26 +03:00
Maximiliano Bertacchini 65fb58ebe5 Add comment on snap env var 2020-02-05 12:30:04 -03:00
Maximiliano Bertacchini f2f9f1ec64 Explicitly disable wayland support in the snap. 2020-02-05 12:16:53 -03:00
Maximiliano Bertacchini d9745a737a Add build-essential to the snap's build deps. 2020-02-05 12:16:20 -03:00
Micael Jarniac 8335ffd5e5
Build status badges added to a table 2020-01-10 12:14:51 -03:00
Adrian Lucrèce Céleste 170a271737
Merge pull request #533 from candeira/503_readme_issues_prs
Fix #503 - Clarify on README how to report issues
2019-12-30 08:46:56 -05:00
Javier Candeira 6e2ed1e597 Fix #503 - Clarify on README how to report issues 2019-12-29 19:13:23 +11:00
Adrian Lucrèce Céleste adb175df9e
Merge pull request #521 from maxiberta/master
Update readme with mention of the snap package
2019-12-08 12:22:13 -05:00
Maximiliano Bertacchini 55e3d52eec Update readme with mention of the snap package. 2019-12-07 18:28:49 -03:00
Adrian Lucrèce Céleste 13ac24821a
Merge pull request #511 from keeganquinn/elcapitan-build-fix
Cast values to fix build errors on OS X 10.11.
2019-11-24 19:02:44 -05:00
Keegan Quinn 3d832fd728 Cast values to fix build errors on OS X 10.11. 2019-11-24 12:40:13 -08:00
Adrian Lucrèce Céleste 36ed253e12
Merge pull request #507 from galkinvv/man-conf-name-dot
Man page: fix incorrect name of user conf file in barriers.1
2019-11-21 16:37:46 -05:00
Vasily Galkin e2d460b779 Man page: fix incorrect name of user conf file in barriers.1
The leading dot was lost in documentation in previous change
while moving file to another directory.
The usage of leading dot in non-home folder is not a common practice,
but this is the current behavior,
and this commit just update man page to match the code.

Also the man pages has a not that they are auto-generated by help2man.
I used help2man to update them,
but it's output has some problems (wrong formatting of copyrights).

So in addition to the only important change (naming fix)
there is some more changes:

* Formatting manually added to the list of config files.
* New option --screen-change-script auto-added by help2man
* Man files themselves and doc/UpdateManpages.txt now mention
that some manual work is needed after help2man
2019-11-21 21:17:18 +03:00