ported branch v0.5.0 commits 2623, 2624, 2626, 2633, 2634, 2643, 2644, 2646, 2651 and 2654 to trunk

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2660 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-03-28 20:46:45 +00:00
parent 12536efd16
commit 08065b4298
22 changed files with 264 additions and 299 deletions

View file

@ -34,7 +34,9 @@
#include "serialiser/rsconfigitems.h"
/*
#define CONFIG_DEBUG 1
*/
#define BACKEDUP_SAVE
@ -184,8 +186,8 @@ bool p3ConfigMgr::backedUpFileSave(const std::string& fname, const std::string&
const std::string& sign_fname_backup, BinMemInterface* configbio, BinMemInterface* signbio){
FILE *file = NULL, *sign = NULL;
char *config_buff, *sign_buff;
int size_file, size_sign;
char *config_buff=NULL, *sign_buff=NULL;
int size_file=0, size_sign=0;
// begin two pass saving by writing to back up file instead
if (!configbio->writetofile(fname_backup.c_str()) || !signbio->writetofile(sign_fname_backup.c_str()))
@ -665,7 +667,7 @@ bool p3Config::backedUpFileSave(const std::string& cfg_fname, const std::string&
uint32_t stream_flags = BIN_FLAGS_WRITEABLE;
bool written = true;
FILE* cfg_file = NULL;
char* buff;
char* buff=NULL;
int size_file = 0;
if (!cleanup)