Disable auto-discovery of NSProvider over TCP. 31/204731/1
authorSenthil Kumar G S <senthil.gs@samsung.com>
Mon, 22 Apr 2019 13:18:54 +0000 (18:48 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 26 Apr 2019 04:17:52 +0000 (13:17 +0900)
commite2b3a3137f295083c45c09fdea3cfb4672b6f5b9
tree21d69d9c2d557970630d2fdae21d19bae786034f
parent5c1639c777f6d029adca099c21ee8def49dd6da2
Disable auto-discovery of NSProvider over TCP.

For disabling auto-discovery, DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY flag should be set to 1
in scons build command.

Background:-
For TCP Connected events, NS Consumer automatically discovers initiates the discovery
of NS Provider. Due to which, there is a problem which occurs when app perform sign-in
and there is no TCP connection, then connection will be established first.
NS Consumer will then receive the TCP connected event and initiate NS Provider discovery.
Even before sign-in, upon receiving the NS Provider discovery closes the connection as it is
in the process of sign-in.

This patch addresses the problem by disabling auto-discovery of NSProvider over TCP
for TCP connected events.

As auto discovery is disabled, application should explicitly perform discovery by calling
"NSConsumerEnableRemoteService" API (strictly after sign-in).

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/488
(cherry picked from 8edd5e6a62a3d3892871efc9f4fb1f7f4b32fd9b)

Change-Id: I41910070ad8c60c64aa8fa4567f98d98690965a4
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
build_common/SConscript
service/notification/src/consumer/NSConsumerNetworkEventListener.c