Skip to content

Commit

Permalink
[Tizen] Remove platform APIs for cancel of dnssd (#23675)
Browse files Browse the repository at this point in the history
* [Tizen] Remove platform API for cancel of dnssd

Signed-off-by: hyunuk.tak <[email protected]>

* Restyled by clang-format

Signed-off-by: hyunuk.tak <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Jul 25, 2023
1 parent 16e26f4 commit 4529477
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/platform/Tizen/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,9 @@ void OnResolve(dnssd_error_e result, dnssd_service_h service, void * data)
chip::Inet::IPAddress ipAddr;
CHIP_ERROR err = CHIP_NO_ERROR;

// In fact, if cancel resolve fails, we can not do anything about it
int ret = dnssd_cancel_resolve_service(service);

rCtx->MainLoopQuit();

ret = result;
VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "DNSsd %s: Error: %d", __func__, ret));

ret = dnssd_service_get_name(service, &name);
int ret = dnssd_service_get_name(service, &name);
VerifyOrExit(ret == DNSSD_ERROR_NONE, ChipLogError(DeviceLayer, "dnssd_service_get_name() failed. ret: %d", ret));

chip::Platform::CopyString(dnssdService.mName, name);
Expand Down Expand Up @@ -467,10 +461,6 @@ BrowseContext::~BrowseContext()
g_source_destroy(mTimeoutSource);
g_source_unref(mTimeoutSource);
}
if (mIsBrowsing)
{
dnssd_cancel_browse_service(mBrowserHandle);
}
}

ResolveContext::ResolveContext(DnssdTizen * instance, const char * name, const char * type, uint32_t interfaceId,
Expand All @@ -485,13 +475,7 @@ ResolveContext::ResolveContext(DnssdTizen * instance, const char * name, const c
mCbContext = context;
}

ResolveContext::~ResolveContext()
{
if (mIsResolving)
{
dnssd_cancel_resolve_service(mServiceHandle);
}
}
ResolveContext::~ResolveContext() {}

CHIP_ERROR DnssdTizen::Init(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context)
{
Expand Down

0 comments on commit 4529477

Please sign in to comment.