Discussion:
Review Request 125785: Make all bluez calls asynchronous
Jan Grulich
2015-10-25 09:06:08 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------

Review request for Network Management, David Edmundson and Lamarque Souza.


Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230


Repository: plasma-nm


Description
-------

This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.


Diffs
-----

libs/handler.h ceedab9
libs/handler.cpp 901230d

Diff: https://git.reviewboard.kde.org/r/125785/diff/


Testing
-------


Thanks,

Jan Grulich
David Edmundson
2015-10-25 09:38:47 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/#review87355
-----------------------------------------------------------


wow, that was super fast. Thanks!


libs/handler.cpp (line 433)
<https://git.reviewboard.kde.org/r/125785/#comment59986>

watcher->deleteLater();


I'd suggest using lambdas to queue up getting the object paths and then turning things on and off.
This patch won't handle the case of a bluetooth adaptor being added at runtime.

- David Edmundson
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------
(Updated Oct. 25, 2015, 9:06 a.m.)
Review request for Network Management, David Edmundson and Lamarque Souza.
Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230
Repository: plasma-nm
Description
-------
This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.
Diffs
-----
libs/handler.h ceedab9
libs/handler.cpp 901230d
Diff: https://git.reviewboard.kde.org/r/125785/diff/
Testing
-------
Thanks,
Jan Grulich
Jan Grulich
2015-10-25 13:51:30 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------

(Updated Říj. 25, 2015, 1:51 odp.)


Review request for Network Management, David Edmundson and Lamarque Souza.


Changes
-------

Updated patch:
- uses lambda functions
- stores previous BT state
- solves problem when a new adapter is added


Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230


Repository: plasma-nm


Description
-------

This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.


Diffs (updated)
-----

libs/handler.h ceedab9
libs/handler.cpp 901230d

Diff: https://git.reviewboard.kde.org/r/125785/diff/


Testing
-------


Thanks,

Jan Grulich
Jan Grulich
2015-10-25 13:53:22 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------

(Updated Říj. 25, 2015, 1:53 odp.)


Review request for Network Management, David Edmundson and Lamarque Souza.


Changes
-------

+ delete watchers


Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230


Repository: plasma-nm


Description
-------

This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.


Diffs (updated)
-----

libs/handler.h ceedab9
libs/handler.cpp 901230d

Diff: https://git.reviewboard.kde.org/r/125785/diff/


Testing
-------


Thanks,

Jan Grulich
Jan Grulich
2015-10-25 13:56:38 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/#review87366
-----------------------------------------------------------


Please ignore commented lines with enableWireless(xxxx), I had it disabled for testing and forgot to uncomment it.

- Jan Grulich
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------
(Updated Říj. 25, 2015, 1:53 odp.)
Review request for Network Management, David Edmundson and Lamarque Souza.
Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230
Repository: plasma-nm
Description
-------
This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.
Diffs
-----
libs/handler.h ceedab9
libs/handler.cpp 901230d
Diff: https://git.reviewboard.kde.org/r/125785/diff/
Testing
-------
Thanks,
Jan Grulich
David Edmundson
2015-10-25 14:51:20 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/#review87369
-----------------------------------------------------------

Ship it!


beautiful.


libs/handler.cpp (line 338)
<https://git.reviewboard.kde.org/r/125785/#comment59995>

no point capturing eanbled, we know it's going to be false.



libs/handler.cpp (line 339)
<https://git.reviewboard.kde.org/r/125785/#comment59994>

this watcher (getWatcher from 336) leaks


- David Edmundson
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------
(Updated Oct. 25, 2015, 1:53 p.m.)
Review request for Network Management, David Edmundson and Lamarque Souza.
Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230
Repository: plasma-nm
Description
-------
This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.
Diffs
-----
libs/handler.h ceedab9
libs/handler.cpp 901230d
Diff: https://git.reviewboard.kde.org/r/125785/diff/
Testing
-------
Thanks,
Jan Grulich
Jan Grulich
2015-10-25 16:37:21 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125785/
-----------------------------------------------------------

(Updated Oct. 25, 2015, 4:37 p.m.)


Status
------

This change has been marked as submitted.


Review request for Network Management, David Edmundson and Lamarque Souza.


Changes
-------

Submitted with commit f3e940d49574b3d464b8d7118cdced136283579b by Jan Grulich to branch master.


Bugs: 354230
http://bugs.kde.org/show_bug.cgi?id=354230


Repository: plasma-nm


Description
-------

This is a quick patch to address bug 354230. I don't know why this started happening on Kubuntu 15.10, I even tried to install it but couldn't reproduce. Anyway, this patch makes all bluez call asynchronous (at least I hope so). The only thing missing is that it now doesn't remember previous state of bluetooth adapter so if it's initially disabled and you turn on and then turn off the airplane mode, it will enable also all bluetooth adapters even when it shouldn't. Given that the bug is quite annoying and I don't want to spend sunday behind computer I would say that the new introduced issue is not that important and can be addressed later.


Diffs
-----

libs/handler.h ceedab9
libs/handler.cpp 901230d

Diff: https://git.reviewboard.kde.org/r/125785/diff/


Testing
-------


Thanks,

Jan Grulich

Loading...