IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2013, 3:01:21 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130307
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307

  • branches/eam_branches/ipp-20130307/ippTools/src

  • branches/eam_branches/ipp-20130307/ippTools/src/pstamptool.c

    r34123 r35350  
    287287    PXOPT_LOOKUP_S64(ds_id,       config->args, "-ds_id", false, false);
    288288
     289    PXOPT_LOOKUP_STR(username,    config->args, "-username",  false, false);
     290    PXOPT_LOOKUP_S64(proj_id,     config->args, "-proj_id", false, false);
     291
     292    psTime *now = psTimeGetNow(PS_TIME_TAI);
     293
    289294    if (!pstampRequestInsert(config->dbh,
    290295        0,      // req_id
     
    297302        uri,
    298303        NULL,   // outdir
    299         NULL,   // timestamp
     304        username,
     305        proj_id,
     306        now,    // registered
     307        now,    // timestamp
    300308        0       // fault
    301309        )) {
     
    444452    PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "==");
    445453    PXOPT_COPY_S64(config->args, where, "-not_req_id", "req_id", "!=");
    446     PXOPT_COPY_STR(config->args, where, "-name", "name", "==");
     454    PXOPT_COPY_STR(config->args, where, "-name", "name", "LIKE");
     455    PXOPT_COPY_STR(config->args, where, "-username", "username", "==");
     456    PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
    447457
    448458    PXOPT_LOOKUP_U64(limit,   config->args, "-limit",  false, false);
     
    450460
    451461    if (!psListLength(where->list)) {
    452         psError(PS_ERR_UNKNOWN, true, "-req_id or -name must be supplied");
     462        psError(PS_ERR_UNKNOWN, true, "search paramters are required");
    453463        return false;
    454464    }
     
    482492    if (!psArrayLength(output)) {
    483493        psTrace("pstamptool", PS_LOG_INFO, "request not found");
    484         // This causes main to exit with PS_EXIT_DATA_ERROR which the script is looking for
     494        // This causes main to exit with PS_EXIT_DATA_ERROR which the pstamp scripts are looking for
    485495        psError(PXTOOLS_ERR_CONFIG, true, "request not found");
    486496        psFree(output);
    487         // we return false so that the caller can determine that a request does not exist
     497        // we return false so that the caller can easily determine that a request does not exist
    488498        return false;
    489499    }
     
    567577    PXOPT_LOOKUP_STR(label,      config->args, "-set_label",      false, false);
    568578    PXOPT_LOOKUP_STR(outProduct, config->args, "-set_outProduct", false, false);
    569     PXOPT_LOOKUP_S16(fault,      config->args, "-set_fault",          false, false);
     579    PXOPT_LOOKUP_S16(fault,      config->args, "-set_fault",      false, false);
    570580    PXOPT_LOOKUP_STR(uri,        config->args, "-set_uri",        false, false);
    571     PXOPT_LOOKUP_STR(outdir,     config->args, "-set_outdir",        false, false);
     581    PXOPT_LOOKUP_STR(outdir,     config->args, "-set_outdir",     false, false);
    572582    PXOPT_LOOKUP_STR(name,       config->args, "-set_name",       false, false);
     583    PXOPT_LOOKUP_STR(username,   config->args, "-set_username",   false, false);
    573584    PXOPT_LOOKUP_STR(reqType,    config->args, "-set_reqType",    false, false);
    574     PXOPT_LOOKUP_BOOL(clearfault,config->args, "-clearfault",    false);
    575 
    576     if (!state && !label && !outProduct && !fault && !uri && !outdir && !name && !reqType && !clearfault) {
     585    PXOPT_LOOKUP_BOOL(clearfault,config->args, "-clearfault",     false);
     586
     587    if (!state && !label && !outProduct && !fault && !uri && !outdir && !name && !username && !reqType && !clearfault) {
    577588        psError(PS_ERR_UNKNOWN, true, "at least one set option is required");
    578589        return false;
     
    584595    PXOPT_COPY_S32(config->args, where, "-fault",      "fault", "==");
    585596    PXOPT_COPY_STR(config->args, where, "-state",      "state", "==");
    586     PXOPT_COPY_STR(config->args, where, "-reqType",     "reqType", "==");
    587     PXOPT_COPY_STR(config->args, where, "-name",     "name", "LIKE");
     597    PXOPT_COPY_STR(config->args, where, "-reqType",    "reqType", "==");
     598    PXOPT_COPY_STR(config->args, where, "-name",       "name", "LIKE");
     599    PXOPT_COPY_STR(config->args, where, "-username",   "username", "==");
    588600    PXOPT_COPY_TIME(config->args, where, "-timestamp_begin", "timestamp", ">=");
    589601    PXOPT_COPY_TIME(config->args, where, "-timestamp_end", "timestamp", "<=");
Note: See TracChangeset for help on using the changeset viewer.