Skip to content

Commit

Permalink
Replace glib GSource with GAutoPtr<GSource> in DnssdImpl.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DamMicSzm committed Sep 28, 2023
1 parent c8ae4d0 commit 77d74f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/platform/Tizen/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,9 @@ void OnResolve(dnssd_error_e result, dnssd_service_h service, void * userData)
// with the NSD internal mutex locked, which is also locked by the
// dnssd_create_remote_service() function called in the Resolve(), and
// the Resolve() itself is called with the stack mutex locked.
auto * sourceIdle = g_idle_source_new();
g_source_set_callback(sourceIdle, OnResolveFinalize, rCtx, NULL);
g_source_attach(sourceIdle, g_main_context_get_thread_default());
g_source_unref(sourceIdle);
chip::GAutoPtr<GSource> sourceIdle(g_idle_source_new());
g_source_set_callback(sourceIdle.get(), OnResolveFinalize, rCtx, NULL);
g_source_attach(sourceIdle.get(), g_main_context_get_thread_default());
}

return;
Expand Down

0 comments on commit 77d74f6

Please sign in to comment.