Skip to content

Commit

Permalink
submission: Add backend flag indicating whether the backend is ready.
Browse files Browse the repository at this point in the history
This flag is set just before the ready() vfunc is called.
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 12, 2019
1 parent 88a15ca commit 7ec923c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/submission/submission-backend.c
Expand Up @@ -61,6 +61,7 @@ void submission_backend_started(struct submission_backend *backend,

if (backend == client->backend_default)
client_default_backend_started(client, caps);
backend->ready = TRUE;
if (backend->v.ready != NULL)
backend->v.ready(backend, caps);
}
Expand Down Expand Up @@ -161,6 +162,7 @@ void submission_backend_fail(struct submission_backend *backend,
if (!failed_before && backend->v.fail != NULL)
backend->v.fail(backend, enh_code, reason);
backend->started = FALSE;
backend->ready = FALSE;
}

void submission_backends_client_input_pre(struct client *client)
Expand Down
1 change: 1 addition & 0 deletions src/submission/submission-backend.h
Expand Up @@ -91,6 +91,7 @@ struct submission_backend {
char *fail_reason;

bool started:1;
bool ready:1;
bool trans_started:1;
};

Expand Down

0 comments on commit 7ec923c

Please sign in to comment.