mirror of
https://github.com/OpenNebula/one.git
synced 2025-04-01 06:50:25 +03:00
M #-: Move run_connection to RM
This commit is contained in:
parent
0471e486b0
commit
23a8594f02
@ -85,19 +85,6 @@ public:
|
||||
cond.notify_one();
|
||||
}
|
||||
|
||||
/**
|
||||
* Run an xmlrpc connection
|
||||
* @param fd connected socket
|
||||
*/
|
||||
void run_connection(RequestManager *rm, int fd)
|
||||
{
|
||||
xmlrpc_c::serverAbyss * as = rm->create_abyss();
|
||||
|
||||
as->runConn(fd);
|
||||
|
||||
delete as;
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* Synchronization for connection threads and listener thread
|
||||
@ -105,11 +92,6 @@ private:
|
||||
std::mutex _mutex;
|
||||
std::condition_variable cond;
|
||||
|
||||
/**
|
||||
* RequestManager to create an AbyssSever class to handle each request
|
||||
*/
|
||||
RequestManager * rm;
|
||||
|
||||
/**
|
||||
* Number of active connections
|
||||
*/
|
||||
|
@ -155,7 +155,11 @@ void RequestManager::xml_server_loop()
|
||||
NebulaLog::log("ReM", Log::DDEBUG, oss);
|
||||
|
||||
thread conn_thread([client_fd, this]{
|
||||
cm->run_connection(this, client_fd);
|
||||
xmlrpc_c::serverAbyss * as = create_abyss();
|
||||
|
||||
as->runConn(client_fd);
|
||||
|
||||
delete as;
|
||||
|
||||
cm->del();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user