IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5524


Ignore:
Timestamp:
Nov 16, 2005, 10:52:23 AM (21 years ago)
Author:
drobbin
Message:

Fixed memory leaks from EOC Init fxn.

Location:
trunk/psLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psEarthOrientation.c

    r5522 r5524  
    88*  @author Robert Daniel DeSonia, MHPCC
    99*
    10 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-11-16 02:40:13 $
     10*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-11-16 20:52:23 $
    1212*
    1313*  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    165165    psFree(yCoeff);
    166166    psFree(sCoeff);
     167    psFree(eocMetadata);
    167168
    168169    return true;
  • trunk/psLib/src/sys/psConfigure.c

    r4540 r5524  
    1313 *  @author Robert DeSonia, MHPCC
    1414 *
    15  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2005-07-12 19:12:01 $
     15 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2005-11-16 20:52:23 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2020#include "psString.h"
    2121#include "psTime.h"
     22#include "psEarthOrientation.h"
    2223#include "psError.h"
    2324#include "psConfigure.h"
     
    4344        return;
    4445    }
     46    if(!p_psEOCInit()) {
     47        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     48                PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED, "psEOC");
     49        return;
     50    }
    4551}
    4652
     
    5460        return;
    5561    }
     62    if(!p_psEOCFinalize()) {
     63        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     64                PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED, "psEOC");
     65        return;
     66    }
    5667}
  • trunk/psLib/test/astro/tst_psEarthOrientation.c

    r5522 r5524  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-11-16 02:40:13 $
     7*  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-11-16 20:52:23 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    171171    psFree(UT1time);
    172172    //Check return values from valid precession input
    173     /*
    174         pmodel = psEOC_PrecessionModel(time);
    175         if ( pmodel == NULL ) {
    176             psError(PS_ERR_BAD_PARAMETER_NULL, false,
    177                     "psEOC_PrecessionModel returned NULL for valid input.\n");
    178             return 3;
    179         } else {
    180             printf("Precession Model output = x,y,s = %.8g, %.8g, %.8g\n",
    181                    pmodel->x, pmodel->y, pmodel->s);
    182         }
    183         psFree(pmodel);
    184     */
     173
     174    pmodel = psEOC_PrecessionModel(time);
     175    if ( pmodel == NULL ) {
     176        psError(PS_ERR_BAD_PARAMETER_NULL, false,
     177                "psEOC_PrecessionModel returned NULL for valid input.\n");
     178        return 3;
     179    } else {
     180        printf("Precession Model output = x,y,s = %.8g, %.8g, %.8g\n\n",
     181               pmodel->x, pmodel->y, pmodel->s);
     182    }
     183    psFree(pmodel);
     184
    185185
    186186    //Tests for Precession Correction function//
     
    228228
    229229    psFree(time);
    230     /*    if (!p_psEOCFinalize() ) {
    231             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "EOC failed finalization!\n");
    232             return 12;
    233         }
    234     */
     230    if (!p_psEOCFinalize() ) {
     231        psError(PS_ERR_BAD_PARAMETER_VALUE, false, "EOC failed finalization!\n");
     232        return 12;
     233    }
     234
    235235    return 0;
    236236}
  • trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout

    r5508 r5524  
    33
    44Actual r,d = 0.61001,0.01999    Apparent r,d = 0.6100100000001365, 0.01999000000006505
     5Precession Model output = x,y,s = 1.1557751e+08, 8865375.4, -5.1231901e+14
     6
    57Precession Correction output (IERSA) = x,y,s = 0.26026728, 0.26026728, -0.61282361
    68Precession Correction output (IERSB) = x,y,s = 0.26026728, 0.26026728, 0
Note: See TracChangeset for help on using the changeset viewer.