Changeset 18336 for trunk/ippTools/src/pxinject.c
- Timestamp:
- Jun 26, 2008, 3:39:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxinject.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxinject.c
r17872 r18336 91 91 92 92 if (!newExpInsert(config->dbh, 93 0 x0, // exp_id93 0, // exp_id 94 94 tmp_exp_name, 95 95 tmp_camera, … … 110 110 } 111 111 112 psS64 lastInsertID = psDBLastInsertID(config->dbh); 113 psString exp_id = psDBIntToString(lastInsertID); 112 psS64 exp_id = psDBLastInsertID(config->dbh); 114 113 115 114 psMetadata *md = psMetadataAlloc(); 116 if (!psMetadataAddS tr(md, PS_LIST_TAIL, "exp_id", 0, NULL, exp_id)) {115 if (!psMetadataAddS64(md, PS_LIST_TAIL, "exp_id", 0, NULL, exp_id)) { 117 116 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 118 117 psFree(md); 119 psFree(exp_id);120 118 } 121 psFree(exp_id);122 119 123 120 // negate simple so the default is true … … 137 134 PS_ASSERT_PTR_NON_NULL(config, false); 138 135 139 PXOPT_LOOKUP_S TR(exp_id, config->args, "-exp_id", true, false);136 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); 140 137 PXOPT_LOOKUP_STR(tmp_class_id, config->args, "-tmp_class_id", true, false); 141 138 PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false); 142 139 143 140 // insert with error flag state set to 0 (no errors) 144 if (!newImfileInsert(config->dbh, (psS64)atoll(exp_id), tmp_class_id, uri, NULL)) {141 if (!newImfileInsert(config->dbh, exp_id, tmp_class_id, uri, NULL)) { 145 142 psError(PS_ERR_UNKNOWN, false, "database error"); 146 143 return false; … … 155 152 PS_ASSERT_PTR_NON_NULL(config, false); 156 153 157 PXOPT_LOOKUP_S TR(exp_id, config->args, "-exp_id", true, false);154 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); 158 155 PXOPT_LOOKUP_STR(state, config->args, "-state", true, false); 159 156
Note:
See TracChangeset
for help on using the changeset viewer.
