diff options
author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2017-09-29 16:35:30 +0300 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2017-10-09 16:07:42 +0200 |
commit | a5d016f3615c10a326a507dcb24afe8adcd48396 (patch) | |
tree | 4a2ae0ba70b54956f37d6761c8c977db56b64268 /package/network/utils/uqmi/files | |
parent | f8595a51d9558bbccb904eb39f43479bda8a8797 (diff) | |
download | upstream-a5d016f3615c10a326a507dcb24afe8adcd48396.tar.gz upstream-a5d016f3615c10a326a507dcb24afe8adcd48396.tar.bz2 upstream-a5d016f3615c10a326a507dcb24afe8adcd48396.zip |
net: uqmi: fix blocking in endless loops when unplugging device
If you unplug a QMI device, the /dev/cdc-wdmX device
disappears but uqmi will continue to poll it endlessly.
Then, when you plug it back, you have 2 uqmi processes,
and that's bad, because 2 processes talking QMI to the
same device [and the same time] doesn't seem to work well.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'package/network/utils/uqmi/files')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 35de6c5ad5..f5c8768601 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -65,6 +65,7 @@ proto_qmi_setup() { [ -n "$delay" ] && sleep "$delay" while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do + [ -e "$device" ] || return 1 sleep 1; done @@ -102,6 +103,7 @@ proto_qmi_setup() { echo "Waiting for network registration" while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do + [ -e "$device" ] || return 1 sleep 5; done |