Commit Graph

4 Commits

Author SHA1 Message Date
Richard Hughes
478e44bc19 trivial: Do not use g_assert() in self test code
Note that g_assert() should not be used in unit tests, since it is a
no-op when compiling with G_DISABLE_ASSERT. Use g_assert() in production
code, and g_assert_true() in unit tests.

See https://github.com/fwupd/fwupd/issues/3790
2021-09-24 22:20:21 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
0b6907e0bb trivial: Fix warning from clang about unused variable 2021-02-08 12:53:32 +00:00
Richard Hughes
2c1f08d874 libfwupd: Do not allow multiple threads to create the GDBusProxy
When using the sync API entrypoints like fwupd_client_get_devices() these call
into fwupd_client_connect() to ensure the proxy is set up. This is not thread
safe and chaos ensues if you call two sync functions from different threads,
like GNOME Software does at startup...

Use a mutex to protect access to this shared resource.

Original test code from Philip Withnall, slightly tweaked by me. Thanks!
2021-01-07 16:39:08 +00:00