1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

import: remember when we were finished importing

This commit is contained in:
Lennart Poettering 2014-12-24 16:42:41 +01:00
parent ea1ae8c38e
commit 14ed8b9273

View File

@ -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