Changeset 14100 for trunk/ippTools/src/camtool.c
- Timestamp:
- Jul 10, 2007, 11:36:32 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/camtool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r14023 r14100 34 34 static bool addprocessedexpMode(pxConfig *config); 35 35 static bool processedexpMode(pxConfig *config); 36 static bool revertprocessedexpMode(pxConfig *config); 36 37 static bool updateprocessedexpMode(pxConfig *config); 37 38 static bool blockMode(pxConfig *config); … … 62 63 MODECASE(CAMTOOL_MODE_ADDPROCESSEDEXP, addprocessedexpMode); 63 64 MODECASE(CAMTOOL_MODE_PROCESSEDEXP, processedexpMode); 65 MODECASE(CAMTOOL_MODE_REVERTPROCESSEDEXP, revertprocessedexpMode); 64 66 MODECASE(CAMTOOL_MODE_UPDATEPROCESSEDEXP, updateprocessedexpMode); 65 67 MODECASE(CAMTOOL_MODE_BLOCK, blockMode); … … 757 759 758 760 761 static bool revertprocessedexpMode(pxConfig *config) 762 { 763 PS_ASSERT_PTR_NON_NULL(config, false); 764 765 psString query = pxDataGet("camtool_revertprocessedexp.sql"); 766 if (!query) { 767 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 768 return false; 769 } 770 771 if (config->where) { 772 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "camProcessedExp"); 773 psStringAppend(&query, " AND %s", whereClause); 774 psFree(whereClause); 775 } 776 777 if (!p_psDBRunQuery(config->dbh, query)) { 778 psError(PS_ERR_UNKNOWN, false, "database error"); 779 psFree(query); 780 return false; 781 } 782 psFree(query); 783 784 if (psDBAffectedRows(config->dbh) < 1) { 785 psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row"); 786 return false; 787 } 788 789 return true; 790 } 791 792 759 793 static bool updateprocessedexpMode(pxConfig *config) 760 794 {
Note:
See TracChangeset
for help on using the changeset viewer.
