mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
added missing BIN_FLAGS_READABLE to pqistore constructor calls
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1231 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2bf79b663d
commit
79388588b0
@ -294,7 +294,7 @@ void p3ConfigMgr::loadConfiguration()
|
||||
membio->fseek(0); /* go to start */
|
||||
RsSerialiser *rss = new RsSerialiser();
|
||||
rss->addSerialType(new RsGeneralConfigSerialiser());
|
||||
pqistore stream(rss, "CONFIG", membio, 0);
|
||||
pqistore stream(rss, "CONFIG", membio, BIN_FLAGS_READABLE);
|
||||
|
||||
RsItem *rsitem = stream.GetItem();
|
||||
|
||||
|
@ -202,7 +202,7 @@ void p3GroupDistrib::loadFileGroups(std::string filename, std::string src, bool
|
||||
|
||||
/* create the serialiser to load info */
|
||||
BinInterface *bio = new BinFileInterface(filename.c_str(), BIN_FLAGS_READABLE);
|
||||
pqistore *store = createStore(bio, src, 0);
|
||||
pqistore *store = createStore(bio, src, BIN_FLAGS_READABLE);
|
||||
|
||||
std::cerr << "loading file " << filename << std::endl ;
|
||||
|
||||
@ -266,7 +266,7 @@ void p3GroupDistrib::loadFileMsgs(std::string filename, uint16_t cacheSubId, std
|
||||
|
||||
/* create the serialiser to load msgs */
|
||||
BinInterface *bio = new BinFileInterface(filename.c_str(), BIN_FLAGS_READABLE);
|
||||
pqistore *store = createStore(bio, src, 0);
|
||||
pqistore *store = createStore(bio, src, BIN_FLAGS_READABLE);
|
||||
|
||||
std::cerr << "loading file " << filename << std::endl ;
|
||||
|
||||
@ -745,7 +745,7 @@ void p3GroupDistrib::locked_publishPendingMsgs()
|
||||
std::string filenametmp = path + "/" + tmpname + ".tmp";
|
||||
|
||||
BinInterface *bio = new BinFileInterface(filenametmp.c_str(), BIN_FLAGS_WRITEABLE | BIN_FLAGS_HASH_DATA);
|
||||
pqistore *store = createStore(bio, mOwnId, 0); /* messages are deleted! */
|
||||
pqistore *store = createStore(bio, mOwnId, BIN_FLAGS_WRITEABLE); /* messages are deleted! */
|
||||
|
||||
bool resave = false;
|
||||
std::list<RsDistribSignedMsg *>::iterator it;
|
||||
@ -835,7 +835,7 @@ void p3GroupDistrib::publishDistribGroups()
|
||||
std::string filenametmp = path + "/" + tmpname + ".tmp";
|
||||
|
||||
BinInterface *bio = new BinFileInterface(filenametmp.c_str(), BIN_FLAGS_WRITEABLE | BIN_FLAGS_HASH_DATA);
|
||||
pqistore *store = createStore(bio, mOwnId, BIN_FLAGS_NO_DELETE);
|
||||
pqistore *store = createStore(bio, mOwnId, BIN_FLAGS_NO_DELETE | BIN_FLAGS_WRITEABLE);
|
||||
|
||||
RsStackMutex stack(distribMtx); /****** STACK MUTEX LOCKED *******/
|
||||
|
||||
|
@ -145,7 +145,7 @@ void p3Ranking::loadRankFile(std::string filename, std::string src)
|
||||
|
||||
uint32_t bioflags = BIN_FLAGS_HASH_DATA | BIN_FLAGS_READABLE;
|
||||
BinInterface *bio = new BinFileInterface(filename.c_str(), bioflags);
|
||||
pqistore *store = new pqistore(rsSerialiser, src, bio, 0);
|
||||
pqistore *store = new pqistore(rsSerialiser, src, bio, BIN_FLAGS_READABLE);
|
||||
|
||||
time_t now = time(NULL);
|
||||
time_t min, max;
|
||||
@ -259,7 +259,7 @@ void p3Ranking::publishMsgs(bool own)
|
||||
|
||||
uint32_t bioflags = BIN_FLAGS_HASH_DATA | BIN_FLAGS_WRITEABLE;
|
||||
BinInterface *bio = new BinFileInterface(fname.c_str(), bioflags);
|
||||
pqistore *store = new pqistore(rsSerialiser, mOwnId, bio, BIN_FLAGS_NO_DELETE);
|
||||
pqistore *store = new pqistore(rsSerialiser, mOwnId, bio, BIN_FLAGS_NO_DELETE | BIN_FLAGS_WRITEABLE);
|
||||
|
||||
{ RsStackMutex stack(mRankMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
@ -1099,8 +1099,7 @@ pqistore *createStore(std::string file, std::string src, bool reading)
|
||||
/* bin flags: READ | WRITE | HASH_DATA */
|
||||
BinInterface *bio = new BinFileInterface(file.c_str(), bioflags);
|
||||
/* store flags: NO_DELETE (yes) | NO_CLOSE (no) */
|
||||
pqistore *store = new pqistore(rsSerialiser, src, bio,
|
||||
BIN_FLAGS_NO_DELETE);
|
||||
pqistore *store = new pqistore(rsSerialiser, src, bio, BIN_FLAGS_NO_DELETE | (bioflags & BIN_FLAGS_WRITEABLE));
|
||||
|
||||
return store;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user