summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch17
1 files changed, 4 insertions, 13 deletions
diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch
index 00115cfca8..55d1ac94c5 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch
+++ b/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch
@@ -20,7 +20,7 @@ https://github.com/blueman-project/blueman/pull/1121
20 20
21Signed-off-by: Kai Kang <kai.kang@windriver.com> 21Signed-off-by: Kai Kang <kai.kang@windriver.com>
22--- 22---
23 blueman/Functions.py | 12 +++++++++++- 23 blueman/Functions.py | 10 ++++++++++
24 blueman/plugins/applet/PowerManager.py | 4 ++++ 24 blueman/plugins/applet/PowerManager.py | 4 ++++
25 2 files changed, 15 insertions(+), 1 deletion(-) 25 2 files changed, 15 insertions(+), 1 deletion(-)
26 26
@@ -28,24 +28,15 @@ diff --git a/blueman/Functions.py b/blueman/Functions.py
28index 3b76271..c5eeb27 100644 28index 3b76271..c5eeb27 100644
29--- a/blueman/Functions.py 29--- a/blueman/Functions.py
30+++ b/blueman/Functions.py 30+++ b/blueman/Functions.py
31@@ -17,7 +17,7 @@
32 # You should have received a copy of the GNU General Public License
33 # along with this program. If not, see <http://www.gnu.org/licenses/>.
34 #
35-from time import sleep
36+from time import sleep, time
37 import re
38 import os
39 import signal
40@@ -86,6 +86,16 @@ def check_bluetooth_status(message, exitfunc): 31@@ -86,6 +86,16 @@ def check_bluetooth_status(message, exitfunc):
41 return 32 return
42 33
43 applet.SetBluetoothStatus('(b)', True) 34 applet.SetBluetoothStatus('(b)', True)
44+ 35+
45+ timeout = time() + 10 36+ timeout = time.time() + 10
46+ while applet.GetRequestStatus(): 37+ while applet.GetRequestStatus():
47+ sleep(0.1) 38+ time.sleep(0.1)
48+ if time() > timeout: 39+ if time.time() > timeout:
49+ # timeout 5s has been set in applet/PowerManager.py 40+ # timeout 5s has been set in applet/PowerManager.py
50+ # so it should NOT reach timeout here 41+ # so it should NOT reach timeout here
51+ logging.warning('Should NOT reach timeout.') 42+ logging.warning('Should NOT reach timeout.')