Disable auto-discovery of NSProvider over TCP. 25/204725/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:13:39 +0000 (13:13 +0900)
commitb6b8f525aa7941efeec63e668013ff6f2b6fe052
tree2d6b556ab6c9971c800332869750dccba6dcc98f
parenta664cd8c8431ef1ec36bb04262c6570cb7eeb0a4
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