Fixing initialization to just create a table on the cloud side.
[iotcloud.git] / version2 / src / C / Init.C
index 55cd2c627afe29755085a604354503951666e8a1..7a8649ceed3ef6f2e8b4d4eac8e5af801e3d4403 100644 (file)
@@ -9,9 +9,6 @@
 int main(int numargs, char ** args) {
        TimingSingleton * timer = TimingSingleton_getInstance();
 
-       bool foundError = false;
-       Vector<TransactionStatus *> * transStatusList = new Vector<TransactionStatus *>();
-
        // Setup the 2 clients
        IoTString *baseurl = new IoTString("http://dc-6.calit2.uci.edu/test.iotcloud/");
        IoTString * password = new IoTString("reallysecret");
@@ -23,36 +20,6 @@ int main(int numargs, char ** args) {
        baseurl->releaseRef();
        password->releaseRef();
 
-       // Make the Keys
-       printf("Setting up keys\n");
-       for (int i = 0; i < NUMBER_OF_SENSORS; i++) {
-               printf("%d\n",i);
-               char buffer[80];
-               sprintf(buffer, "sensor%d", i);
-               IoTString *ia = new IoTString(buffer);
-               t1->createNewKey(ia, MACHINE_ID);
-               ia->releaseRef();
-       }
-
-       t1->update();
-       printf("Updating table\n");
-
-       for (uint i = 0; i < transStatusList->size(); i++) {
-               TransactionStatus * status = transStatusList->get(i);
-               if (status->getStatus() != TransactionStatus_StatusCommitted) {
-                       foundError = true;
-                       printf("Status error\n");
-               }
-               delete status;
-       }
-       
-       if (foundError) {
-               printf("Found Errors...\n");
-       } else {
-               printf("No Errors Found...\n");
-       }
-
-       delete transStatusList;
        delete t1;
 }