From d89eda510fa6c08195ebb0d6fd597068544d0730 Mon Sep 17 00:00:00 2001 From: drbob Date: Sun, 7 Dec 2008 14:53:57 +0000 Subject: [PATCH] * switched off some debugging. * fixed tickrate slow down (when no activity) * added extra flags to interface. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@871 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/cachestrapper.cc | 2 -- libretroshare/src/ft/ftcontroller.cc | 8 ++++++-- libretroshare/src/ft/ftserver.cc | 17 ++++++++++++----- libretroshare/src/ft/fttransfermodule.cc | 4 +++- libretroshare/src/rsiface/rsnotify.h | 7 ++++++- libretroshare/src/services/p3distrib.cc | 2 -- 6 files changed, 27 insertions(+), 13 deletions(-) diff --git a/libretroshare/src/dbase/cachestrapper.cc b/libretroshare/src/dbase/cachestrapper.cc index 48145b66e..68519ca55 100644 --- a/libretroshare/src/dbase/cachestrapper.cc +++ b/libretroshare/src/dbase/cachestrapper.cc @@ -34,8 +34,6 @@ * #define CS_DEBUG 1 ***/ -#define CS_DEBUG 1 - bool operator<(const CacheId &a, const CacheId &b) { if (a.type == b.type) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 15f3fc646..418113459 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -49,8 +49,9 @@ #include "serialiser/rsconfigitems.h" - -#define CONTROL_DEBUG 1 +/****** + * #define CONTROL_DEBUG 1 + *****/ ftFileControl::ftFileControl() :mTransfer(NULL), mCreator(NULL), @@ -124,8 +125,11 @@ void ftController::run() std::map::iterator it; for(it = mDownloads.begin(); it != mDownloads.end(); it++) { + +#ifdef CONTROL_DEBUG std::cerr << "\tTicking: " << it->first; std::cerr << std::endl; +#endif if (it->second.mTransfer) (it->second.mTransfer)->tick(); diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 22b884536..d5a616552 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -47,6 +47,7 @@ const int ftserverzone = 29539; /*** * #define SERVER_DEBUG 1 + * #define DEBUG_TICK 1 ***/ /* Setup */ @@ -612,10 +613,15 @@ int ftServer::tick() // This function needs to be divided up. bool ftServer::handleInputQueues() { - handleCacheData(); - handleFileData(); - return true; + bool moreToTick = false; + if (handleCacheData()) + moreToTick = true; + + if (handleFileData()) + moreToTick = true; + + return moreToTick; } bool ftServer::handleCacheData() @@ -704,9 +710,11 @@ bool ftServer::handleCacheData() //rslog(RSL_DEBUG_BASIC, ftserverzone, out2.str()); mP3iface -> SendSearchResult(ci); + + i++; } } - return true; + return (i > 0); } @@ -740,7 +748,6 @@ bool ftServer::handleFileData() FileInfo(ffr); delete fr; - } // now File Data. diff --git a/libretroshare/src/ft/fttransfermodule.cc b/libretroshare/src/ft/fttransfermodule.cc index 9b69574e1..8e0c78d21 100644 --- a/libretroshare/src/ft/fttransfermodule.cc +++ b/libretroshare/src/ft/fttransfermodule.cc @@ -23,7 +23,9 @@ * */ -#define FT_DEBUG 1 +/****** + * #define FT_DEBUG 1 + *****/ #include "fttransfermodule.h" diff --git a/libretroshare/src/rsiface/rsnotify.h b/libretroshare/src/rsiface/rsnotify.h index a03ca9e31..95e1d0464 100644 --- a/libretroshare/src/rsiface/rsnotify.h +++ b/libretroshare/src/rsiface/rsnotify.h @@ -45,7 +45,12 @@ const uint32_t RS_POPUP_CHAT = 0x0002; const uint32_t RS_POPUP_CALL = 0x0004; const uint32_t RS_POPUP_CONNECT = 0x0008; - +/* CHAT flags are here - so they are in the same place as + * other Notify flags... not used by libretroshare though + */ +const uint32_t RS_CHAT_OPEN_NEW = 0x0001; +const uint32_t RS_CHAT_REOPEN = 0x0002; +const uint32_t RS_CHAT_FOCUS = 0x0004; const uint32_t RS_FEED_TYPE_PEER = 0x0010; const uint32_t RS_FEED_TYPE_CHAN = 0x0020; diff --git a/libretroshare/src/services/p3distrib.cc b/libretroshare/src/services/p3distrib.cc index 62be2b42d..66b055b4b 100644 --- a/libretroshare/src/services/p3distrib.cc +++ b/libretroshare/src/services/p3distrib.cc @@ -37,8 +37,6 @@ * #define DISTRIB_DEBUG 1 ****/ -#define DISTRIB_DEBUG 1 - RSA *extractPublicKey(RsTlvSecurityKey &key); RSA *extractPrivateKey(RsTlvSecurityKey &key); void setRSAPublicKey(RsTlvSecurityKey &key, RSA *rsa_pub);