Index: trunk/ippTools/src/camtool.c
===================================================================
--- trunk/ippTools/src/camtool.c	(revision 26095)
+++ trunk/ippTools/src/camtool.c	(revision 26113)
@@ -184,8 +184,8 @@
         bool status;
         char *end_stage = psMetadataLookupStr(&status, md, "end_stage");
-	if (end_stage && strcasecmp(end_stage, "warp")) continue;
+        if (end_stage && strcasecmp(end_stage, "warp")) continue;
 
         char *raw_tess_id   = psMetadataLookupStr(&status, md, "tess_id");
-	if (raw_tess_id || tess_id) continue;
+        if (raw_tess_id || tess_id) continue;
 
         char *label  = psMetadataLookupStr(&status, md, "label");
@@ -193,5 +193,5 @@
 
         if (!status) {
-	    psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
+            psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
             psFree(output);
             return false;
@@ -479,5 +479,5 @@
     PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
-    
+
     PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false);
 
@@ -603,12 +603,4 @@
     }
 
-    // since there is only one exp per 'new' set camRun.state = 'full'
-    if (!pxcamRunSetState(config, row->cam_id, "full", magicked)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to change camRun.state for cam_id: %" PRId64, row->cam_id);
-        psFree(row);
-        psFree(pendingRow);
-        return false;
-    }
-
     // NULL for end_stage means go as far as possible
     // EAM : skip here if fault != 0
@@ -623,6 +615,14 @@
         return true;
     }
+    // else continue on...
+
+    // since there is only one exp per 'new' set camRun.state = 'full'
+    if (!pxcamRunSetState(config, row->cam_id, "full", magicked)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to change camRun.state for cam_id: %" PRId64, row->cam_id);
+        psFree(row);
+        psFree(pendingRow);
+        return false;
+    }
     psFree(row);
-    // else continue on...
 
     if (!pxfakeQueueByCamID(config,
@@ -691,5 +691,5 @@
         psStringAppend(&query, " WHERE %s", whereClause);
         psFree(whereClause);
-    } 
+    }
 
     // we either add AND (condition) or WHERE (condition):
@@ -697,5 +697,5 @@
         // list only faulted rows
         psStringAppend(&query, " %s", " AND camProcessedExp.fault != 0");
-    } 
+    }
     if (where->list && !faulted) {
         // don't list faulted rows
@@ -705,5 +705,5 @@
         // list only faulted rows
         psStringAppend(&query, " %s", " WHERE camProcessedExp.fault != 0");
-    } 
+    }
     if (!where->list && !faulted) {
         // don't list faulted rows
