When a job is done, we should be able to trigger a callback. This could be used to free the data within, or some other required cleanup.
This should be executed on "job done" to an ns_job.
attachment 0001-Ticket-54-job-done-callback.patch
code for comment is incomplete - you are missing the job argument to ns_create_job.
job
Are you missing the cond. var. in the test in the ns_init_test_job_cb?
Replying to [comment:1 rmeggins]:
That I am. Fixed.
No? ns_job_done_cb_test sets up the job with ns_init_do_nothing_cb, and then blocks on PR_WaitCondVar(cb_cond, PR_SecondsToInterval(1)); which should be set by ns_init_test_job_cb.
If you mean declarations, static PRCondVar *cb_cond = NULL; is global, and is created / destroyed in setup/teardown.
Update based on comments. 0001-Ticket-54-job-done-callback.2.patch
commit 7ef7ec1 Writing objects: 100% (8/8), 1.94 KiB | 0 bytes/s, done. Total 8 (delta 6), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/nunc-stans.git 63e2cec..7ef7ec1 master -> master
Supplementary patch, move the callback to after the fd free. 0003-Ticket-54-Move-job-done-callback.patch
commit 607d484 Compressing objects: 100% (25/25), done. Writing objects: 100% (27/27), 50.14 KiB | 0 bytes/s, done. Total 27 (delta 20), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/nunc-stans.git 7ef7ec1..7a4ce78 master -> master
Login to comment on this ticket.