Ignore probe_service even if the service is already added. 01/118201/1
authorDeokhyun Kim <dukan.kim@samsung.com>
Thu, 9 Mar 2017 06:27:13 +0000 (15:27 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 9 Mar 2017 06:45:39 +0000 (15:45 +0900)
commita45583aecd3f8c6a49215bc1a47df7e79bcf56c8
tree9b7f754d1afe253e7281a68494bf619028e18bde
parent1577a34820345a7d054753f05c15554596d2b4b4
Ignore probe_service even if the service is already added.

Cause : Issue happened when,
 0. Gear doesn't have pairing information about remote device.
 1. Remote device initiates HFP connection to Gear
 2. Paired
 3. Gear's Reverse service discovery timer (1s) is expired before HFP
    connection request comes. So device_browse_sdp() is called and
    service resolving is almost done.
 4. HFP connection request comes. So HFP service has been probed here
 5. SDP is done. Because there is HFP in profiles_added, HFP service
    probe happens once more. This causes the issue. Normally,
    duplication checking is done in update_record() by SDP logic.
    But In the issue case, SDP happens first and there is no logic
    to check duplication in incoming connection case (ext_confirm ->
    create_conn -> btd_device_add_uuid). Measure : Ignore probe_service
    even if the service is already added.

Change-Id: I68fbbe3bf510c1e7668cf12f0477cc4385ea710c
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
src/device.c