Fixed async wait to handle zero timeouts (by async-wait patch)
This commit is contained in:
parent
a9ee1f49bc
commit
2fce83b5ee
26
brltty-5.3.1-async-wait.patch
Normal file
26
brltty-5.3.1-async-wait.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/Programs/async_wait.c b/Programs/async_wait.c
|
||||
index 231a07c..71b1372 100644
|
||||
--- a/Programs/async_wait.c
|
||||
+++ b/Programs/async_wait.c
|
||||
@@ -142,13 +142,20 @@ awaitAction (long int timeout) {
|
||||
|
||||
int
|
||||
asyncAwaitCondition (int timeout, AsyncConditionTester *testCondition, void *data) {
|
||||
+ int first = 1;
|
||||
TimePeriod period;
|
||||
startTimePeriod(&period, timeout);
|
||||
|
||||
while (!(testCondition && testCondition(data))) {
|
||||
long int elapsed;
|
||||
|
||||
- if (afterTimePeriod(&period, &elapsed)) return 0;
|
||||
+ if (first) {
|
||||
+ first = 0;
|
||||
+ elapsed = 0;
|
||||
+ } else if (afterTimePeriod(&period, &elapsed)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
awaitAction(timeout - elapsed);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
Name: brltty
|
||||
Version: %{pkg_version}
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
URL: http://mielke.cc/brltty/
|
||||
@ -32,6 +32,8 @@ Patch1: brltty-loadLibrary.patch
|
||||
# libspeechd.h moved in latest speech-dispatch (NOT sent upstream)
|
||||
Patch2: brltty-5.0-libspeechd.patch
|
||||
Patch3: brltty-5.3-xw-fonts-fix.patch
|
||||
# patch provided by upstream
|
||||
Patch4: brltty-5.3.1-async-wait.patch
|
||||
Summary: Braille display driver for Linux/Unix
|
||||
BuildRequires: byacc, glibc-kernheaders, bluez-libs-devel, systemd
|
||||
BuildRequires: gettext, at-spi2-core-devel, espeak-devel
|
||||
@ -199,6 +201,7 @@ This package provides the OCaml binding for BrlAPI.
|
||||
%patch1 -p1 -b .loadLibrary
|
||||
%patch2 -p1 -b .libspeechd
|
||||
%patch3 -p1 -b .xw-fonts-fix
|
||||
%patch4 -p1 -b .async-wait
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# Make a copy of the source tree for building the Python 3 module
|
||||
@ -416,6 +419,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri May 13 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 5.3.1-8
|
||||
- Fixed async wait to handle zero timeouts (by async-wait patch)
|
||||
|
||||
* Wed May 4 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 5.3.1-7
|
||||
- Made brltty-config executable, currently useless, but FHS compliant
|
||||
Resolves: rhbz#1332981
|
||||
|
Loading…
Reference in New Issue
Block a user