diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-20 10:22:07 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-20 17:12:27 +0200 |
commit | 7527cb527598aaabf0ed9b38a352edb28536392a (patch) | |
tree | 1fe241bdb3dac4dfd94906de0ebce3ea627512a2 /src/core/job.c | |
parent | 97e7d748d1bf26790fc3b2607885f4ac8c4ecf3a (diff) |
manager: Transaction as an object
This makes it obvious that transactions are short-lived. They are created in
manager_add_job() and destroyed after the application of jobs.
It also prepares for a split of the transaction code to a new source.
Diffstat (limited to 'src/core/job.c')
-rw-r--r-- | src/core/job.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/job.c b/src/core/job.c index 9199cf6a4b..543f37d0db 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -97,7 +97,7 @@ void job_free(Job *j) { free(j); } -JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts) { +JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts, Transaction *tr) { JobDependency *l; assert(object); @@ -118,20 +118,20 @@ JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool if (subject) LIST_PREPEND(JobDependency, subject, subject->subject_list, l); else - LIST_PREPEND(JobDependency, subject, object->manager->transaction_anchor, l); + LIST_PREPEND(JobDependency, subject, tr->anchor, l); LIST_PREPEND(JobDependency, object, object->object_list, l); return l; } -void job_dependency_free(JobDependency *l) { +void job_dependency_free(JobDependency *l, Transaction *tr) { assert(l); if (l->subject) LIST_REMOVE(JobDependency, subject, l->subject->subject_list, l); else - LIST_REMOVE(JobDependency, subject, l->object->manager->transaction_anchor, l); + LIST_REMOVE(JobDependency, subject, tr->anchor, l); LIST_REMOVE(JobDependency, object, l->object->object_list, l); |