Changeset 25109
- Timestamp:
- Aug 18, 2009, 11:56:59 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pstamptool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pstamptool.c
r25075 r25109 315 315 PS_ASSERT_PTR_NON_NULL(config, false); 316 316 317 PXOPT_LOOKUP_S64(req_id, config->args, "-req_id", false, false); 318 PXOPT_LOOKUP_STR(name, config->args, "-name", false, false); 317 psMetadata *where = psMetadataAlloc(); 318 PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "=="); 319 PXOPT_COPY_STR(config->args, where, "-name", "name", "=="); 320 319 321 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 320 322 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 321 323 322 if (! req_id && !name) {324 if (!psListLength(where->list)) { 323 325 psError(PS_ERR_UNKNOWN, true, "-req_id or -name must be supplied"); 324 326 return false; 325 327 } 326 328 327 psString query = NULL; 328 psStringAppend(&query, "SELECT * from pstampRequest WHERE req_id = %" PRId64, req_id); 329 psString query = psStringCopy("SELECT * from pstampRequest"); 330 331 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 332 psStringAppend(&query, " WHERE %s", whereClause); 333 psFree(whereClause); 334 psFree(where); 329 335 330 336 // treat limit == 0 as "no limit" … … 523 529 524 530 // default value for job_type is defined in pstamptoolConfig.c 525 if (!strcmp(job_type, "get_image") || !strcmp(job_type, "detect_query") ) {531 if (!strcmp(job_type, "get_image") || !strcmp(job_type, "detect_query") || !strcmp(job_type, "none")) { 526 532 stampJob = false; 527 533 } else if (!strcmp(job_type, "stamp")) {
Note:
See TracChangeset
for help on using the changeset viewer.
