Subversion Repositories HomeAutomation

Rev

Rev 1060 | Rev 1229 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1060 Rev 1203
Line 51... Line 51...
51
    stop();
51
    stop();
52
 
52
 
53
    myCommandThread.stop();
53
    myCommandThread.stop();
54
 
54
 
55
    ///FIXME: Verify that this works and does not cause segfaults
55
    ///FIXME: Verify that this works and does not cause segfaults
56
    for (map<int, SocketThread*>::iterator iter = mySocketThreads.begin(); iter != mySocketThreads.end(); iter++)
56
    for (map<unsigned long int, SocketThread*>::iterator iter = mySocketThreads.begin(); iter != mySocketThreads.end(); iter++)
57
    {
57
    {
58
        iter->second->stop();
58
        iter->second->stop();
59
        delete iter->second;
59
        delete iter->second;
60
        //mySocketThreads.erase(iter);
60
        //mySocketThreads.erase(iter);
61
    }
61
    }
Line 321... Line 321...
321
unsigned int VirtualMachine::startSocketThread(string address, int port, unsigned int reconnectTimeout)
321
unsigned int VirtualMachine::startSocketThread(string address, int port, unsigned int reconnectTimeout)
322
{
322
{
323
    SocketThread *socketThread = new SocketThread(address, port, reconnectTimeout);
323
    SocketThread *socketThread = new SocketThread(address, port, reconnectTimeout);
324
    mySocketThreads[socketThread->getId()] = socketThread;
324
    mySocketThreads[socketThread->getId()] = socketThread;
325
    mySocketThreads[socketThread->getId()]->start();
325
    mySocketThreads[socketThread->getId()]->start();
-
 
326
    mySocketThreads[socketThread->getId()]->startSocket();
326
 
327
 
327
    return socketThread->getId();
328
    return socketThread->getId();
328
}
329
}
329
 
330
 
330
bool VirtualMachine::stopSocketThread(unsigned int id)
331
bool VirtualMachine::stopSocketThread(unsigned int id)