aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-05-14 18:50:48 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-03 16:08:52 +0200
commit674a242bdcda536dca6f8ba1da6c7b110e76440c (patch)
tree439223cb77360513c55eeffe2be7cce1c66f2508 /utils
parentbe46ed88d627522973a8c0c3e081bad29d13265b (diff)
downloadexternal_libqmi-674a242bdcda536dca6f8ba1da6c7b110e76440c.zip
external_libqmi-674a242bdcda536dca6f8ba1da6c7b110e76440c.tar.gz
external_libqmi-674a242bdcda536dca6f8ba1da6c7b110e76440c.tar.bz2
qmi-network: if network start fails, release CID
Diffstat (limited to 'utils')
-rwxr-xr-xutils/qmi-network3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/qmi-network b/utils/qmi-network
index 97ea14d..dc3a6db 100755
--- a/utils/qmi-network
+++ b/utils/qmi-network
@@ -103,6 +103,9 @@ start_network ()
PDH=`echo "$START_NETWORK_OUT" | grep handle | sed "s/'//g" | awk 'BEGIN { FS = ":" } ; { print $2 }'`
if [[ "x$PDH" = "x" ]]; then
echo "error: network start failed, no packet data handle" 1>&2
+ # Cleanup the client
+ qmicli -d "$DEVICE" --wds-noop --client-cid="$CID"
+ clear_state
exit 2
else
save_state "PDH" $PDH