Commit 2ec65902 authored by Steven Murray's avatar Steven Murray
Browse files

Removed argc and argv from the constructor of DataTransferSession

parent d6577179
......@@ -55,8 +55,6 @@ void *castor::tape::tapeserver::daemon::DataTransferSession::m_zmqContext =
//Constructor
//------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
int argc,
char ** argv,
const std::string & hostname,
const legacymsg::RtcpJobRqstMsgBody & clientRequest,
castor::log::Logger& logger, System::virtualWrapper & sysWrapper,
......@@ -73,9 +71,7 @@ castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
m_castorConf(castorConf),
m_rmc(rmc),
m_intialProcess(initialProcess),
m_capUtils(capUtils),
m_argc(argc),
m_argv(argv) {
m_capUtils(capUtils) {
}
//------------------------------------------------------------------------------
......
......@@ -94,8 +94,6 @@ namespace daemon {
};
/** Constructor */
DataTransferSession(
int argc,
char ** argv,
const std::string & hostname,
const legacymsg::RtcpJobRqstMsgBody & clientRequest,
castor::log::Logger & logger,
......@@ -156,12 +154,6 @@ namespace daemon {
castor::messages::TapeserverProxy & m_intialProcess;
/** Object providing utilities for working UNIX capabilities. */
castor::server::ProcessCap &m_capUtils;
/** copy of the process's argc to allow "command line reporting"
* i.e. snprintf to argv's, which will be visible in 'ps' */
int m_argc;
/** copy of the process's argv to allow "command line reporting"
* i.e. snprintf to argv's, which will be visible in 'ps' */
char ** m_argv;
/** hostname, used to report status of the drive */
const std::string m_hostname;
};
......
......@@ -165,18 +165,7 @@ TEST(tapeServer, DataTransferSessionGooddayRecall) {
castor::legacymsg::RmcProxyDummy rmc;
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
char argv_container [] = "tapeserver\0XXXXXXXX\0YYYYYYYYY\0ZZZZZZZZZZZ\0";
int argc = 4;
char * argv [4];
{
std::string argv_ctn_str(argv_container);
size_t pos = 0;
for (int i=0; i<4; i++) {
argv[i] = & (argv_container[pos]);
argv_ctn_str.find_first_of("\0",pos);
}
}
DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
DataTransferSession sess("tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute();
simRun.wait();
......@@ -233,18 +222,7 @@ TEST(tapeServer, DataTransferSessionNoSuchDrive) {
castor::legacymsg::RmcProxyDummy rmc;
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
char argv_container [] = "tapeserver\0XXXXXXXX\0YYYYYYYYY\0ZZZZZZZZZZZ\0";
int argc = 4;
char * argv [4];
{
std::string argv_ctn_str(argv_container);
size_t pos = 0;
for (int i=0; i<4; i++) {
argv[i] = & (argv_container[pos]);
argv_ctn_str.find_first_of("\0",pos);
}
}
DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
DataTransferSession sess("tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute();
simRun.wait();
......@@ -388,18 +366,7 @@ TEST(tapeServer, DataTransferSessionGooddayMigration) {
castor::legacymsg::RmcProxyDummy rmc;
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
char argv_container [] = "tapeserver\0XXXXXXXX\0YYYYYYYYY\0ZZZZZZZZZZZ\0";
int argc = 4;
char * argv [4];
{
std::string argv_ctn_str(argv_container);
size_t pos = 0;
for (int i=0; i<4; i++) {
argv[i] = & (argv_container[pos]);
argv_ctn_str.find_first_of("\0",pos);
}
}
DataTransferSession sess(argc, argv, "tapeHost", VDQMjob, logger, mockSys,
DataTransferSession sess("tapeHost", VDQMjob, logger, mockSys,
driveConfig, rmc, initialProcess, capUtils, castorConf);
sess.execute();
simRun.wait();
......
......@@ -1052,8 +1052,6 @@ void castor::tape::tapeserver::daemon::TapeDaemon::runDataTransferSession(
tapeserver.reset(m_tapeserverFactory.create(
DataTransferSession::getZmqContext()));
dataTransferSession.reset(new DataTransferSession (
m_argc,
m_argv,
m_hostName,
drive->getVdqmJob(),
m_log,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment