journal-file-util: do not fail when journal_file_set_offline() called more than once
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Oct 2023 09:20:40 +0000 (18:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Oct 2023 10:15:55 +0000 (19:15 +0900)
commit46e98dfcc7563dd16a2db3b05bb3e803c27f40ea
tree5e4700c1a4788c2b115418971dadc4c9b9296654
parentff95b60d1abddf01a57c7e39d30142326e2373e8
journal-file-util: do not fail when journal_file_set_offline() called more than once

Previously, if journal_file_set_offline() is called twice with 'wait = false',
the second call triggered segfaults, as the offline_state is OFFLINE_DONE,
and journal_file_set_offline_thread_join() tries to call pthread_join()
with NULL.
src/shared/journal-file-util.c