[o2on-svn] [108] FIX: #12995 無視している板のdatのリクエストを送らないようにした

Back to archive index

o2on svn commit o2on-****@lists*****
2008年 7月 26日 (土) 17:29:15 JST


Revision: 108
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=o2on&view=rev&rev=108
Author:   k-uehara
Date:     2008-07-26 17:29:15 +0900 (Sat, 26 Jul 2008)

Log Message:
-----------
FIX: #12995 無視している板のdatのリクエストを送らないようにした

Ticket Links:
:-----------
    http://sourceforge.jp/projects/o2on/tracker/detail/12995

Modified Paths:
--------------
    branches/BRANCH_0043/o2on/src.o2on/O2Boards.cpp
    branches/BRANCH_0043/o2on/src.o2on/O2Boards.h
    branches/BRANCH_0043/o2on/src.o2on/O2Job_DatCollector.h

Modified: branches/BRANCH_0043/o2on/src.o2on/O2Boards.cpp
===================================================================
--- branches/BRANCH_0043/o2on/src.o2on/O2Boards.cpp	2008-07-26 08:17:23 UTC (rev 107)
+++ branches/BRANCH_0043/o2on/src.o2on/O2Boards.cpp	2008-07-26 08:29:15 UTC (rev 108)
@@ -420,6 +420,27 @@
 
 
 // ---------------------------------------------------------------------------
+//	GetExEnList()
+//	
+// ---------------------------------------------------------------------------
+size_t
+O2Boards::
+GetExEnList(wstrarray &boards)
+{
+	ExLock.Lock();
+	for (O2BoardExMapIt exit = exmap.begin(); exit != exmap.end(); exit++) {
+		if (exit->second->collectors.count() && exit->second->enable)
+			boards.push_back(exit->first);
+	}
+	ExLock.Unlock();
+
+	return (boards.size());
+}
+
+
+
+
+// ---------------------------------------------------------------------------
 //	GetExNodeList()
 //	
 // ---------------------------------------------------------------------------

Modified: branches/BRANCH_0043/o2on/src.o2on/O2Boards.h
===================================================================
--- branches/BRANCH_0043/o2on/src.o2on/O2Boards.h	2008-07-26 08:17:23 UTC (rev 107)
+++ branches/BRANCH_0043/o2on/src.o2on/O2Boards.h	2008-07-26 08:29:15 UTC (rev 108)
@@ -107,6 +107,7 @@
 	void ClearEx(void);
 	bool AddEx(const char *url);
 	size_t GetExList(wstrarray &boards);
+	size_t GetExEnList(wstrarray &boards);
 	size_t GetExNodeList(const wchar_t *board, O2NodeKBucket::NodeListT &nodelist);
 	void RemoveExNode(const wchar_t *board, const O2Node &node);
 	void ImportNodeFromXML(const O2Node &node, const char *in, size_t len);

Modified: branches/BRANCH_0043/o2on/src.o2on/O2Job_DatCollector.h
===================================================================
--- branches/BRANCH_0043/o2on/src.o2on/O2Job_DatCollector.h	2008-07-26 08:17:23 UTC (rev 107)
+++ branches/BRANCH_0043/o2on/src.o2on/O2Job_DatCollector.h	2008-07-26 08:29:15 UTC (rev 108)
@@ -81,7 +81,7 @@
 	{
 		// Žæ“¾‚·‚é”Â‚ðŒˆ‚ß‚é
 		wstrarray boards;
-		if (Boards->GetExList(boards) == 0)
+		if (Boards->GetExEnList(boards) == 0)
 			return;
 		CryptoPP::AutoSeededRandomPool rng;
 		wstring &board = boards[rng.GenerateWord32(0, boards.size()-1)];




o2on-svn メーリングリストの案内
Back to archive index