Просмотр исходного кода

ncm: Remove unnecessary proto_set_available commands

Interface should not be set unavailable in all error cases,
returning 1 is enough.

Signed-off-by: Matti Laakso <[email protected]>

SVN-Revision: 44630
John Crispin 10 лет назад
Родитель
Сommit
6ab19b7f46
1 измененных файлов с 0 добавлено и 5 удалено
  1. 0 5
      package/network/utils/comgt/files/ncm.sh

+ 0 - 5
package/network/utils/comgt/files/ncm.sh

@@ -41,7 +41,6 @@ proto_ncm_setup() {
 	[ -n "$apn" ] || {
 		echo "No APN specified"
 		proto_notify_error "$interface" NO_APN
-		proto_set_available "$interface" 0
 		return 1
 	}
 
@@ -69,7 +68,6 @@ proto_ncm_setup() {
 	[ $? -ne 0 ] && {
 		echo "Failed to get modem information"
 		proto_notify_error "$interface" GETINFO_FAILED
-		proto_set_available "$interface" 0
 		return 1
 	}
 
@@ -86,7 +84,6 @@ proto_ncm_setup() {
 		eval COMMAND="$i" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
 			echo "Failed to initialize modem"
 			proto_notify_error "$interface" INITIALIZE_FAILED
-			proto_set_available "$interface" 0
 			return 1
 		}
 	done
@@ -105,7 +102,6 @@ proto_ncm_setup() {
 		COMMAND="$setmode" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
 			echo "Failed to set operating mode"
 			proto_notify_error "$interface" SETMODE_FAILED
-			proto_set_available "$interface" 0
 			return 1
 		}
 		json_select ..
@@ -115,7 +111,6 @@ proto_ncm_setup() {
 	eval COMMAND="$connect" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
 		echo "Failed to connect"
 		proto_notify_error "$interface" CONNECT_FAILED
-		proto_set_available "$interface" 0
 		return 1
 	}