Commit Graph

2 Commits

Author SHA1 Message Date
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