Index: trunk/ippTools/src/p2updatePending.c
===================================================================
--- trunk/ippTools/src/p2updatePending.c	(revision 5881)
+++ trunk/ippTools/src/p2updatePending.c	(revision 6060)
@@ -2,22 +2,22 @@
 
 // select pending frames (exposure+images) which are not done, select their done images, count, update
-bool p2updatePendingFrames (p2SearchConfig *config, psArray *pendingFrames) {
+bool p2updatePendingFrames (p2Config *config, psArray *pendingFrames) {
 
     psMetadata *where = psMetadataAlloc ();
 
     // select all of the exposures which are still pending
-    psMetadataAddStr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_STATE_PENDING);
-    psArray *exposures = p2PendingExposureSelectRows (config->database, where, MAX_ROWS);
+    psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", 0, "==", P2_MODE_PENDING);
+    psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS);
 
     // we will now select all of the matching images which are done
-    psMetadataAddStr (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_STATE_DONE);
+    psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_MODE_DONE);
     for (int i = 0; i < exposures->n; i++) {
-	p2PendingExposure *exposure = exposures->data[i];
+	p2PendingExpRow *exposure = exposures->data[i];
 
 	// find the next available version numbers
-	psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID",     PS_META_REPLACE, "==", exposure->expID);
-	psMetadataAddStr (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->P2version);
-	psArray *images = p2PendingImageSelectRows (config->database, where, MAX_ROWS);
-	if (images->n != exposure->Nclass) {
+	psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID",     PS_META_REPLACE, "==", exposure->exp_id);
+	psMetadataAddS32 (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->p2_version);
+	psArray *images = p2PendingImfileSelectRowObjects (config->database, where, MAX_ROWS);
+	if (images->n != exposure->nclass) {
 	    // free things
 	    continue;
@@ -25,6 +25,6 @@
 	// frame is complete, set exposure state to done
 	// XXX add P2 stats here?
-	exposure->state = P2_STATE_DONE;
-	p2PendingExposureUpdateRows (config->database, exposure);
+//	exposure->state = P2_MODE_DONE;
+//	p2PendingExposureUpdateRows (config->database, exposure);
     }
     return true;
