mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
import: remember when we were finished importing
This commit is contained in:
parent
ea1ae8c38e
commit
14ed8b9273
@ -100,6 +100,8 @@ struct DkrImport {
|
||||
|
||||
dkr_import_on_finished on_finished;
|
||||
void *userdata;
|
||||
|
||||
bool finished;
|
||||
};
|
||||
|
||||
#define PROTOCOL_PREFIX "https://"
|
||||
@ -181,6 +183,11 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(DkrImportName*, dkr_import_name_unref);
|
||||
static void dkr_import_finish(DkrImport *import, int error) {
|
||||
assert(import);
|
||||
|
||||
if (import->finished)
|
||||
return;
|
||||
|
||||
import->finished = true;
|
||||
|
||||
if (import->on_finished)
|
||||
import->on_finished(import, error, import->userdata);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user