IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10029


Ignore:
Timestamp:
Nov 16, 2006, 3:59:09 PM (20 years ago)
Author:
jhoblitt
Message:

remove support for generating exp_tags()
fix early exit()
fix memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pzgetexp.c

    r10020 r10029  
    8484            lastFileSet = psMetadataLookupStr(&status, output->data[0], "exp_id");
    8585        }
     86
     87        psFree(output);
    8688    }
    8789
     
    106108    if (!output) {
    107109        psError(PS_ERR_UNKNOWN, true, "popen() failed");
    108         goto FAIL;
     110        return false;
    109111    }
    110112    psString cmdOutput = psSlurpFile(output);
     
    116118        // XXX not nessicarily an error
    117119        psError(PS_ERR_UNKNOWN, true, "no new fileSet/exp IDs");
    118         goto FAIL;
     120        return false;
    119121    }
    120122    if (!psArrayLength(newSummitExps)) {
     
    132134            psError(PS_ERR_UNKNOWN, false, "database error");
    133135            psFree(newSummitExps);
    134             goto FAIL;
     136            return false;
    135137        }
    136138    }
     
    143145            psError(PS_ERR_UNKNOWN, false, "database error");
    144146            psFree(newSummitExps);
    145             goto FAIL;
     147            return false;
    146148        }
    147149        // sanity check that we actually inserted something
     
    149151            psError(PS_ERR_UNKNOWN, false, "database error -- we should have inserted at least one row");
    150152            psFree(newSummitExps);
    151             goto FAIL;
     153            return false;
    152154        }
    153155    }
     
    163165            "       incoming.exp_id,"
    164166            "       incoming.camera,"
    165             "       incoming.telescope,"
    166             "       gentag(incoming.exp_id)"
     167            "       incoming.telescope"
    167168            "   FROM incoming"
    168169            "   LEFT JOIN summitExp"
     
    175176        if (!p_psDBRunQuery(config->dbh, query)) {
    176177            psError(PS_ERR_UNKNOWN, false, "database error");
    177             goto FAIL;
     178            return false;
    178179        }
    179180    }
     
    196197        if (!p_psDBRunQuery(config->dbh, query)) {
    197198            psError(PS_ERR_UNKNOWN, false, "database error");
    198             goto FAIL;
    199         }
    200     }
    201 
    202     psFree(config);
    203 
    204     exit(EXIT_SUCCESS);
    205 
    206 FAIL:
    207     psFree(config);
    208 
    209     exit(EXIT_FAILURE);
     199            return false;
     200        }
     201    }
     202
     203    return true;
    210204}
    211205
Note: See TracChangeset for help on using the changeset viewer.