X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=job.c;h=887de92cadf88eb70033ff665e6be829b421b513;hb=136337ff74f05be3d42a769d9f0cb99716c5c40f;hp=f35c91c4df28aa4e75707e7f4533d3dfebb94b4a;hpb=c497c7a9e4db487eab4f92421a74d721d9558186;p=elogind.git diff --git a/job.c b/job.c index f35c91c4d..887de92ca 100644 --- a/job.c +++ b/job.c @@ -150,8 +150,8 @@ void job_dump(Job *j, FILE*f, const char *prefix) { assert(f); fprintf(f, - "%s→ Job %u:\n" - "%s\tAction: %s → %s\n" + "%s-> Job %u:\n" + "%s\tAction: %s -> %s\n" "%s\tState: %s\n" "%s\tForced: %s\n", prefix, j->id, @@ -464,7 +464,7 @@ int job_finish_and_invalidate(Job *j, bool success) { /* Patch restart jobs so that they become normal start jobs */ if (success && (j->type == JOB_RESTART || j->type == JOB_TRY_RESTART)) { - log_debug("Converting job %s/%s → %s/%s", + log_debug("Converting job %s/%s -> %s/%s", j->unit->meta.id, job_type_to_string(j->type), j->unit->meta.id, job_type_to_string(JOB_START)); @@ -541,6 +541,11 @@ void job_add_to_dbus_queue(Job *j) { if (j->in_dbus_queue) return; + if (set_isempty(j->manager->subscribed)) { + j->sent_dbus_new_signal = true; + return; + } + LIST_PREPEND(Job, dbus_queue, j->manager->dbus_job_queue, j); j->in_dbus_queue = true; }