fix ptr_metadata issue

This commit is contained in:
Matt 2015-07-01 20:01:57 -06:00
parent 1327301a8d
commit 0cb3a5d44e
2 changed files with 19 additions and 13 deletions

View File

@ -6399,15 +6399,21 @@ HashTableX *XmlDoc::getClockCandidatesTable ( ) {
if ( m_clockCandidatesDataValid ) {
// and table is now valid
m_clockCandidatesTableValid = true;
// return empty table if ptr is NULL
if (! ptr_clockCandidatesData ) return &m_clockCandidatesTable;
// we no longer have this, replaced by ptr_metadata
return &m_clockCandidatesTable;
// return empty table if ptr is NULL. take this out then.
//if(!ptr_clockCandidatesData ) return &m_clockCandidatesTable;
// otherwise, deserialize
m_clockCandidatesTable.deserialize ( ptr_clockCandidatesData ,
size_clockCandidatesData,
m_niceness );
// m_clockCandidatesTable.deserialize(ptr_clockCandidatesData ,
// size_clockCandidatesData,
// m_niceness );
// and return that
return &m_clockCandidatesTable;
}
// no longer using this since we got ptr_metadata
return &m_clockCandidatesTable;
// otherwise, get our dates
Dates *dp = getDates();
if ( ! dp || dp == (Dates *)-1 ) return (HashTableX *)dp;
@ -6417,8 +6423,8 @@ HashTableX *XmlDoc::getClockCandidatesTable ( ) {
if ( dp->m_numDatePtrs == 0 ) {
m_clockCandidatesTableValid = true;
m_clockCandidatesDataValid = true;
ptr_clockCandidatesData = NULL;
size_clockCandidatesData = 0;
// ptr_clockCandidatesData = NULL;
// size_clockCandidatesData = 0;
return &m_clockCandidatesTable;
}
// and set size to 32 buckets to start
@ -6454,8 +6460,8 @@ HashTableX *XmlDoc::getClockCandidatesTable ( ) {
// store it in there
m_clockCandidatesTable.serialize ( &m_cctbuf );
// point to it
ptr_clockCandidatesData = m_cctbuf.getBufStart();
size_clockCandidatesData = need;
// ptr_clockCandidatesData = m_cctbuf.getBufStart();
// size_clockCandidatesData = need;
// that is valid now
m_clockCandidatesDataValid = true;
return &m_clockCandidatesTable;

View File

@ -375,7 +375,8 @@ class XmlDoc {
//char *ptr_sectionsReply; // votes read from sectiondb - m_osvt
//char *ptr_sectionsVotes; // our local votes - m_nsvt
//char *ptr_addressReply;
char *ptr_clockCandidatesData;
//char *ptr_clockCandidatesData;
char *ptr_metadata;
// . serialization of the sectiondb and placedb lists
// . that way we can store just these and not have to store the content
// of the entire page if we do not need to
@ -388,7 +389,6 @@ class XmlDoc {
char *ptr_sectiondbData;
char *ptr_tagRecData;
LinkInfo *ptr_linkInfo2;
char *ptr_metadata;
int32_t size_firstUrl;
@ -410,7 +410,8 @@ class XmlDoc {
//int32_t size_sectionsReply;
//int32_t size_sectionsVotes;
//int32_t size_addressReply;
int32_t size_clockCandidatesData;
//int32_t size_clockCandidatesData;
int32_t size_metadata;
//int32_t size_sectiondbData;
//int32_t size_placedbData;
int32_t size_site;
@ -419,7 +420,6 @@ class XmlDoc {
int32_t size_sectiondbData;
int32_t size_tagRecData;
int32_t size_linkInfo2;
int32_t size_metadata;
char m_dummyEnd;