Index: /branches/backtrack/ippTools/src/Makefile.am
===================================================================
--- /branches/backtrack/ippTools/src/Makefile.am	(revision 13995)
+++ /branches/backtrack/ippTools/src/Makefile.am	(revision 13996)
@@ -57,7 +57,5 @@
 	pxregister.c \
 	pxchip.c \
-	pxcam.c \
-	chipqueue.c \
-	camqueue.c
+	pxcam.c
 
 # for pxtools.h
Index: anches/backtrack/ippTools/src/camqueue.c
===================================================================
--- /branches/backtrack/ippTools/src/camqueue.c	(revision 13995)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- * camqueue.c
- *
- * Copyright (C) 2007  Joshua Hoblitt
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * program; see the file COPYING. If not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "pxtools.h"
-#include "pxdata.h"
-#include "camtool.h"
-
-bool camQueueChipID(pxConfig *config,
-                    psS64 chip_id,
-                    psString workdir,
-                    psString label,
-                    psString recipe,
-                    psString expgroup,
-                    psString dvodb)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    // load the SQL to enqueue our exp_tags from disk once
-    static psString query = NULL;
-    if (!query) {
-        query = pxDataGet("camtool_queue_chip_id.sql");
-        psMemSetPersistent(query, true);
-        if (!query) {
-            psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
-            return false;
-        }
-    }
-
-    // queue the exp
-    // XXX chip_id is being cast here work around psS64 have a different type
-    // different on 32/64
-    if (!p_psDBRunQuery(config->dbh, query,
-                "run", // state
-                workdir  ? workdir  : "NULL",
-                "dirty", //workdir_state
-                label    ? label    : "NULL",
-                recipe   ? recipe   : "NULL",
-                expgroup ? expgroup : "NULL",
-                dvodb    ? dvodb    : "NULL",
-                (long long)chip_id
-    )) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    // just to be safe, we should have changed at least one row
-    if (psDBAffectedRows(config->dbh) < 1) {
-        psError(PS_ERR_UNKNOWN, false,
-                "no rows affected - should have changed at least one row");
-        return false;
-    }
-
-    return true;
-}
Index: /branches/backtrack/ippTools/src/camtool.c
===================================================================
--- /branches/backtrack/ippTools/src/camtool.c	(revision 13995)
+++ /branches/backtrack/ippTools/src/camtool.c	(revision 13996)
@@ -258,5 +258,5 @@
 
         // queue the exp
