[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixe SEGV when use one delegated job and one or more failled jobs.
From: |
Franck Lombardi |
Subject: |
Re: Fixe SEGV when use one delegated job and one or more failled jobs. |
Date: |
Fri, 4 Oct 2002 15:44:15 +0200 |
User-agent: |
KMail/1.4.3 |
~12H00 to delivrer this mail, "houa" :)
Akim are OK with this solution ??
On Thursday 03 October 2002 17:10, Franck Lombardi wrote:
> In this sample :
> a2ps foo.deleg bar.none
> foo.deleg is a delegated job and bar.none don't exist
>
> This sample SEGV, because a2ps has only been used to delegate a single job.
> And in this case we work with "CURRENT_FILE (job)". If a failed job is
> after the delegated job, CURRENT_FILE (job) == the failed job.
>
> My solution is find the last job who don't a failed job.
>
> A other solution is to del the failed job when it is detected as a failed
> job but it is a more big patch.
>
> Index: ChangeLog
> from Franck Lombardi <address@hidden>
>
> * src/main.c: Fixe SEGV when use one delegated job and one
> or more failled jobs.
>
> Index: src/main.c
> ===================================================================
> RCS file: /cvsroot/a2ps/a2ps/src/main.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 main.c
> --- src/main.c 4 Mar 2002 18:46:28 -0000 1.1.1.1
> +++ src/main.c 3 Oct 2002 14:58:59 -0000
> @@ -1176,10 +1176,23 @@
> * in is this one!
> * To this end, we need to put more information in file_job
> * on how its processing went. */
> +
> + struct file_job * file_job;
> + size_t len;
> +
> + /* 'delegation_tmpname' is necessary not null else it is a
> + failed job and we ignore it */
> + file_job = CURRENT_FILE (job);
> + len = job->jobs->len;
> + while (!file_job->delegation_tmpname)
> + {
> + len--;
> + file_job = job->jobs->content[len - 1];
> + }
> +
> a2ps_open_output_stream (job);
> - pslex_dump (job->output_stream->fp,
> - CURRENT_FILE (job)->delegation_tmpname);
> - unlink (CURRENT_FILE (job)->delegation_tmpname);
> + pslex_dump (job->output_stream->fp, file_job->delegation_tmpname);
> + unlink (file_job->delegation_tmpname);
> a2ps_close_output_stream (job);
> msg_job_pages_printed (job);
> }
>
>
>
> _______________________________________________
> A2ps-patches mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/a2ps-patches
--
Franck Lombardi
EPITA Promotion 2004
fingerprint = BECF 5A99 EF09 3BB6 01EE B86A 05D3 87E7 1735 86D2