IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#379 closed defect (fixed)

psTrace fails to handle new file pointers correctly

Reported by: eugene Owned by: robert.desonia@…
Priority: high Milestone:
Component: sys Version: unspecified
Severity: normal Keywords:
Cc:

Description

There are two related problems here.

1) traceFP is defined static and set initially to NULL. Throughout the code,
wherever there is a use of traceFP, it it tested, and if NULL, printf statements
are used, otherwise fprintf statements are used. This leads to both code that
is hard to read, and also possible inconsistencies depending on the device

2) the function psTraceSetDestination was leaving the last value of traceFP open
and inaccesible. It was not closing it, nor was it testing for it to be closeable.

I have fixed both of these issues, and am attaching the updated code

Attachments (2)

psTrace.c (17.3 KB ) - added by eugene 21 years ago.
psTrace.c with fixes for psTraceSetDestination, NULL tests
psTrace.h (3.2 KB ) - added by eugene 21 years ago.
psTrace.h to match psTrace.c

Download all attachments as: .zip

Change History (4)

by eugene, 21 years ago

Attachment: psTrace.c added

psTrace.c with fixes for psTraceSetDestination, NULL tests

by eugene, 21 years ago

Attachment: psTrace.h added

psTrace.h to match psTrace.c

comment:1 by robert.desonia@…, 21 years ago

Resolution: fixed
Status: newclosed

files taken pretty much as is and folded into CVS.

comment:2 by robert.desonia@…, 21 years ago

N.B., the only change was to make the default destination stdout, not stderr, as
required by the SDRS.

Note: See TracTickets for help on using tickets.