Changeset 25316 for trunk/ippTools/src/pstamptool.c
- Timestamp:
- Sep 10, 2009, 11:56:40 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pstamptool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pstamptool.c
r25281 r25316 226 226 PS_ASSERT_PTR_NON_NULL(config, false); 227 227 228 PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false); 229 // PXOPT_LOOKUP_STR(outFileset, config->args, "-out_fileset", true, false); 230 PXOPT_LOOKUP_S64(ds_id, config->args, "-ds_id", false, false); 231 232 char *query ="INSERT INTO pstampRequest" 233 " (state, uri, ds_id, fault)" 234 " VALUES( 'new', '%s', %" PRId64 ", 0 )"; 235 if (!p_psDBRunQueryF(config->dbh, query, uri, ds_id)) { 236 psError(PS_ERR_UNKNOWN, false, "database error"); 237 return false; 238 } 239 240 psU64 affected = psDBAffectedRows(config->dbh); 241 if (affected != 1) { 242 psError(PS_ERR_UNKNOWN, false, 243 "should have affected one row but %" PRIu64 " rows were modified", 244 affected); 228 PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false); 229 PXOPT_LOOKUP_STR(name, config->args, "-name", false, false); 230 PXOPT_LOOKUP_S64(ds_id, config->args, "-ds_id", false, false); 231 232 if (!pstampRequestInsert(config->dbh, 233 0, // req_id 234 ds_id, 235 "new", //state 236 name, 237 NULL, // reqType 238 NULL, // outProduct 239 uri, 240 0 // fault 241 )) { 242 psError(PS_ERR_UNKNOWN, false, "failed to insert request"); 245 243 return false; 246 244 } … … 319 317 psMetadata *where = psMetadataAlloc(); 320 318 PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "=="); 319 PXOPT_COPY_S64(config->args, where, "-not_req_id", "req_id", "!="); 321 320 PXOPT_COPY_STR(config->args, where, "-name", "name", "=="); 322 321
Note:
See TracChangeset
for help on using the changeset viewer.
