Skip to content

Commit

Permalink
udiskslinuxprovider: Properly finalize GTaskThreadFunc
Browse files Browse the repository at this point in the history
No real world difference as nobody cares about the result,
only added to fully conform to Gio specs and to get rid of
these debugging warnings (G_MESSAGES_DEBUG=all):

  (udisksd:32988): GLib-GIO-DEBUG: 05:51:26.255: GTask 0x5607c9739930 (source object: 0x5607c97395d0, source tag: (nil)) finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program.
  • Loading branch information
tbzatek committed Nov 21, 2023
1 parent 7a5681f commit dc1d446
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/udiskslinuxdriveata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,7 @@ apply_configuration_thread_func (GTask *task,
out:
if (fd != -1)
close (fd);
g_task_return_boolean (task, TRUE);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/udiskslinuxprovider.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ perform_initial_housekeeping_for_drive (GTask *task,
error->message, g_quark_to_string (error->domain), error->code);
g_clear_error (&error);
}
g_task_return_boolean (task, TRUE);
}

/* ---------------------------------------------------------------------------------------------------- */
Expand Down Expand Up @@ -1588,6 +1589,7 @@ housekeeping_thread_func (GTask *task,
G_LOCK (provider_lock);
provider->housekeeping_running = FALSE;
G_UNLOCK (provider_lock);
g_task_return_boolean (task, TRUE);
}

/* called from the main thread on start-up and every 10 minutes or so */
Expand Down

0 comments on commit dc1d446

Please sign in to comment.