void setPropSet(uintptr_t propset) {\r
this->propset = propset;\r
};\r
- Property() {\r
+ Property() : propset(0) {\r
}\r
;\r
virtual ~Property() {\r
\r
// Construct a base with empty name, value and parent\r
xml_base() :\r
- m_name(0), m_value(0), m_parent(0) {\r
+ m_name(0), m_value(0), m_name_size(0), m_value_size(0), m_parent(0) {\r
}\r
\r
///////////////////////////////////////////////////////////////////////////\r
\r
//! Constructs an empty attribute with the specified type. \r
//! Consider using memory_pool of appropriate xml_document if allocating attributes manually.\r
- xml_attribute() {\r
+ xml_attribute() : m_prev_attribute(0), m_next_attribute(0) {\r
}\r
\r
///////////////////////////////////////////////////////////////////////////\r
//! Consider using memory_pool of appropriate document to allocate nodes manually.\r
//! \param type Type of node to construct.\r
xml_node(node_type type) :\r
- m_type(type), m_first_node(0), m_first_attribute(0) {\r
+ m_type(type), m_first_node(0), m_last_node(0), m_first_attribute(0), m_last_attribute(0),\r
+ m_prev_sibling(0), m_next_sibling(0) {\r
}\r
\r
///////////////////////////////////////////////////////////////////////////\r
{
public:
ConnectionSession(boost::asio::io_service& io_service) :
- clientSocket(io_service), command((SIM_COMMAND) -1), taskThread(0)
+ clientSocket(io_service), clientData(), command((SIM_COMMAND) -1), taskThread(0)
{
}
stream_protocol::socket& socket()
return session_ptr(new ConnectionSession(io_service));
}
ConnectionSession(boost::asio::io_service& io_service):
- clientSocket(io_service)
+ clientSocket(io_service), clientData()
{
pthread_mutex_init(&connLock, NULL);
currentState = CMD_READ;
// Construct a base with empty name, value and parent
xml_base() :
- m_name(0), m_value(0), m_parent(0) {
+ m_name(0), m_value(0), m_name_size(0), m_value_size(0), m_parent(0) {
}
///////////////////////////////////////////////////////////////////////////
//! Constructs an empty attribute with the specified type.
//! Consider using memory_pool of appropriate xml_document if allocating attributes manually.
- xml_attribute() {
+ xml_attribute() : m_prev_attribute(0), m_next_attribute(0) {
}
///////////////////////////////////////////////////////////////////////////
//! Consider using memory_pool of appropriate document to allocate nodes manually.
//! \param type Type of node to construct.
xml_node(node_type type) :
- m_type(type), m_first_node(0), m_first_attribute(0) {
+ m_type(type), m_first_node(0), m_last_node(0), m_first_attribute(0), m_last_attribute(0),
+ m_prev_sibling(0), m_next_sibling(0) {
}
///////////////////////////////////////////////////////////////////////////
* @param client_io_service IO service to handle the connection with TA
*/
TAInstance::TAInstance(uint32_t pid, bool alive, bool debug, uint32_t InstID, boost::asio::io_service& client_io_service) :
-mTAConnectionSocket(client_io_service) {
+mTAConnectionSocket(client_io_service),readData() {
LOGD(SIM_DAEMON, "Entry");
// Initialize the lock for Session map (mSessionMap)
mPID = pid;
mTAInstanceID = InstID;
mCommandMap.clear();
+ command = COMMANDINVALID;
+ currentState = CMD_READ;
}
bool TAInstance::checkKeepAlive() {
SDRM_BIG_NUM *SDRM_BN_Init(cc_u32 dSize)
{
cc_u32 AllocSize = sizeof(SDRM_BIG_NUM) + dSize * SDRM_SIZE_OF_DWORD;
- cc_u8 *pbBuf = (cc_u8*)malloc(AllocSize);
- SDRM_BIG_NUM *BN_Src = (SDRM_BIG_NUM*)(void*)pbBuf;
+ SDRM_BIG_NUM *BN_Src = (SDRM_BIG_NUM*)malloc(AllocSize);
if (BN_Src == NULL)
{
return NULL;
}
memset(BN_Src, 0, AllocSize);
- BN_Src->pData = (cc_u32*)(void*)(pbBuf + sizeof(SDRM_BIG_NUM));
+ BN_Src->pData = (cc_u32*)(void*)((char*)BN_Src + sizeof(SDRM_BIG_NUM));
BN_Src->Size = dSize;
return BN_Src;
num = SDRM_BN_Init(BN_Src->Size);
if( num == NULL)//fix prevent cid = 89093 by guoxing.xu
{
- free(num);
free(strDestTemp);
+ SDRM_BN_FREE(tempREM);
SDRM_BN_FREE(d);
return NULL;
}