From 3d31c0bbf2705cf20b6732b8cc9f33f3987eae94 Mon Sep 17 00:00:00 2001 From: "taesub.kim" Date: Fri, 29 Nov 2013 11:48:06 +0900 Subject: [PATCH] Fix issue with DNS setting If there are no DNS servers in a profile (internally, when the dns count is 0), user can not add new one manually Change-Id: I4028dab99e01796df9b9bd63c15205ba8cdbbc1e Signed-off-by: Taesub Kim --- packaging/capi-network-connection.spec | 2 +- src/connection_profile.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/capi-network-connection.spec b/packaging/capi-network-connection.spec index c939756..2f6ab2d 100644 --- a/packaging/capi-network-connection.spec +++ b/packaging/capi-network-connection.spec @@ -1,6 +1,6 @@ Name: capi-network-connection Summary: Network Connection library in TIZEN C API -Version: 0.1.3_17 +Version: 0.1.3_18 Release: 1 Group: System/Network License: Apache License Version 2.0 diff --git a/src/connection_profile.c b/src/connection_profile.c index 92dbfc2..6d0bfe3 100644 --- a/src/connection_profile.c +++ b/src/connection_profile.c @@ -759,6 +759,9 @@ EXPORT_API int connection_profile_set_dns_address(connection_profile_h profile, else if (inet_aton(dns_address, &(net_info->DnsAddr[order-1].Data.Ipv4)) == 0) return CONNECTION_ERROR_INVALID_PARAMETER; + if (net_info->DnsCount < order) + net_info->DnsCount = order; + return CONNECTION_ERROR_NONE; } -- 2.7.4