diff options
author | bg.chun <bg.chun@samsung.com> | 2016-12-14 17:41:26 +0900 |
---|---|---|
committer | Jooseok Park <jooseok.park@samsung.com> | 2016-12-19 12:18:03 +0900 |
commit | 06fcd3401c2520059852858d96ba946b16482eeb (patch) | |
tree | 70ac477e9945fc6183902dfbc4c08e1101ec6e45 | |
parent | 80c944e64b1febb010ed0dee8dd8feeb60c051e5 (diff) | |
download | iotivity-06fcd3401c2520059852858d96ba946b16482eeb.tar.gz iotivity-06fcd3401c2520059852858d96ba946b16482eeb.tar.bz2 iotivity-06fcd3401c2520059852858d96ba946b16482eeb.zip |
[Tizen]change flag which used for detect ip changedsubmit/tizen_3.0/20161219.033311accepted/tizen/3.0/wearable/20161219.091122accepted/tizen/3.0/tv/20161219.095715accepted/tizen/3.0/mobile/20161219.091514accepted/tizen/3.0/ivi/20161219.095709accepted/tizen/3.0/common/20161219.113747
change netlink interface flags to addr flags
which used for detect network IPv4/6 changed
Change-Id: I827db082879aafdc3e8bd688917180af09531ab2
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15595
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
-rw-r--r-- | packaging/iotivity.spec | 4 | ||||
-rw-r--r-- | resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/packaging/iotivity.spec b/packaging/iotivity.spec index 7cf490138..5a0e91956 100644 --- a/packaging/iotivity.spec +++ b/packaging/iotivity.spec @@ -27,6 +27,10 @@ Source1002: %{name}-test.manifest %define TARGET_TRANSPORT IP %endif +%if "%{TARGET_OS}" == "tizen" +%define TARGET_TRANSPORT IP +%endif + %define JOB "-j4" %if 0%{?speedpython} %define JOB %{?_smp_mflags} diff --git a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c index 4b16863a7..5fbdc3ac3 100644 --- a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c +++ b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c @@ -164,13 +164,12 @@ u_arraylist_t *CAFindInterfaceChange() for (struct nlmsghdr *nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) { - if (nh != NULL && nh->nlmsg_type != RTM_NEWLINK) + if (nh != NULL && (nh->nlmsg_type != RTM_DELADDR && nh->nlmsg_type != RTM_NEWADDR)) { continue; } struct ifinfomsg *ifi = (struct ifinfomsg *)NLMSG_DATA(nh); - - if ((!ifi || (ifi->ifi_flags & IFF_LOOPBACK) || !(ifi->ifi_flags & IFF_RUNNING))) + if (!ifi) { continue; } @@ -178,7 +177,6 @@ u_arraylist_t *CAFindInterfaceChange() int ifiIndex = ifi->ifi_index; iflist = CAIPGetInterfaceInformation(ifiIndex); - if (!iflist) { OIC_LOG_V(ERROR, TAG, "get interface info failed: %s", strerror(errno)); |