From fa6af9a1cae0444d1061986f2b837f8ca98ba273 Mon Sep 17 00:00:00 2001 From: chrisparker126 Date: Sun, 3 Oct 2010 21:48:19 +0000 Subject: [PATCH] fixed channel edit problem and added some documentation for pqimonitor git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3596 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/pqimonitor.h | 18 ++++++++++++++++++ libretroshare/src/services/p3distrib.cc | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/pqimonitor.h b/libretroshare/src/pqi/pqimonitor.h index ff4fce898..548188b73 100644 --- a/libretroshare/src/pqi/pqimonitor.h +++ b/libretroshare/src/pqi/pqimonitor.h @@ -86,13 +86,31 @@ uint32_t actions; class p3ConnectMgr; +/*! + * This class should be implemented + * to use the information that is passed to it via + * from the p3ConnectMngr + * Useful information is sent via ticks such as a peer's + * state and a peer's action + */ class pqiMonitor { public: pqiMonitor() :mConnMgr(NULL) { return; } virtual ~pqiMonitor() { return; } + /*! + * passes a handle the retroshare connection manager + */ void setConnectionMgr(p3ConnectMgr *cm) { mConnMgr = cm; } + + /*! + * this serves as a call back function for server which has + * a handle on the subclass and updates this subclass on the + * action of peer's of the client (state and action information) + * + *@param plist contains list of states and actions of the client's peers + */ virtual void statusChange(const std::list &plist) = 0; //virtual void ownStatusChange(pqipeer &) { return; } // SIGNAL reset or similar. //virtual void peerStatus(std::string id, uint32_t mode) = 0; diff --git a/libretroshare/src/services/p3distrib.cc b/libretroshare/src/services/p3distrib.cc index b346b1484..d6a757253 100644 --- a/libretroshare/src/services/p3distrib.cc +++ b/libretroshare/src/services/p3distrib.cc @@ -2497,7 +2497,8 @@ bool p3GroupDistrib::locked_editGroup(std::string grpId, GroupInfo& gi){ } - gi_curr->distribGroup->grpFlags |= RS_DISTRIB_UPDATE; + // set new timestamp for grp + gi_curr->distribGroup->timestamp = time(NULL); // create new signature for group @@ -2525,6 +2526,9 @@ bool p3GroupDistrib::locked_editGroup(std::string grpId, GroupInfo& gi){ gi_curr->grpChanged = true; mGroupsRepublish = true; + // this is removed afterwards + gi_curr->distribGroup->grpFlags |= RS_DISTRIB_UPDATE; + delete[] data; return true;