From: Hyunho Date: Thu, 6 May 2021 10:22:22 +0000 (+0900) Subject: Add missing disconnected impl X-Git-Tag: submit/tizen/20210806.015209~46^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e7676fcc9756e836a566a0be8cd5b295226e651;p=platform%2Fcore%2Fappfw%2Fcion.git Add missing disconnected impl Signed-off-by: Hyunho --- diff --git a/cion/channel/client_channel.cc b/cion/channel/client_channel.cc index 4621a2b..862574f 100644 --- a/cion/channel/client_channel.cc +++ b/cion/channel/client_channel.cc @@ -146,11 +146,13 @@ void ClientChannel::Impl::OnOpened(VineDpPtr dp, int result) { void ClientChannel::Impl::Disconnect(VineDpPtr dp) { if (connected_peer_ != nullptr && connected_peer_->GetVineClientDp()) { + LOG(INFO) << "Compare " << dp->GetRawDp() << " : " << connected_peer_->GetVineClientDp()->GetRawDp(); if (*connected_peer_->GetVineClientDp() == *dp) { parent_->OnDisconnected(connected_peer_); connected_peer_ = nullptr; } } + dp->Close(); PopDp(dp); } diff --git a/cion/tizen-api/cion_server.cc b/cion/tizen-api/cion_server.cc index f957dfa..9213ac7 100644 --- a/cion/tizen-api/cion_server.cc +++ b/cion/tizen-api/cion_server.cc @@ -51,6 +51,10 @@ class CionServer : public cion::channel::ServerChannel { } void OnDisconnected(std::shared_ptr peer) { + auto peerinfo = static_cast(&peer); + std::string service_name = GetSerivceName(); + for (const auto& cbdata : disconnected_cb_list_) + cbdata.cb(service_name.c_str(), peerinfo, cbdata.user_data); } std::vector OnDataReceived(const std::vector& data,