Fix the issue sync_stop_result message was not delivered when disconnected with... 95/234695/1
authorInHong Han <inhong1.han@samsung.com>
Thu, 28 May 2020 04:55:38 +0000 (13:55 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 28 May 2020 04:55:38 +0000 (13:55 +0900)
Change-Id: I113cd6ab396a4a3f13a717930dba512ee7079e0d

receiver/src/ft.cpp

index 1ab77b0b452498980fbf881cee9fa20456b16fcf..f2435392bb90a30a6e3b27506596df16b9357ebd 100644 (file)
@@ -619,6 +619,7 @@ void conn_terminated(sap_peer_agent_h peer_agent,
     priv->socket = NULL;
 
     set_sync_progressing(FALSE);
+    send_message("sync_stop_result", "cancel");
     service_app_exit();
 }
 
@@ -1188,6 +1189,7 @@ static void _on_device_status_changed(sap_device_status_e status,
     switch (status) {
         case SAP_DEVICE_STATUS_DETACHED:
             LOGD("device is not connected.");
+            send_message("sync_stop_result", "cancel");
             break;
         case SAP_DEVICE_STATUS_ATTACHED:
             LOGD("Attached calling find peer now");