Removing callback port feature from master and slave
[iot2.git] / iotjava / iotruntime / cpp / iotslave / IoTSlave.cpp
index e4d48641615895ed5514ee3e2e95c8e9e14244e6..89d99970f21ce52ec86ba529fc9761407e7432a6 100644 (file)
@@ -246,9 +246,6 @@ void IoTSlave::instantiateSkelObject() {
 
        void* params[SKELPARAMSIZE];
        params[0] = objMainCls;
-       //string callbackAddress = LOCALHOST;
-       //params[1] = &callbackAddress;
-       //params[2] = &objectStubPort;
        params[1] = &objectStubPort;
        params[2] = &objectRegPort;
        writeToFile("Skeleton Object " + objectSkelClass + " created for " + objectClassName);
@@ -264,15 +261,10 @@ void IoTSlave::instantiateStubObject() {
        params[0] = &objectStubPort;
        params[1] = &objectRegPort;
        params[2] = &hostAddress;
-       //params[0] = &objectStubPort;
-       //params[1] = &hostAddress;
-       //string callbackAddress = LOCALHOST;
-       //params[2] = &callbackAddress;
        int rev = 0;
        params[3] = &rev;
        bool result = false;
        params[4] = &result;
-       //params[5] = ports;
        writeToFile("Stub Object " + objectStubClass + " created for " + objectClassName);
        writeToFile("Success 1!");
        objStubCls = create_object(params);
@@ -489,8 +481,6 @@ void IoTSlave::createStub() {
                instantiateStubObject();
                mapObjNameStub.insert(make_pair(objectName,objStubCls));
                writeToFile("=> Map has: " + to_string(mapObjNameStub.size()) + " members");
-               // vector<int> for ports has been copied - now delete it
-               delete ports;
        }
 }
 
@@ -559,13 +549,6 @@ void IoTSlave::getIoTSetRelationObject() {
        writeToFile("=> Driver object registry port: " + to_string(objectRegPort));
        objectStubPort = recvInteger(); sendAck();
        writeToFile("=> Driver object stub port: " + to_string(objectStubPort));
-       int numOfPorts = recvInteger(); sendAck();
-       ports = new vector<int>();
-       for (int i = 0; i < numOfPorts; i++) {
-               int port = recvInteger(); sendAck();
-               ports->push_back(port);
-               writeToFile("==> Got a new port: " + to_string(port));
-       }
 }