Changeset 12024 for trunk/ippTools/src/regtool.c
- Timestamp:
- Feb 23, 2007, 3:41:56 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r11997 r12024 39 39 40 40 // static p1PendingExpRow *newToP1PendingExp(newExpRow *newExp); 41 static p2PendingExpRow *newToP2PendingExp(pxConfig *config, newExpRow *newExp);42 static p2PendingImfileRow *rawImfileToP2PendingImfile(pxConfig *config, rawImfileRow *rawImfile);41 static chipPendingExpRow *newTochipPendingExp(pxConfig *config, newExpRow *newExp); 42 static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile); 43 43 44 44 static rawExpRow *newToRawExp(pxConfig *config, newExpRow *exp); … … 672 672 } 673 673 674 // if this is a detrend image don't put it in the p2queue (and we're674 // if this is a detrend image don't put it in the chip queue (and we're 675 675 // done) 676 676 if (detrend) { … … 679 679 } 680 680 681 // insert an entry into the p2PendingExp table682 p2PendingExpRow *p2PendingExp = newToP2PendingExp(config, newExp);683 if (! p2PendingExp) {684 psError(PS_ERR_UNKNOWN, false, "failed to convert newExp to p2PendingExp");681 // insert an entry into the chipPendingExp table 682 chipPendingExpRow *chipPendingExp = newTochipPendingExp(config, newExp); 683 if (!chipPendingExp) { 684 psError(PS_ERR_UNKNOWN, false, "failed to convert newExp to chipPendingExp"); 685 685 psFree(newExp); 686 686 psFree(output); … … 688 688 } 689 689 690 // insert the p2PendingExp object into the database691 if (! p2PendingExpInsertObject(config->dbh, p2PendingExp)) {690 // insert the chipPendingExp object into the database 691 if (!chipPendingExpInsertObject(config->dbh, chipPendingExp)) { 692 692 // rollback 693 693 if (!psDBRollback(config->dbh)) { … … 695 695 } 696 696 psError(PS_ERR_UNKNOWN, false, "database error"); 697 psFree( p2PendingExp);697 psFree(chipPendingExp); 698 698 psFree(newExp); 699 699 psFree(output); 700 700 return false; 701 701 } 702 psFree( p2PendingExp);703 704 // find all of the rawImfiles associated with the p2PendingExp object702 psFree(chipPendingExp); 703 704 // find all of the rawImfiles associated with the chipPendingExp object 705 705 psArray *rawImfiles = NULL; 706 706 { … … 744 744 return false; 745 745 } 746 // convert the rawImfiles into p2PendingImfiles and insert them into746 // convert the rawImfiles into chipPendingImfiles and insert them into 747 747 // the database 748 748 for (long i = 0; i < psArrayLength(rawImfiles); i++) { 749 749 rawImfileRow *rawImfile = rawImfiles->data[i]; 750 p2PendingImfileRow *pendingImfile = rawImfileToP2PendingImfile(config, rawImfile);751 if (! p2PendingImfileInsertObject(config->dbh, pendingImfile)){750 chipPendingImfileRow *pendingImfile = rawImfileTochipPendingImfile(config, rawImfile); 751 if (!chipPendingImfileInsertObject(config->dbh, pendingImfile)){ 752 752 // rollback 753 753 if (!psDBRollback(config->dbh)) { … … 915 915 916 916 917 static p2PendingExpRow *newToP2PendingExp(pxConfig *config, newExpRow *exp)917 static chipPendingExpRow *newTochipPendingExp(pxConfig *config, newExpRow *exp) 918 918 { 919 919 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 928 928 } 929 929 930 p2PendingExpRow *p2Exp = p2PendingExpRowAlloc(930 chipPendingExpRow *chipExp = chipPendingExpRowAlloc( 931 931 exp->exp_tag, 932 0x0, // p2version XXX calc version number932 0x0, // chip version XXX calc version number 933 933 0xdeadbeef, // p1 version 934 934 label, … … 938 938 ); 939 939 940 return p2Exp;941 } 942 943 944 static p2PendingImfileRow *rawImfileToP2PendingImfile(pxConfig *config, rawImfileRow *rawImfile)945 { 946 return p2PendingImfileRowAlloc(940 return chipExp; 941 } 942 943 944 static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile) 945 { 946 return chipPendingImfileRowAlloc( 947 947 rawImfile->exp_tag, 948 0x0, // p2version XXX calc version number948 0x0, // chip version XXX calc version number 949 949 0xdeadbeef, // p1 version 950 950 rawImfile->class_id,
Note:
See TracChangeset
for help on using the changeset viewer.
