From f191fe675d756e8bee50a22e3d4c4ce2e048bed5 Mon Sep 17 00:00:00 2001 From: mr-alice Date: Thu, 1 Sep 2016 20:02:47 +0200 Subject: [PATCH] fixed compilation with new RsNodeGroupId --- .../src/file_sharing/directory_storage.cc | 14 +++++++------- libretroshare/src/file_sharing/directory_storage.h | 4 ++-- libretroshare/src/file_sharing/p3filelists.cc | 2 +- libretroshare/src/retroshare/rstypes.h | 4 ++-- libretroshare/src/rsserver/rstypes.cc | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libretroshare/src/file_sharing/directory_storage.cc b/libretroshare/src/file_sharing/directory_storage.cc index a3e0f15d7..b490038f8 100644 --- a/libretroshare/src/file_sharing/directory_storage.cc +++ b/libretroshare/src/file_sharing/directory_storage.cc @@ -913,10 +913,10 @@ void LocalDirectoryStorage::getSharedDirectoryList(std::list& lst lst.push_back(it->second) ; } -static bool sameLists(const std::list& l1,const std::list& l2) +static bool sameLists(const std::list& l1,const std::list& l2) { - std::list::const_iterator it1(l1.begin()) ; - std::list::const_iterator it2(l2.begin()) ; + std::list::const_iterator it1(l1.begin()) ; + std::list::const_iterator it2(l2.begin()) ; for(; (it1!=l1.end() && it2!=l2.end());++it1,++it2) if(*it1 != *it2) @@ -1004,13 +1004,13 @@ bool LocalDirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d) return getFileSharingPermissions(indx,d.flags,d.parent_groups) ; } -bool LocalDirectoryStorage::getFileSharingPermissions(const EntryIndex& indx,FileStorageFlags& flags,std::list& parent_groups) +bool LocalDirectoryStorage::getFileSharingPermissions(const EntryIndex& indx,FileStorageFlags& flags,std::list& parent_groups) { RS_STACK_MUTEX(mDirStorageMtx) ; return locked_getFileSharingPermissions(indx,flags,parent_groups) ; } -bool LocalDirectoryStorage::locked_getFileSharingPermissions(const EntryIndex& indx,FileStorageFlags& flags,std::list& parent_groups) +bool LocalDirectoryStorage::locked_getFileSharingPermissions(const EntryIndex& indx, FileStorageFlags& flags, std::list &parent_groups) { flags.clear() ; parent_groups.clear(); @@ -1046,7 +1046,7 @@ bool LocalDirectoryStorage::locked_getFileSharingPermissions(const EntryIndex& i std::cerr << "(EE) very weird bug: base directory \"" << base_dir << "\" not found in shared dir list." << std::endl; return false ; } -#warning we should use a NodeGroupId here + flags = it->second.shareflags; parent_groups = it->second.parent_groups; } @@ -1069,7 +1069,7 @@ bool LocalDirectoryStorage::serialiseDirEntry(const EntryIndex& indx,RsTlvBinary // compute list of allowed subdirs std::vector allowed_subdirs ; FileStorageFlags node_flags ; - std::list node_groups ; + std::list node_groups ; // for each subdir, compute the node flags and groups, then ask rsPeers to compute the mask that result from these flags for the particular peer supplied in parameter diff --git a/libretroshare/src/file_sharing/directory_storage.h b/libretroshare/src/file_sharing/directory_storage.h index b82696b2c..0f5311944 100644 --- a/libretroshare/src/file_sharing/directory_storage.h +++ b/libretroshare/src/file_sharing/directory_storage.h @@ -174,7 +174,7 @@ public: * false if the index is not valid * false otherwise */ - bool getFileSharingPermissions(const EntryIndex& indx, FileStorageFlags &flags, std::list& parent_groups); + bool getFileSharingPermissions(const EntryIndex& indx, FileStorageFlags &flags, std::list &parent_groups); virtual bool extractData(const EntryIndex& indx,DirDetails& d) ; @@ -190,7 +190,7 @@ public: bool serialiseDirEntry(const EntryIndex& indx, RsTlvBinaryData& bindata, const RsPeerId &client_id) ; private: - bool locked_getFileSharingPermissions(const EntryIndex& indx, FileStorageFlags &flags, std::list& parent_groups); + bool locked_getFileSharingPermissions(const EntryIndex& indx, FileStorageFlags &flags, std::list& parent_groups); std::string locked_findRealRootFromVirtualFilename(const std::string& virtual_rootdir) const; std::map mLocalDirs ; // map is better for search. it->first=it->second.filename diff --git a/libretroshare/src/file_sharing/p3filelists.cc b/libretroshare/src/file_sharing/p3filelists.cc index 8c948fb94..21beec912 100644 --- a/libretroshare/src/file_sharing/p3filelists.cc +++ b/libretroshare/src/file_sharing/p3filelists.cc @@ -756,7 +756,7 @@ void p3FileDatabase::handleDirSyncRequest(RsFileListsSyncRequestItem *item) ritem->request_id = item->request_id; ritem->entry_index = item->entry_index ; - std::list node_groups; + std::list node_groups; FileStorageFlags node_flags; if(entry_type != DIR_TYPE_DIR) diff --git a/libretroshare/src/retroshare/rstypes.h b/libretroshare/src/retroshare/rstypes.h index 56a9af280..8ca770a76 100644 --- a/libretroshare/src/retroshare/rstypes.h +++ b/libretroshare/src/retroshare/rstypes.h @@ -236,13 +236,13 @@ public: RsPeerId id; std::string name; RsFileHash hash; - std::string path; + std::string path; uint64_t count; uint32_t age; FileStorageFlags flags; uint32_t min_age ; // minimum age of files in this subtree - std::list children; + std::vector children; std::list parent_groups; // parent groups for the shared directory }; diff --git a/libretroshare/src/rsserver/rstypes.cc b/libretroshare/src/rsserver/rstypes.cc index f9b7a8471..4254ee258 100644 --- a/libretroshare/src/rsserver/rstypes.cc +++ b/libretroshare/src/rsserver/rstypes.cc @@ -59,7 +59,7 @@ std::ostream &operator<<(std::ostream &out, const DirDetails& d) std::cerr << " Age : " << d.age << std::endl; std::cerr << " Min age : " << d.min_age << std::endl; std::cerr << " Flags : " << d.flags << std::endl; - std::cerr << " Parent groups : " ; for(std::list::const_iterator it(d.parent_groups.begin());it!=d.parent_groups.end();++it) std::cerr << (*it) << " "; std::cerr << std::endl; + std::cerr << " Parent groups : " ; for(std::list::const_iterator it(d.parent_groups.begin());it!=d.parent_groups.end();++it) std::cerr << (*it) << " "; std::cerr << std::endl; std::cerr << " Children : " ; for(uint32_t i=0;i