X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=job.c;h=acf8294bc1d28c67409d4f0bf4e7c6f129ec854b;hb=8f6739048c2593e196aceb654b4b96e1426e57d5;hp=12c450ab177567155e2af75458c540e5e4eed6c4;hpb=85f5a14903a2ffcbea92b3dffded303b69d1d712;p=apps%2Fpfixtools.git diff --git a/job.c b/job.c index 12c450a..acf8294 100644 --- a/job.c +++ b/job.c @@ -66,8 +66,8 @@ DO_DELETE(job_t, job); void job_release(job_t **job) { if (*job) { - if ((*job)->task && (*job)->task->stop) { - (*job)->task->stop(*job); + if ((*job)->stop) { + (*job)->stop(*job); } job_delete(job); } @@ -121,9 +121,10 @@ job_t *job_accept(job_t *listener, int state) return NULL; } - res = job_new(); - res->fd = sock; - res->state = state; - res->task = listener->task; + res = job_new(); + res->fd = sock; + res->state = state; + res->process = listener->process; + res->stop = listener->stop; return job_register_fd(res); }