Commit 55f384d6 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed mother forker passing its own pid instead of the session's as the jid...

Fixed mother forker passing its own pid instead of the session's as the jid for the vdqm when reported tape mounted.
parent d2ce4eb3
......@@ -47,7 +47,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
virtual void tapeMountedForRead(const std::string &vid)
virtual void tapeMountedForRead(const std::string &vid, uint32_t jid)
= 0;
/**
......@@ -56,7 +56,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
virtual void tapeMountedForWrite(const std::string &vid)
virtual void tapeMountedForWrite(const std::string &vid, uint32_t jid)
= 0;
/**
......
......@@ -30,14 +30,14 @@ castor::legacymsg::VmgrProxyDummy::~VmgrProxyDummy() throw() {
//------------------------------------------------------------------------------
// tapeMountedForRead
//------------------------------------------------------------------------------
void castor::legacymsg::VmgrProxyDummy::tapeMountedForRead(const std::string &vid)
void castor::legacymsg::VmgrProxyDummy::tapeMountedForRead(const std::string &vid, uint32_t jid)
{
}
//------------------------------------------------------------------------------
// tapeMountedForWrite
//------------------------------------------------------------------------------
void castor::legacymsg::VmgrProxyDummy::tapeMountedForWrite(const std::string &vid)
void castor::legacymsg::VmgrProxyDummy::tapeMountedForWrite(const std::string &vid, uint32_t jid)
{
}
......
......@@ -45,7 +45,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
void tapeMountedForRead(const std::string &vid);
void tapeMountedForRead(const std::string &vid, uint32_t jid);
/**
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
......@@ -53,7 +53,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
void tapeMountedForWrite(const std::string &vid);
void tapeMountedForWrite(const std::string &vid, uint32_t jid);
/**
* Gets information from vmgrd about the specified tape
......
......@@ -143,13 +143,13 @@ void castor::legacymsg::VmgrProxyTcpIp::sendNotificationAndReceiveReply(const le
//------------------------------------------------------------------------------
// tapeMountedForRead
//------------------------------------------------------------------------------
void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForRead(const std::string &vid)
void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForRead(const std::string &vid, uint32_t jid)
{
try {
castor::legacymsg::VmgrTapeMountedMsgBody msg;
msg.uid = geteuid();
msg.gid = getegid();
msg.jid = getpid();
msg.jid = jid;
msg.mode = WRITE_DISABLE;
castor::utils::copyString(msg.vid, vid);
......@@ -165,13 +165,13 @@ void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForRead(const std::string &vi
//------------------------------------------------------------------------------
// tapeMountedForWrite
//------------------------------------------------------------------------------
void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForWrite(const std::string &vid)
void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForWrite(const std::string &vid, uint32_t jid)
{
try {
castor::legacymsg::VmgrTapeMountedMsgBody msg;
msg.uid = geteuid();
msg.gid = getegid();
msg.jid = getpid();
msg.jid = jid;
msg.mode = WRITE_ENABLE;
castor::utils::copyString(msg.vid, vid);
......
......@@ -63,7 +63,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
void tapeMountedForRead(const std::string &vid);
void tapeMountedForRead(const std::string &vid, uint32_t jid);
/**
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
......@@ -71,7 +71,7 @@ public:
* @param vid The volume identifier of the mounted tape.
* @param
*/
void tapeMountedForWrite(const std::string &vid);
void tapeMountedForWrite(const std::string &vid, uint32_t jid);
/**
* Gets information from vmgrd about the specified tape
......
......@@ -274,13 +274,13 @@ const castor::messages::NotifyDriveTapeMounted& body){
{
switch(body.mode()) {
case castor::messages::TAPE_MODE_READ:
m_vmgr.tapeMountedForRead(vid);
m_vmgr.tapeMountedForRead(vid, drive->getSessionPid());
break;
case castor::messages::TAPE_MODE_READWRITE:
m_vmgr.tapeMountedForWrite(vid);
m_vmgr.tapeMountedForWrite(vid, drive->getSessionPid());
break;
case castor::messages::TAPE_MODE_DUMP:
m_vmgr.tapeMountedForRead(vid);
m_vmgr.tapeMountedForRead(vid, drive->getSessionPid());
break;
case castor::messages::TAPE_MODE_NONE:
break;
......@@ -295,7 +295,6 @@ const castor::messages::NotifyDriveTapeMounted& body){
sendErrorReplyToClient(ex);
throw;
}
sendSuccessReplyToClient();
}
//------------------------------------------------------------------------------
......@@ -329,4 +328,4 @@ sendReplyToClient(int returnValue,const std::string& msg){
castor::messages::sendMessage(m_socket,header,ZMQ_SNDMORE);
castor::messages::sendMessage(m_socket,body);
}
\ No newline at end of file
}
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