-        if (!camQueueChipID(config,
+        if (!pxcamQueueByChipID(config,
                     row->chip_id,
                     workdir     ? workdir   : row->workdir,
Index: /branches/backtrack/ippTools/src/camtool.h
===================================================================
--- /branches/backtrack/ippTools/src/camtool.h	(revision 13995)
+++ /branches/backtrack/ippTools/src/camtool.h	(revision 13996)
@@ -38,11 +38,3 @@
 pxConfig *camtoolConfig(pxConfig *config, int argc, char **argv);
 
-bool camQueueChipID(pxConfig *config,
-                    psS64 chip_id,
-                    psString workdir,
-                    psString label,
-                    psString recipe,
-                    psString expgroup,
-                    psString dvodb);
-
 #endif // CAMTOOL_H
Index: anches/backtrack/ippTools/src/chipqueue.c
===================================================================
--- /branches/backtrack/ippTools/src/chipqueue.c	(revision 13995)
+++ 	(revision )
@@ -1,95 +1,0 @@
-/*
- * chipqueue.c
- *
- * Copyright (C) 2007  Joshua Hoblitt
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * program; see the file COPYING. If not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "pxtools.h"
-#include "chiptool.h"
-
-bool chipQueueExpTag(pxConfig *config,
-                     psString exp_tag,
-                     psString workdir,
-                     psString label,
-                     psString reduction,
-                     psString expgroup,
-                     psString dvodb)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    // start a transaction
-    if (!psDBTransaction(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-    
-    // create a chipRun
-    if (!chipRunInsert(config->dbh,
-            0x0,
-            "run",      // state                
-            workdir,
-            "dirty",    // workdir_state
-            label,
-            reduction,
-            expgroup,
-            dvodb)
-    ) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-#if 0
-    // get the chip_id
-    long chip_id = psDBLastInsertID(config->dbh);
-#endif
-
-    // populate the chipPendingImfile table from rawImfile based on exp_tag,
-    // where the coresponding newExp.state entry is set to stop
-    psString query = pxDataGetCached("chiptool_queuerawimfile.sql");
-    if (!query) {
-        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
-        return false;
-    }
-
-    // queue the imfiles for the exp_tag
-    if (!p_psDBRunQuery(config->dbh, query, exp_tag)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    // just to be safe, we should have changed at least one row
-    if (psDBAffectedRows(config->dbh) < 1) {
-        psError(PS_ERR_UNKNOWN, false,
-                "no rows affected - should have changed at least one row");
-        return false;
-    }
-
-    // point of no return
-    if (!psDBCommit(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    return true;
-}
Index: /branches/backtrack/ippTools/src/chiptool.c
===================================================================
--- /branches/backtrack/ippTools/src/chiptool.c	(revision 13995)
+++ /branches/backtrack/ippTools/src/chiptool.c	(revision 13996)
@@ -242,5 +242,5 @@
 
         // queue the exp
-        if (!chipQueueExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) {
+        if (!pxchipQueueByExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) {
             if (!psDBRollback(config->dbh)) {
                 psError(PS_ERR_UNKNOWN, false, "database error");
@@ -844,5 +844,5 @@
         // camQueueChipID() can only be run after chipRun.state has been set to
         // stop
-        if (!camQueueChipID(config,
+        if (!pxcamQueueByChipID(config,
                     chipRun->chip_id,
                     chipRun->workdir,
Index: /branches/backtrack/ippTools/src/chiptool.h
===================================================================
--- /branches/backtrack/ippTools/src/chiptool.h	(revision 13995)
+++ /branches/backtrack/ippTools/src/chiptool.h	(revision 13996)
@@ -38,11 +38,3 @@
 pxConfig *chiptoolConfig(pxConfig *config, int argc, char **argv);
 
-bool chipQueueExpTag(pxConfig *config,
-                     psString exp_tag,
-                     psString workdir,
-                     psString label,
-                     psString recipe,
-                     psString expgroup,
-                     psString dvodb);
-
 #endif // CHIPTOOL_H
Index: /branches/backtrack/ippTools/src/pxchip.c
===================================================================
--- /branches/backtrack/ippTools/src/pxchip.c	(revision 13995)
+++ /branches/backtrack/ippTools/src/pxchip.c	(revision 13996)
@@ -2,5 +2,5 @@
  * pxchip.c
  *
- * Copyright (C) 2006  Joshua Hoblitt
+ * Copyright (C) 2007  Joshua Hoblitt
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -54,2 +54,73 @@
     return true;
 }
+
+
+bool pxchipQueueByExpTag(pxConfig *config,
+                         psString exp_tag,
+                         psString workdir,
+                         psString label,
+                         psString reduction,
+                         psString expgroup,
+                         psString dvodb)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+
+    // start a transaction
+    if (!psDBTransaction(config->dbh)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+    
+    // create a chipRun
+    if (!chipRunInsert(config->dbh,
+            0x0,
+            "run",      // state                
+            workdir,
+            "dirty",    // workdir_state
+            label,
+            reduction,
+            expgroup,
+            dvodb)
+    ) {
+        // rollback
+        if (!psDBRollback(config->dbh)) {
+            psError(PS_ERR_UNKNOWN, false, "database error");
+        }
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
+#if 0
+    // get the chip_id
+    long chip_id = psDBLastInsertID(config->dbh);
+#endif
+
+    // populate the chipPendingImfile table from rawImfile based on exp_tag,
+    // where the coresponding newExp.state entry is set to stop
+    psString query = pxDataGetCached("chiptool_queuerawimfile.sql");
+    if (!query) {
+        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
+        return false;
+    }
+
+    // queue the imfiles for the exp_tag
+    if (!p_psDBRunQuery(config->dbh, query, exp_tag)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
+    // just to be safe, we should have changed at least one row
+    if (psDBAffectedRows(config->dbh) < 1) {
+        psError(PS_ERR_UNKNOWN, false,
+                "no rows affected - should have changed at least one row");
+        return false;
+    }
+
+    // point of no return
+    if (!psDBCommit(config->dbh)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
+    return true;
+}
Index: /branches/backtrack/ippTools/src/pxchip.h
===================================================================
--- /branches/backtrack/ippTools/src/pxchip.h	(revision 13995)
+++ /branches/backtrack/ippTools/src/pxchip.h	(revision 13996)
@@ -27,3 +27,11 @@
 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state);
 
+bool pxchipQueueByExpTag(pxConfig *config,
+                         psString exp_tag,
+                         psString workdir,
+                         psString label,
+                         psString recipe,
+                         psString expgroup,
+                         psString dvodb);
+
 #endif // PXCHIP_H
Index: /branches/backtrack/ippTools/src/regtool.c
===================================================================
--- /branches/backtrack/ippTools/src/regtool.c	(revision 13995)
+++ /branches/backtrack/ippTools/src/regtool.c	(revision 13996)
@@ -634,5 +634,5 @@
         // insert an entry into the chipPendingExp table
         // this can only be run as the newExp's state has been set to stop
-        if (!chipQueueExpTag(config, exp_tag, NULL, NULL, NULL, NULL, NULL)) {
+        if (!pxchipQueueByExpTag(config, exp_tag, NULL, NULL, NULL, NULL, NULL)) {
             // rollback
             if (!psDBRollback(config->dbh)) {
