irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
![]() ![]() |
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include "rsApiHandler.hpp"
#include "miscServerFunct.hpp"
#include "xmsgLib.hpp"
#include "irods_network_factory.hpp"
#include "initServer.hpp"
#include "sockCommNetworkInterface.hpp"
Go to the source code of this file.
Variables | |
static boost::mutex | ReqQueCondMutex |
static boost::mutex | MessQueCondMutex |
static boost::thread * | ProcReqThread [40] |
static boost::condition_variable | ReqQueCond |
static xmsgQue_t | XmsgQue |
static xmsgReq_t * | XmsgReqHead = 0 |
static xmsgReq_t * | XmsgReqTail = 0 |
static msParamArray_t | XMsgMsParamArray |
ticketHashQue_t | XmsgHashQue [47] |
int _rsRcvXmsg | ( | irodsXmsg_t * | irodsXmsg, |
rcvXmsgOut_t * | rcvXmsgOut | ||
) |
Definition at line 664 of file xmsgLib.cpp.
References clearSendXmsgInfo(), HEADER_TYPE_LEN, LOG_ERROR, MessQueCondMutex, SendXmsgInfo::msg, RcvXmsgOut::msg, SendXmsgInfo::msgNumber, RcvXmsgOut::msgNumber, SendXmsgInfo::msgType, RcvXmsgOut::msgType, NAME_LEN, NULL, SendXmsgInfo::numDeli, SendXmsgInfo::numRcv, rmXmsgFromXmsgQue(), rmXmsgFromXmsgTcketQue(), rodsLog(), rstrcpy(), IrodsXmsg::sendAddr, RcvXmsgOut::sendAddr, IrodsXmsg::sendUserName, RcvXmsgOut::sendUserName, IrodsXmsg::sendXmsgInfo, IrodsXmsg::seqNumber, RcvXmsgOut::seqNumber, SYS_INTERNAL_NULL_INPUT_ERR, IrodsXmsg::ticketMsgStruct, and TicketMsgStruct::xmsgQue.
Referenced by rsRcvXmsg().
Definition at line 405 of file xmsgLib.cpp.
References XmsgReq::next, NULL, ReqQueCond, ReqQueCondMutex, XmsgReq::sock, XmsgReqHead, and XmsgReqTail.
Referenced by xmsgServerMain().
int addTicketMsgStructToHQue | ( | ticketMsgStruct_t * | ticketMsgStruct, |
ticketHashQue_t * | ticketHQue | ||
) |
Definition at line 314 of file xmsgLib.cpp.
References TicketHashQue::head, TicketMsgStruct::hnext, TicketMsgStruct::hprev, LOG_ERROR, NULL, TicketMsgStruct::nxtSeqNumber, XmsgTicketInfo::rcvTicket, rodsLog(), SYS_DUPLICATE_XMSG_TICKET, SYS_INTERNAL_NULL_INPUT_ERR, TicketHashQue::tail, TicketMsgStruct::ticket, and TicketMsgStruct::ticketHashQue.
Referenced by addTicketToHQue().
int addTicketToHQue | ( | xmsgTicketInfo_t * | ticket, |
ticketHashQue_t * | ticketHQue | ||
) |
Definition at line 288 of file xmsgLib.cpp.
References addTicketMsgStructToHQue(), LOG_ERROR, NULL, rodsLog(), irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, and TicketMsgStruct::ticket.
Referenced by initXmsgHashQue(), and rsGetXmsgTicket().
int addXmsgToQues | ( | irodsXmsg_t * | irodsXmsg, |
ticketMsgStruct_t * | ticketMsgStruct | ||
) |
Definition at line 48 of file xmsgLib.cpp.
References addXmsgToTicketMsgStruct(), addXmsgToXmsgQue(), MessQueCondMutex, and irods.pypyodbc::status.
Referenced by rsSendXmsg().
int addXmsgToTicketMsgStruct | ( | irodsXmsg_t * | xmsg, |
ticketMsgStruct_t * | ticketMsgStruct | ||
) |
Definition at line 145 of file xmsgLib.cpp.
References XmsgTicketInfo::expireTime, XmsgQue::head, INC_EXPIRE_INT, LOG_ERROR, NULL, TicketMsgStruct::nxtSeqNumber, rodsLog(), IrodsXmsg::sendTime, IrodsXmsg::seqNumber, SYS_INTERNAL_NULL_INPUT_ERR, XmsgQue::tail, TicketMsgStruct::ticket, IrodsXmsg::ticketMsgStruct, IrodsXmsg::tnext, IrodsXmsg::tprev, and TicketMsgStruct::xmsgQue.
Referenced by addXmsgToQues().
int addXmsgToXmsgQue | ( | irodsXmsg_t * | xmsg, |
xmsgQue_t * | xmsgQue | ||
) |
Definition at line 63 of file xmsgLib.cpp.
References XmsgQue::head, LOG_ERROR, IrodsXmsg::next, NULL, IrodsXmsg::prev, rodsLog(), SYS_INTERNAL_NULL_INPUT_ERR, and XmsgQue::tail.
Referenced by addXmsgToQues().
int checkMsgCondition | ( | irodsXmsg_t * | irodsXmsg, |
char * | msgCond | ||
) |
Definition at line 176 of file xmsgLib.cpp.
References MsParam::inOutStruct, MAX_NAME_LEN, SendXmsgInfo::miscInfo, SendXmsgInfo::msgNumber, SendXmsgInfo::msgType, MsParamArray::msParam, NULL, IrodsXmsg::sendAddr, IrodsXmsg::sendTime, IrodsXmsg::sendUserName, IrodsXmsg::sendXmsgInfo, IrodsXmsg::seqNumber, and XMsgMsParamArray.
Referenced by getIrodsXmsg().
int clearAllXMessages | ( | ticketMsgStruct_t * | ticketMsgStruct | ) |
Definition at line 740 of file xmsgLib.cpp.
References clearSendXmsgInfo(), XmsgQue::head, NULL, rmXmsgFromXmsgQue(), IrodsXmsg::sendXmsgInfo, XmsgQue::tail, IrodsXmsg::tnext, and TicketMsgStruct::xmsgQue.
Referenced by rsSendXmsg().
int clearOneXMessage | ( | ticketMsgStruct_t * | ticketMsgStruct, |
int | seqNum | ||
) |
Definition at line 717 of file xmsgLib.cpp.
References clearSendXmsgInfo(), XmsgQue::head, NULL, rmXmsgFromXmsgQue(), rmXmsgFromXmsgTcketQue(), IrodsXmsg::sendXmsgInfo, IrodsXmsg::seqNumber, IrodsXmsg::tnext, and TicketMsgStruct::xmsgQue.
Referenced by rsSendXmsg().
int getIrodsXmsg | ( | rcvXmsgInp_t * | rcvXmsgInp, |
irodsXmsg_t ** | outIrodsXmsg | ||
) |
Definition at line 209 of file xmsgLib.cpp.
References checkMsgCondition(), getTicketMsgStructByTicket(), XmsgQue::head, LOG_ERROR, MessQueCondMutex, RcvXmsgInp::msgCondition, NULL, RcvXmsgInp::rcvTicket, rodsLog(), irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, SYS_NO_XMSG_FOR_MSG_NUMBER, IrodsXmsg::tnext, and TicketMsgStruct::xmsgQue.
Referenced by rsRcvXmsg().
int getIrodsXmsgByMsgNum | ( | int | rcvTicket, |
int | msgNumber, | ||
irodsXmsg_t ** | outIrodsXmsg | ||
) |
Definition at line 246 of file xmsgLib.cpp.
References ANY_MSG_NUMBER, getTicketMsgStructByTicket(), XmsgQue::head, LOG_ERROR, SendXmsgInfo::msgNumber, NULL, rodsLog(), IrodsXmsg::sendXmsgInfo, irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, SYS_NO_XMSG_FOR_MSG_NUMBER, IrodsXmsg::tnext, and TicketMsgStruct::xmsgQue.
xmsgReq_t* getReqFromQue | ( | ) |
Definition at line 431 of file xmsgLib.cpp.
References XmsgReq::next, NULL, ReqQueCond, ReqQueCondMutex, and XmsgReqHead.
Referenced by procReqRoutine().
int getTicketMsgStructByTicket | ( | uint | rcvTicket, |
ticketMsgStruct_t ** | outTicketMsgStruct | ||
) |
Definition at line 635 of file xmsgLib.cpp.
References TicketHashQue::head, TicketMsgStruct::hnext, NULL, XmsgTicketInfo::rcvTicket, SYS_UNMATCHED_XMSG_TICKET, TicketMsgStruct::ticket, ticketHashFunc(), and XmsgHashQue.
Referenced by getIrodsXmsg(), getIrodsXmsgByMsgNum(), and rsSendXmsg().
int initThreadEnv | ( | ) |
Definition at line 42 of file xmsgLib.cpp.
Referenced by xmsgServerMain().
int initXmsgHashQue | ( | ) |
Definition at line 564 of file xmsgLib.cpp.
References addIntParamToArray(), addMsParam(), addTicketToHQue(), XmsgTicketInfo::expireTime, XmsgTicketInfo::flag, MAX_EXPIRE_INT, NULL, NUM_HASH_SLOT, XmsgTicketInfo::rcvTicket, XmsgTicketInfo::sendTicket, STR_MS_T, ticketHashFunc(), XmsgHashQue, and XMsgMsParamArray.
Referenced by xmsgServerMain().
void procReqRoutine | ( | ) |
Definition at line 482 of file xmsgLib.cpp.
References irods::error::code(), getReqFromQue(), initRsCommWithStartupPack(), irods::log(), LOG_ERROR, LOG_NOTICE, irods::network_factory(), NULL, irods::error::ok(), PASS, readAndProcClientMsg(), readStartupPack(), REQ_MSG_TIMEOUT_TIME, rodsLog(), sendVersion(), rsComm_t::sock, XmsgReq::sock, and SYS_AGENT_INIT_ERR.
Referenced by startXmsgThreads().
int rmTicketMsgStructFromHQue | ( | ticketMsgStruct_t * | ticketMsgStruct, |
ticketHashQue_t * | ticketHQue | ||
) |
Definition at line 373 of file xmsgLib.cpp.
References TicketHashQue::head, TicketMsgStruct::hnext, TicketMsgStruct::hprev, LOG_ERROR, NULL, rodsLog(), SYS_INTERNAL_NULL_INPUT_ERR, and TicketHashQue::tail.
Referenced by rsSendXmsg().
int rmXmsgFromXmsgQue | ( | irodsXmsg_t * | xmsg, |
xmsgQue_t * | xmsgQue | ||
) |
Definition at line 87 of file xmsgLib.cpp.
References XmsgQue::head, LOG_ERROR, IrodsXmsg::next, NULL, IrodsXmsg::prev, rodsLog(), SYS_INTERNAL_NULL_INPUT_ERR, and XmsgQue::tail.
Referenced by _rsRcvXmsg(), clearAllXMessages(), and clearOneXMessage().
int rmXmsgFromXmsgTcketQue | ( | irodsXmsg_t * | xmsg, |
xmsgQue_t * | xmsgQue | ||
) |
Definition at line 116 of file xmsgLib.cpp.
References XmsgQue::head, LOG_ERROR, NULL, rodsLog(), SYS_INTERNAL_NULL_INPUT_ERR, XmsgQue::tail, IrodsXmsg::tnext, and IrodsXmsg::tprev.
Referenced by _rsRcvXmsg(), and clearOneXMessage().
int startXmsgThreads | ( | ) |
Definition at line 468 of file xmsgLib.cpp.
References NUM_XMSG_THR, procReqRoutine(), ProcReqThread, and SYS_THREAD_RESOURCE_ERR.
Referenced by xmsgServerMain().
int ticketHashFunc | ( | uint | rcvTicket | ) |
Definition at line 558 of file xmsgLib.cpp.
References NUM_HASH_SLOT.
Referenced by getTicketMsgStructByTicket(), initXmsgHashQue(), and rsGetXmsgTicket().
|
static |
Definition at line 26 of file xmsgLib.cpp.
Referenced by _rsRcvXmsg(), addXmsgToQues(), and getIrodsXmsg().
|
static |
Definition at line 27 of file xmsgLib.cpp.
Referenced by startXmsgThreads().
|
static |
Definition at line 28 of file xmsgLib.cpp.
Referenced by addReqToQue(), and getReqFromQue().
|
static |
Definition at line 25 of file xmsgLib.cpp.
Referenced by addReqToQue(), and getReqFromQue().
ticketHashQue_t XmsgHashQue[47] |
Definition at line 37 of file xmsgLib.cpp.
Referenced by getTicketMsgStructByTicket(), initXmsgHashQue(), and rsGetXmsgTicket().
|
static |
Definition at line 33 of file xmsgLib.cpp.
Referenced by checkMsgCondition(), and initXmsgHashQue().
Definition at line 30 of file xmsgLib.cpp.
|
static |
Definition at line 31 of file xmsgLib.cpp.
Referenced by addReqToQue(), and getReqFromQue().
|
static |
Definition at line 32 of file xmsgLib.cpp.
Referenced by addReqToQue().