IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36896


Ignore:
Timestamp:
Jun 17, 2014, 5:42:02 PM (12 years ago)
Author:
watersc1
Message:

Merged version

File:
1 edited

Legend:

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

    r36623 r36896  
    9595  // Get a list of the things we can insert into a new component
    9696  psString query = NULL;
     97  psString whereOption = psStringCopy("");
    9798  if (!strcmp(stage,"chip")) {
    9899    query = pxDataGet("remotetool_definebyquery_chip.sql");
     
    125126   
    126127    if (label) {
    127       psStringAppend(&query, " AND (warpRun.label = '%s')", label);
     128      // Because warp has to check to see if something other than the state is set correctly, I have to use this wonky way to pass the label in.
     129      //      psStringAppend(&query, " AND (warpRun.label = '%s')", label);
     130      psStringAppend(&whereOption, "\n AND (warpRun.label = '%s')", label);
    128131    }
    129132  }   
     
    149152    psFree(limitString);
    150153  }
    151   if (!p_psDBRunQuery(config->dbh, query)) {
     154  if (!p_psDBRunQueryF(config->dbh, query,whereOption)) {
    152155    psError(PS_ERR_UNKNOWN, false, "database error");
    153156    psFree(query);
     
    313316{
    314317  PS_ASSERT_PTR_NON_NULL(config, false);
    315   // PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
     318  PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
     319  psAssert(remote_id,"This should have failed before this point.");
    316320 
    317321  psMetadata *where = psMetadataAlloc();
     
    341345{
    342346  PS_ASSERT_PTR_NON_NULL(config, false);
    343   // PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
    344  
     347  PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
     348  psAssert(remote_id,"This should have failed before this point.");
     349
    345350  psMetadata *where = psMetadataAlloc();
    346351  // Wheres
Note: See TracChangeset for help on using the changeset viewer.