fix save prevention when coring in malloc/free.
This commit is contained in:
@ -302,8 +302,8 @@ bool Rebalance::saveRebalanceFile ( ) {
|
||||
binToHex ( (unsigned char *)&m_nextKey , MAX_KEY_BYTES , keyStr );
|
||||
|
||||
//log("db: saving rebalance.txt");
|
||||
|
||||
SafeBuf sb;
|
||||
char tmp[30000];
|
||||
SafeBuf sb(tmp,30000);
|
||||
sb.safePrintf (
|
||||
"myshard: %"INT32"\n"
|
||||
"numshards: %"INT32"\n"
|
||||
|
@ -249,6 +249,10 @@ bool resetProxyStats ( ) {
|
||||
// save the stats
|
||||
bool saveSpiderProxyStats ( ) {
|
||||
|
||||
// do not save if coring in a malloc/free because we call malloc/free
|
||||
// below to save stuff possibly
|
||||
if ( g_inMemFunction ) return true;
|
||||
|
||||
// save hashtable
|
||||
s_proxyBannedTable.save(g_hostdb.m_dir,"proxybantable.dat");
|
||||
|
||||
|
@ -114,6 +114,7 @@ Users::~Users(){
|
||||
}
|
||||
|
||||
bool Users::save(){
|
||||
return true;
|
||||
if ( ! m_needsSave ) return true;
|
||||
if ( ! m_loginTable.save(g_hostdb.m_dir,"userlogin.dat",NULL,0) )
|
||||
return log("users: userlogin.dat save failed");
|
||||
|
Reference in New Issue
Block a user