Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 8849)
+++ trunk/ippTools/src/chiptool.c	(revision 9057)
@@ -92,6 +92,6 @@
             for (long j = 0; j < pendingFrames->n; j++) {
                 p2PendingFrame *pendingFrame = pendingFrames->data[j];
-                if (strcmp(rawFrame->exposure->exp_id,
-                           pendingFrame->exposure->exp_id) == 0) {
+                if (strcmp(rawFrame->exposure->exp_tag,
+                           pendingFrame->exposure->exp_tag) == 0) {
                     psArrayRemove(rawFrames, rawFrame);
                     // dec the counter as the array just got shorter
@@ -111,6 +111,6 @@
                 for (long j = 0; j < pendingFrames->n; j++) {
                     p2DoneFrame *doneFrame = pendingFrames->data[j];
-                    if (strcmp(rawFrame->exposure->exp_id,
-                               doneFrame->exposure->exp_id) == 0) {
+                    if (strcmp(rawFrame->exposure->exp_tag,
+                               doneFrame->exposure->exp_tag) == 0) {
                         psArrayRemove(rawFrames, rawFrame);
                         // dec the counter as the array just got shorter
@@ -178,5 +178,5 @@
     // select * from p2ProcessedImfiles
     // where
-    // exp_id & class_id are not in p2PendingImfile
+    // exp_tag & class_id are not in p2PendingImfile
 
     // add the completed imfile to
@@ -193,7 +193,7 @@
         " FROM p2PendingImfile "
         " LEFT JOIN p2ProcessedImfile"
-        "   USING(exp_id, class_id)"
+        "   USING(exp_tag, class_id)"
         " WHERE"
-        "  p2ProcessedImfile.exp_id IS NULL"
+        "  p2ProcessedImfile.exp_tag IS NULL"
         "  AND p2ProcessedImfile.class_id IS NULL"
         );
@@ -201,12 +201,12 @@
         psMetadata *where = psMetadataAlloc();
         bool status = false;
-        psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");        if (!status) {
-            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
+        psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");        if (!status) {
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_tag");
             psFree(query);
             return false;
         }
-        if (exp_id) {
-            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", exp_id)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
+        if (exp_tag) {
+            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) {
+                psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
                 psFree(where);
                 psFree(query);
@@ -339,6 +339,6 @@
 
     // select * from p2PendingExp
-    // where exp_id is not in p2ProcessedExp
-    // where exp_id is not in p2PendingImfile
+    // where exp_tag is not in p2ProcessedExp
+    // where exp_tag is not in p2PendingImfile
     // where the number of entries in p2ProccessedImfile matches the .imfiles
     // entry in rawScienceExp
@@ -350,17 +350,17 @@
         " FROM p2PendingExp"
         " JOIN rawScienceExp"
-        "   ON p2PendingExp.exp_id = rawScienceExp.exp_id"
+        "   ON p2PendingExp.exp_tag = rawScienceExp.exp_tag"
         " LEFT JOIN p2ProcessedExp"
-        "   ON p2PendingExp.exp_id = p2ProcessedExp.exp_id"
+        "   ON p2PendingExp.exp_tag = p2ProcessedExp.exp_tag"
         " LEFT JOIN p2PendingImfile"
-        "   ON p2PendingExp.exp_id = p2PendingImfile.exp_id"
+        "   ON p2PendingExp.exp_tag = p2PendingImfile.exp_tag"
         " LEFT JOIN p2ProcessedImfile"
-        "   ON p2PendingExp.exp_id = p2ProcessedImfile.exp_id"
+        "   ON p2PendingExp.exp_tag = p2ProcessedImfile.exp_tag"
         " WHERE"
-        "  p2ProcessedExp.exp_id IS NULL"
-        "  AND p2PendingImfile.exp_id IS NULL"
-        "  AND p2ProcessedImfile.exp_id IS NOT NULL"
+        "  p2ProcessedExp.exp_tag IS NULL"
+        "  AND p2PendingImfile.exp_tag IS NULL"
+        "  AND p2ProcessedImfile.exp_tag IS NOT NULL"
         " GROUP BY"
-        "   p2PendingExp.exp_id"
+        "   p2PendingExp.exp_tag"
         " HAVING rawScienceExp.imfiles = COUNT(p2ProcessedImfile.class_id)"
         );
@@ -514,5 +514,5 @@
 
     return p2ProcessedImfileRowAlloc(
-        imfile->exp_id,
+        imfile->exp_tag,
         imfile->class_id,
         uri,
@@ -533,5 +533,5 @@
 
     return p2ProcessedExpRowAlloc(
-        pendingExp->exp_id,
+        pendingExp->exp_tag,
         pendingExp->p1_version,
         pendingExp->p2_version
@@ -544,5 +544,5 @@
 
     return p3PendingExpRowAlloc(
-        pendingExp->exp_id,
+        pendingExp->exp_tag,
         pendingExp->p1_version,
         pendingExp->p2_version
