From b128c10a7d8f7bacc8f70eee14902b457b45a484 Mon Sep 17 00:00:00 2001 From: hyunuktak Date: Mon, 13 Jun 2016 09:10:53 +0900 Subject: [PATCH] Add to check wifi dpm for modify profile Change-Id: Ie4655db9595d55b17eac2e5a9c4a909434f19ed2 Signed-off-by: hyunuktak --- packaging/libnet-client.spec | 2 +- src/network-profile-intf.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/libnet-client.spec b/packaging/libnet-client.spec index cc149a2..cdaf34e 100755 --- a/packaging/libnet-client.spec +++ b/packaging/libnet-client.spec @@ -1,6 +1,6 @@ Name: libnet-client Summary: Network Client library (Shared library) -Version: 1.1.53 +Version: 1.1.54 Release: 1 Group: System/Network License: Flora-1.1 diff --git a/src/network-profile-intf.c b/src/network-profile-intf.c index 198fa40..2590432 100755 --- a/src/network-profile-intf.c +++ b/src/network-profile-intf.c @@ -2686,6 +2686,12 @@ EXPORT_API int net_modify_profile(const char* profile_name, net_profile_info_t* return NET_ERR_APP_NOT_REGISTERED; } + if (!_net_get_dpm_wifi_state()) { + NETWORK_LOG(NETWORK_ERROR, "Wifi device policy restricts"); + __NETWORK_FUNC_EXIT__; + return NET_ERR_SECURITY_RESTRICTED; + } + if (!_net_get_dpm_wifi_profile_state()) { NETWORK_LOG(NETWORK_ERROR, "Wifi profile device policy restricts"); __NETWORK_FUNC_EXIT__; -- 2.34.1