Cleaning up the Makefile for compiler related commands; cleaning up C++ stubs and...
[iot2.git] / benchmarks / drivers / Cpp / LabRoom / Room_Skeleton.cpp
index e29f567db8cea134437f07693e6ce753e0fcd192..f0575ded0168c54a3c651950803e637ebb276d38 100644 (file)
@@ -4,20 +4,9 @@
 using namespace std;
 
 Room_Skeleton::Room_Skeleton(Room *_mainObj, int _portSend, int _portRecv) {
-       // Logging
-       int i=0;
-       string file = "Room_Skeleton_cpp" + to_string(i) + ".log";
-       while (ifstream(file.c_str())) {
-               i++;
-               file = "Room_Skeleton_cpp" + to_string(i) + ".log";
-       }
-       log.open(file);
-       log << "Port send: " << _portSend << endl;
-       log << "Port receive: " << _portRecv << endl;
        bool _bResult = false;
        mainObj = _mainObj;
        rmiComm = new IoTRMICommServer(_portSend, _portRecv, &_bResult);
-       log << "Established connection with slave! Wait request invoke now..." << endl;
        IoTRMIUtil::mapSkel->insert(make_pair(_mainObj, this));
        IoTRMIUtil::mapSkelId->insert(make_pair(_mainObj, objectId));
        rmiComm->registerSkeleton(objectId, &methodReceived);
@@ -84,7 +73,7 @@ void Room_Skeleton::___waitRequestInvokeMethod(Room_Skeleton* skel) {
                }
                switch (methodId) {
                        case 0: {
-                               thread th0 (&Room_Skeleton::___getRoomID, std::ref(skel), skel);
+                               thread th0 (&Room_Skeleton::___getRoomID, skel, skel);
                                th0.detach(); break;
                        }
                        default: