1
0
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:
Ruben S. Montero 2020-09-10 14:10:01 +02:00
parent 0471e486b0
commit 23a8594f02
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 5 additions and 19 deletions

View File

@ -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
*/

View File

@ -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();