Index: /trunk/ippTools/src/p2searchPendingFrames.c
===================================================================
--- /trunk/ippTools/src/p2searchPendingFrames.c	(revision 6111)
+++ /trunk/ippTools/src/p2searchPendingFrames.c	(revision 6112)
@@ -2,49 +2,50 @@
 
 // select pending frames (exposure+images) which are done/not done
-psArray *p2searchPendingFrames (p2Config *config) {
+psArray *p2searchPendingFrames(p2Config *config) {
 
     // build 'where' structure
-    psMetadata *where = psMetadataAlloc ();
+    psMetadata *where = psMetadataAlloc();
 
     // in order to include these restrictions, we need to define these table columns
     if (config->camera_name != NULL) {
-        psMetadataAddStr (where, PS_LIST_TAIL, "camera", 0, "==",
+        psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==",
             config->camera_name);
     }
     if (config->filter != NULL) {
-        psMetadataAddStr (where, PS_LIST_TAIL, "FILTER", 0, "==",
+        psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==",
             config->filter);
     }
     /*
     if (!psTimeIsZero(config->start) && !psTimeIsZero(config->stop)) {
-    psMetadataAddTime (where, PS_LIST_TAIL, "TIME_START", 0, "<", config->stop);
-    psMetadataAddTime (where, PS_LIST_TAIL, "TIME_STOP", 0, ">", config->start);
+        psMetadataAddTime(where, PS_LIST_TAIL, "TIME_START", 0, "<", config->stop);
+        psMetadataAddTime(where, PS_LIST_TAIL, "TIME_STOP", 0, ">", config->start);
     }
     */
 
-    psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS);
-    psFree (where);
+    psArray *exposures = p2PendingExpSelectRowObjects(config->database, where, MAX_ROWS);
+    psFree(where);
 
     // output array of rawSet
-    psArray *frames = psArrayAlloc (exposures->n);
+    psArray *frames = psArrayAlloc(exposures->n);
 
     // 'where' to select each exposure
-    where = psMetadataAlloc ();
+    where = psMetadataAlloc();
     for (int i = 0; i < exposures->n; i++) {
-	p2PendingExpRow *exposure = exposures->data[i];
-	
-	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);
+        p2PendingExpRow *exposure = exposures->data[i];
 
-	psArray *images = p2PendingImfileSelectRowObjects (config->database, where, MAX_ROWS);
+        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);
 
-	p2PendingFrame *frame = p2PendingFrameAlloc (exposure, images);
+        psArray *images = p2PendingImfileSelectRowObjects(config->database, where, MAX_ROWS);
 
-	psArrayAdd (frames, 100, frame);
+        p2PendingFrame *frame = p2PendingFrameAlloc(exposure, images);
+
+        psArrayAdd(frames, 100, frame);
     }
+
     return frames;
 } 
 
-// XXX EAM : this may be more efficient if we just select all p2PendingImages which
-// have the appropriate state.  that would limit the ability to filter the selection.
-// test to see how well/poorly this performs
+// XXX EAM : this may be more efficient if we just select all p2PendingImages
+// which have the appropriate state.  that would limit the ability to filter
+// the selection.  test to see how well/poorly this performs
