You can subscribe to this list here.
2006 |
Jan
|
Feb
(24) |
Mar
(9) |
Apr
(4) |
May
(7) |
Jun
(13) |
Jul
(19) |
Aug
(1) |
Sep
(12) |
Oct
(20) |
Nov
(1) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(1) |
May
(10) |
Jun
(30) |
Jul
(46) |
Aug
(20) |
Sep
(12) |
Oct
(27) |
Nov
(51) |
Dec
(58) |
2008 |
Jan
(40) |
Feb
(40) |
Mar
(78) |
Apr
(138) |
May
(4) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(2) |
Jul
(10) |
Aug
(1) |
Sep
(11) |
Oct
(31) |
Nov
(7) |
Dec
(1) |
2011 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
(3) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <arn...@us...> - 2006-04-30 11:10:19
|
Revision: 599 Author: arnetheduck Date: 2006-04-30 04:09:50 -0700 (Sun, 30 Apr 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=599&view=rev Log Message: ----------- CID display added here and there (in frames, when nick missing) Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/ClientManager.cpp dcplusplus/trunk/client/ClientManager.h dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/windows/FinishedFrame.cpp dcplusplus/trunk/windows/FinishedULFrame.cpp dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/SearchFrm.h dcplusplus/trunk/windows/TransferView.cpp dcplusplus/trunk/windows/TransferView.h dcplusplus/trunk/windows/UsersFrame.cpp dcplusplus/trunk/windows/UsersFrame.h Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/Example.xml 2006-04-30 11:09:50 UTC (rev 599) @@ -41,6 +41,7 @@ <String Name="BrowseAccel">&Browse...</String> <String Name="BrowseFileList">Browse file list</String> <String Name="ChooseFolder">Choose folder</String> + <String Name="Cid">CID</String> <String Name="Close">Close</String> <String Name="CloseConnection">Close connection</String> <String Name="ClosingConnection">Closing connection...</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/changelog.txt 2006-04-30 11:09:50 UTC (rev 599) @@ -3,8 +3,10 @@ * Fixed an issue where client could be crashed from remote * Fixed an issue bad nicks could cause directories to be created in log / file list download folder * Changed autodrop default to 2 for fewer unexpected autodrops (thanks paka) +* Saved users file more often to have fewer missing nicks around +* CID of user shown if nick is missing (in queue for example) +* Added display of CID in a few places - -- 0.689 2006-04-01 -- * Fixed displaying of available bytes when user list is off * Fixed a potential crash when not showing user list Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -269,7 +269,7 @@ size_t readPos = 0; bool readDone = false; - dcdebug("Starting threadSend"); + dcdebug("Starting threadSend\n"); while(true) { if(!readDone && readBuf.size() > readPos) { // Fill read buffer Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -112,10 +112,11 @@ if(lst.empty()) { // Offline perhaps? UserIter i = users.find(cid); - if(i != users.end()) + if(i != users.end() && !i->second->getFirstNick().empty()) { lst.push_back(i->second->getFirstNick()); - else + } else { lst.push_back('{' + cid.toBase32() + '}'); + } } return lst; } @@ -452,7 +453,7 @@ } } -void ClientManager::on(Save, SimpleXML*) throw() { +void ClientManager::save() { Lock l(cs); try { @@ -485,6 +486,10 @@ } } +void ClientManager::on(Save, SimpleXML*) throw() { + save(); +} + User::Ptr& ClientManager::getMe() { if(!me) { Lock l(cs); Modified: dcplusplus/trunk/client/ClientManager.h =================================================================== --- dcplusplus/trunk/client/ClientManager.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/ClientManager.h 2006-04-30 11:09:50 UTC (rev 599) @@ -106,6 +106,8 @@ CID getMyCID(); const CID& getMyPID(); + + void save(); private: typedef HASH_MAP<string, User::Ptr> LegacyMap; typedef LegacyMap::iterator LegacyIter; Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -1179,6 +1179,8 @@ File::deleteFile(getQueueFile()); File::renameFile(getQueueFile() + ".tmp", getQueueFile()); + ClientManager::getInstance()->save(); + dirty = false; } catch(const FileException&) { // ... Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -42,6 +42,7 @@ "&Browse...", "Browse file list", "Choose folder", +"CID", "Close", "Close connection", "Closing connection...", @@ -644,6 +645,7 @@ "BrowseAccel", "BrowseFileList", "ChooseFolder", +"Cid", "Close", "CloseConnection", "ClosingConnection", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/client/StringDefs.h 2006-04-30 11:09:50 UTC (rev 599) @@ -45,6 +45,7 @@ BROWSE_ACCEL, // "&Browse..." BROWSE_FILE_LIST, // "Browse file list" CHOOSE_FOLDER, // "Choose folder" + CID, // "CID" CLOSE, // "Close" CLOSE_CONNECTION, // "Close connection" CLOSING_CONNECTION, // "Closing connection..." Modified: dcplusplus/trunk/windows/FinishedFrame.cpp =================================================================== --- dcplusplus/trunk/windows/FinishedFrame.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/FinishedFrame.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -21,234 +21,8 @@ #include "Resource.h" #include "FinishedFrame.h" -#include "WinUtil.h" -#include "TextFrame.h" -#include "../client/ClientManager.h" -#include "../client/StringTokenizer.h" -int FinishedFrame::columnIndexes[] = { COLUMN_DONE, COLUMN_FILE, COLUMN_PATH, COLUMN_NICK, COLUMN_HUB, COLUMN_SIZE, COLUMN_SPEED, COLUMN_CRC32 }; -int FinishedFrame::columnSizes[] = { 100, 110, 290, 125, 80, 80, 80, 80 }; -static ResourceManager::Strings columnNames[] = { ResourceManager::FILENAME, ResourceManager::TIME, ResourceManager::PATH, -ResourceManager::NICK, ResourceManager::HUB, ResourceManager::SIZE, ResourceManager::SPEED, ResourceManager::CRC_CHECKED -}; - -LRESULT FinishedFrame::onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) -{ - CreateSimpleStatusBar(ATL_IDS_IDLEMESSAGE, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SBARS_SIZEGRIP); - ctrlStatus.Attach(m_hWndStatusBar); - - ctrlList.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | - WS_HSCROLL | WS_VSCROLL | LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS, WS_EX_CLIENTEDGE, IDC_FINISHED); - ctrlList.SetExtendedListViewStyle(LVS_EX_LABELTIP | LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT); - - ctrlList.SetImageList(WinUtil::fileImages, LVSIL_SMALL); - ctrlList.SetBkColor(WinUtil::bgColor); - ctrlList.SetTextBkColor(WinUtil::bgColor); - ctrlList.SetTextColor(WinUtil::textColor); - - // Create listview columns - WinUtil::splitTokens(columnIndexes, SETTING(FINISHED_ORDER), COLUMN_LAST); - WinUtil::splitTokens(columnSizes, SETTING(FINISHED_WIDTHS), COLUMN_LAST); - - for(int j=0; j<COLUMN_LAST; j++) { - int fmt = (j == COLUMN_SIZE || j == COLUMN_SPEED) ? LVCFMT_RIGHT : LVCFMT_LEFT; - ctrlList.InsertColumn(j, CTSTRING_I(columnNames[j]), fmt, columnSizes[j], j); - } - - ctrlList.SetColumnOrderArray(COLUMN_LAST, columnIndexes); - ctrlList.setSort(COLUMN_DONE, ExListViewCtrl::SORT_STRING_NOCASE); - - UpdateLayout(); - - FinishedManager::getInstance()->addListener(this); - updateList(FinishedManager::getInstance()->lockList()); - FinishedManager::getInstance()->unlockList(); - - ctxMenu.CreatePopupMenu(); - ctxMenu.AppendMenu(MF_STRING, IDC_VIEW_AS_TEXT, CTSTRING(VIEW_AS_TEXT)); - ctxMenu.AppendMenu(MF_STRING, IDC_OPEN_FILE, CTSTRING(OPEN)); - ctxMenu.AppendMenu(MF_STRING, IDC_OPEN_FOLDER, CTSTRING(OPEN_FOLDER)); - ctxMenu.AppendMenu(MF_SEPARATOR); - ctxMenu.AppendMenu(MF_STRING, IDC_REMOVE, CTSTRING(REMOVE)); - ctxMenu.AppendMenu(MF_STRING, IDC_TOTAL, CTSTRING(REMOVE_ALL)); - ctxMenu.SetMenuDefaultItem(IDC_OPEN_FILE); - - bHandled = FALSE; - return TRUE; -} - -LRESULT FinishedFrame::onContextMenu(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - if (reinterpret_cast<HWND>(wParam) == ctrlList && ctrlList.GetSelectedCount() > 0) { - POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; - - if(pt.x == -1 && pt.y == -1) { - WinUtil::getContextMenuPos(ctrlList, pt); - } - - ctxMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, m_hWnd); - return TRUE; - } - bHandled = FALSE; - return FALSE; -} - -LRESULT FinishedFrame::onColumnClickFinished(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { - NMLISTVIEW* const l = (NMLISTVIEW*)pnmh; - if(l->iSubItem == ctrlList.getSortColumn()) { - if (!ctrlList.isAscending()) - ctrlList.setSort(-1, ctrlList.getSortType()); - else - ctrlList.setSortDirection(false); - } else { - switch(l->iSubItem) { - case COLUMN_SIZE: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_FUNC, true, sortSize); - break; - case COLUMN_SPEED: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_FUNC, true, sortSpeed); - break; - default: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_STRING_NOCASE); - break; - } - } - return 0; -} - -void FinishedFrame::UpdateLayout(BOOL bResizeBars /* = TRUE */) { - RECT rect; - GetClientRect(&rect); - - // position bars and offset their dimensions - UpdateBarsPosition(rect, bResizeBars); - - if(ctrlStatus.IsWindow()) { - CRect sr; - int w[4]; - ctrlStatus.GetClientRect(sr); - w[3] = sr.right - 16; - w[2] = max(w[3] - 100, 0); - w[1] = max(w[2] - 100, 0); - w[0] = max(w[1] - 100, 0); - - ctrlStatus.SetParts(4, w); - } - - CRect rc(rect); - ctrlList.MoveWindow(rc); -} - -LRESULT FinishedFrame::onDoubleClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { - - NMITEMACTIVATE * const item = (NMITEMACTIVATE*) pnmh; - - if(item->iItem != -1) { - FinishedItem* entry = (FinishedItem*)ctrlList.GetItemData(item->iItem); - WinUtil::openFile(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedFrame::onViewAsText(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - TextFrame::openWindow(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedFrame::onOpenFile(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - WinUtil::openFile(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedFrame::onOpenFolder(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - WinUtil::openFolder(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedFrame::onRemove(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { - switch(wID) - { - case IDC_REMOVE: - { - int i = -1; - while((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedManager::getInstance()->remove((FinishedItem*)ctrlList.GetItemData(i)); - ctrlList.DeleteItem(i); - } - break; - } - case IDC_TOTAL: - FinishedManager::getInstance()->removeAll(); - break; - } - return 0; -} - -LRESULT FinishedFrame::onClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { - if(!closed) { - FinishedManager::getInstance()->removeListener(this); - - closed = true; - PostMessage(WM_CLOSE); - return 0; - } else { - WinUtil::saveHeaderOrder(ctrlList, SettingsManager::FINISHED_ORDER, - SettingsManager::FINISHED_WIDTHS, COLUMN_LAST, columnIndexes, columnSizes); - - bHandled = FALSE; - return 0; - } -} - -LRESULT FinishedFrame::onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { - if(wParam == SPEAK_ADD_LINE) { - FinishedItem* entry = (FinishedItem*)lParam; - addEntry(entry); - if(BOOLSETTING(BOLD_FINISHED_DOWNLOADS)) - setDirty(); - updateStatus(); - } else if(wParam == SPEAK_REMOVE) { - updateStatus(); - } else if(wParam == SPEAK_REMOVE_ALL) { - ctrlList.DeleteAllItems(); - updateStatus(); - } - return 0; -} - -void FinishedFrame::addEntry(FinishedItem* entry) { - TStringList l; - l.push_back(Text::toT(Util::getFileName(entry->getTarget()))); - l.push_back(Text::toT(Util::formatTime("%Y-%m-%d %H:%M:%S", entry->getTime()))); - l.push_back(Text::toT(Util::getFilePath(entry->getTarget()))); - l.push_back(Text::toT(entry->getUser())); - l.push_back(Text::toT(entry->getHub())); - l.push_back(Text::toT(Util::formatBytes(entry->getSize()))); - l.push_back(Text::toT(Util::formatBytes(entry->getAvgSpeed()) + "/s")); - l.push_back(entry->getCrc32Checked() ? TSTRING(YES_STR) : TSTRING(NO_STR)); - totalBytes += entry->getChunkSize(); - totalTime += entry->getMilliSeconds(); - - int image = WinUtil::getIconIndex(Text::toT(entry->getTarget())); - int loc = ctrlList.insert(l, image, (LPARAM)entry); - ctrlList.EnsureVisible(loc, FALSE); -} - /** * @file * $Id: FinishedFrame.cpp,v 1.39 2005/12/19 00:15:52 arnetheduck Exp $ Modified: dcplusplus/trunk/windows/FinishedULFrame.cpp =================================================================== --- dcplusplus/trunk/windows/FinishedULFrame.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/FinishedULFrame.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -21,235 +21,7 @@ #include "Resource.h" #include "FinishedULFrame.h" -#include "WinUtil.h" -#include "TextFrame.h" -#include "../client/ClientManager.h" -#include "../client/StringTokenizer.h" - -int FinishedULFrame::columnIndexes[] = { COLUMN_DONE, COLUMN_FILE, COLUMN_PATH, COLUMN_NICK, COLUMN_HUB, COLUMN_SIZE, COLUMN_SPEED }; -int FinishedULFrame::columnSizes[] = { 100, 110, 290, 125, 80, 80, 80 }; -static ResourceManager::Strings columnNames[] = { ResourceManager::FILENAME, ResourceManager::TIME, ResourceManager::PATH, -ResourceManager::NICK, ResourceManager::HUB, ResourceManager::SIZE, ResourceManager::SPEED -}; - -LRESULT FinishedULFrame::onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) -{ - CreateSimpleStatusBar(ATL_IDS_IDLEMESSAGE, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SBARS_SIZEGRIP); - ctrlStatus.Attach(m_hWndStatusBar); - - ctrlList.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | - WS_HSCROLL | WS_VSCROLL | LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS, WS_EX_CLIENTEDGE, IDC_FINISHED_UL); - ctrlList.SetExtendedListViewStyle(LVS_EX_LABELTIP | LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT); - - ctrlList.SetImageList(WinUtil::fileImages, LVSIL_SMALL); - ctrlList.SetBkColor(WinUtil::bgColor); - ctrlList.SetTextBkColor(WinUtil::bgColor); - ctrlList.SetTextColor(WinUtil::textColor); - - // Create listview columns - WinUtil::splitTokens(columnIndexes, SETTING(FINISHED_UL_ORDER), COLUMN_LAST); - WinUtil::splitTokens(columnSizes, SETTING(FINISHED_UL_WIDTHS), COLUMN_LAST); - - for(int j=0; j<COLUMN_LAST; j++) { - int fmt = (j == COLUMN_SIZE || j == COLUMN_SPEED) ? LVCFMT_RIGHT : LVCFMT_LEFT; - ctrlList.InsertColumn(j, CTSTRING_I(columnNames[j]), fmt, columnSizes[j], j); - } - - ctrlList.SetColumnOrderArray(COLUMN_LAST, columnIndexes); - ctrlList.setSort(COLUMN_DONE, ExListViewCtrl::SORT_STRING_NOCASE); - - UpdateLayout(); - - FinishedManager::getInstance()->addListener(this); - updateList(FinishedManager::getInstance()->lockList(true)); - FinishedManager::getInstance()->unlockList(); - - ctxMenu.CreatePopupMenu(); - ctxMenu.AppendMenu(MF_STRING, IDC_VIEW_AS_TEXT, CTSTRING(VIEW_AS_TEXT)); - ctxMenu.AppendMenu(MF_STRING, IDC_OPEN_FILE, CTSTRING(OPEN)); - ctxMenu.AppendMenu(MF_STRING, IDC_OPEN_FOLDER, CTSTRING(OPEN_FOLDER)); - ctxMenu.AppendMenu(MF_SEPARATOR); - ctxMenu.AppendMenu(MF_STRING, IDC_REMOVE, CTSTRING(REMOVE)); - ctxMenu.AppendMenu(MF_STRING, IDC_TOTAL, CTSTRING(REMOVE_ALL)); - ctxMenu.SetMenuDefaultItem(IDC_OPEN_FILE); - - bHandled = FALSE; - return TRUE; -} - -LRESULT FinishedULFrame::onContextMenu(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - if (reinterpret_cast<HWND>(wParam) == ctrlList && ctrlList.GetSelectedCount() > 0) { - POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; - - if(pt.x == -1 && pt.y == -1) { - WinUtil::getContextMenuPos(ctrlList, pt); - } - - ctxMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, m_hWnd); - return TRUE; - } - - bHandled = FALSE; - return FALSE; -} - -LRESULT FinishedULFrame::onColumnClickFinished(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { - NMLISTVIEW* const l = (NMLISTVIEW*)pnmh; - if(l->iSubItem == ctrlList.getSortColumn()) { - if (!ctrlList.isAscending()) - ctrlList.setSort(-1, ctrlList.getSortType()); - else - ctrlList.setSortDirection(false); - } else { - switch(l->iSubItem) { - case COLUMN_SIZE: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_FUNC, true, sortSize); - break; - case COLUMN_SPEED: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_FUNC, true, sortSpeed); - break; - default: - ctrlList.setSort(l->iSubItem, ExListViewCtrl::SORT_STRING_NOCASE); - break; - } - } - return 0; -} - -void FinishedULFrame::UpdateLayout(BOOL bResizeBars /* = TRUE */) -{ - RECT rect; - GetClientRect(&rect); - - // position bars and offset their dimensions - UpdateBarsPosition(rect, bResizeBars); - - if(ctrlStatus.IsWindow()) { - CRect sr; - int w[4]; - ctrlStatus.GetClientRect(sr); - w[3] = sr.right - 16; - w[2] = max(w[3] - 100, 0); - w[1] = max(w[2] - 100, 0); - w[0] = max(w[1] - 100, 0); - - ctrlStatus.SetParts(4, w); - } - - CRect rc(rect); - ctrlList.MoveWindow(rc); -} - -LRESULT FinishedULFrame::onDoubleClick(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { - - NMITEMACTIVATE * const item = (NMITEMACTIVATE*) pnmh; - - if(item->iItem != -1) { - FinishedItem* entry = (FinishedItem*)ctrlList.GetItemData(item->iItem); - WinUtil::openFile(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedULFrame::onViewAsText(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - TextFrame::openWindow(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedULFrame::onOpenFile(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - WinUtil::openFile(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedULFrame::onOpenFolder(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) -{ - int i; - if((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedItem * const entry = (FinishedItem*)ctrlList.GetItemData(i); - WinUtil::openFolder(Text::toT(entry->getTarget())); - } - return 0; -} - -LRESULT FinishedULFrame::onRemove(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { - switch(wID) - { - case IDC_REMOVE: - { - int i = -1; - while((i = ctrlList.GetNextItem(-1, LVNI_SELECTED)) != -1) { - FinishedManager::getInstance()->remove((FinishedItem*)ctrlList.GetItemData(i), true); - ctrlList.DeleteItem(i); - } - break; - } - case IDC_TOTAL: - FinishedManager::getInstance()->removeAll(true); - break; - } - return 0; -} - -LRESULT FinishedULFrame::onClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { - if(!closed) { - FinishedManager::getInstance()->removeListener(this); - - closed = true; - PostMessage(WM_CLOSE); - return 0; - } else { - WinUtil::saveHeaderOrder(ctrlList, SettingsManager::FINISHED_UL_ORDER, - SettingsManager::FINISHED_UL_WIDTHS, COLUMN_LAST, columnIndexes, columnSizes); - - bHandled = FALSE; - return 0; - } -} - -LRESULT FinishedULFrame::onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { - if(wParam == SPEAK_ADD_LINE) { - FinishedItem* entry = (FinishedItem*)lParam; - addEntry(entry); - if(BOOLSETTING(BOLD_FINISHED_UPLOADS)) - setDirty(); - updateStatus(); - } else if(wParam == SPEAK_REMOVE) { - updateStatus(); - } else if(wParam == SPEAK_REMOVE_ALL) { - ctrlList.DeleteAllItems(); - updateStatus(); - } - return 0; -} - -void FinishedULFrame::addEntry(FinishedItem* entry) { - TStringList l; - l.push_back(Text::toT(Util::getFileName(entry->getTarget()))); - l.push_back(Text::toT(Util::formatTime("%Y-%m-%d %H:%M:%S", entry->getTime()))); - l.push_back(Text::toT(Util::getFilePath(entry->getTarget()))); - l.push_back(Text::toT(entry->getUser())); - l.push_back(Text::toT(entry->getHub())); - l.push_back(Text::toT(Util::formatBytes(entry->getSize()))); - l.push_back(Text::toT(Util::formatBytes(entry->getAvgSpeed()) + "/s")); - totalBytes += entry->getChunkSize(); - totalTime += entry->getMilliSeconds(); - - int image = WinUtil::getIconIndex(Text::toT(entry->getTarget())); - int loc = ctrlList.insert(l, image, (LPARAM)entry); - ctrlList.EnsureVisible(loc, FALSE); -} - /** * @file * $Id: FinishedULFrame.cpp,v 1.32 2005/12/19 00:15:52 arnetheduck Exp $ Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -37,10 +37,10 @@ HubFrame::FrameMap HubFrame::frames; -int HubFrame::columnSizes[] = { 100, 75, 75, 100, 75, 100 }; -int HubFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_SHARED, COLUMN_DESCRIPTION, COLUMN_TAG, COLUMN_CONNECTION, COLUMN_EMAIL }; +int HubFrame::columnSizes[] = { 100, 75, 75, 100, 75, 100, 125 }; +int HubFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_SHARED, COLUMN_DESCRIPTION, COLUMN_TAG, COLUMN_CONNECTION, COLUMN_EMAIL, COLUMN_CID }; static ResourceManager::Strings columnNames[] = { ResourceManager::NICK, ResourceManager::SHARED, -ResourceManager::DESCRIPTION, ResourceManager::TAG, ResourceManager::CONNECTION, ResourceManager::EMAIL }; +ResourceManager::DESCRIPTION, ResourceManager::TAG, ResourceManager::CONNECTION, ResourceManager::EMAIL, ResourceManager::CID }; LRESULT HubFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { @@ -421,6 +421,7 @@ columns[COLUMN_TAG] = Text::toT(identity.getTag()); columns[COLUMN_CONNECTION] = Text::toT(identity.getConnection()); columns[COLUMN_EMAIL] = Text::toT(identity.getEmail()); + columns[COLUMN_CID] = Text::toT(identity.getUser()->getCID().toBase32()); if(sortCol != -1) { needsSort = needsSort || (old != columns[sortCol]); Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/HubFrame.h 2006-04-30 11:09:50 UTC (rev 599) @@ -166,6 +166,7 @@ COLUMN_TAG, COLUMN_CONNECTION, COLUMN_EMAIL, + COLUMN_CID, COLUMN_LAST }; Modified: dcplusplus/trunk/windows/SearchFrm.cpp =================================================================== --- dcplusplus/trunk/windows/SearchFrm.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/SearchFrm.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -30,12 +30,12 @@ TStringList SearchFrame::lastSearches; int SearchFrame::columnIndexes[] = { COLUMN_FILENAME, COLUMN_NICK, COLUMN_TYPE, COLUMN_SIZE, - COLUMN_PATH, COLUMN_SLOTS, COLUMN_CONNECTION, COLUMN_HUB, COLUMN_EXACT_SIZE, COLUMN_IP, COLUMN_TTH }; -int SearchFrame::columnSizes[] = { 200, 100, 50, 80, 100, 40, 70, 150, 80, 100, 125 }; + COLUMN_PATH, COLUMN_SLOTS, COLUMN_CONNECTION, COLUMN_HUB, COLUMN_EXACT_SIZE, COLUMN_IP, COLUMN_TTH, COLUMN_CID }; +int SearchFrame::columnSizes[] = { 200, 100, 50, 80, 100, 40, 70, 150, 80, 100, 125, 125 }; static ResourceManager::Strings columnNames[] = { ResourceManager::FILE, ResourceManager::USER, ResourceManager::TYPE, ResourceManager::SIZE, ResourceManager::PATH, ResourceManager::SLOTS, ResourceManager::CONNECTION, - ResourceManager::HUB, ResourceManager::EXACT_SIZE, ResourceManager::IP_BARE, ResourceManager::TTH_ROOT }; + ResourceManager::HUB, ResourceManager::EXACT_SIZE, ResourceManager::IP_BARE, ResourceManager::TTH_ROOT, ResourceManager::CID }; void SearchFrame::openWindow(const tstring& str /* = Util::emptyString */, LONGLONG size /* = 0 */, SearchManager::SizeModes mode /* = SearchManager::SIZE_ATLEAST */, SearchManager::TypeModes type /* = SearchManager::TYPE_ANY ( 0 ) */) { SearchFrame* pChild = new SearchFrame(); @@ -407,7 +407,7 @@ void SearchFrame::SearchInfo::view() { try { if(sr->getType() == SearchResult::TYPE_FILE) { - QueueManager::getInstance()->add(Util::getTempPath() + Text::fromT(fileName), + QueueManager::getInstance()->add(Util::getTempPath() + Text::fromT(columns[COLUMN_FILENAME]), sr->getSize(), sr->getTTH(), sr->getUser(), sr->getFile(), sr->getUtf8(), QueueItem::FLAG_CLIENT_VIEW | QueueItem::FLAG_TEXT); } @@ -418,7 +418,7 @@ void SearchFrame::SearchInfo::Download::operator()(SearchInfo* si) { try { if(si->sr->getType() == SearchResult::TYPE_FILE) { - string target = Text::fromT(tgt + si->fileName); + string target = Text::fromT(tgt + si->columns[COLUMN_FILENAME]); QueueManager::getInstance()->add(target, si->sr->getSize(), si->sr->getTTH(), si->sr->getUser(), si->sr->getFile(), si->sr->getUtf8()); @@ -436,7 +436,7 @@ void SearchFrame::SearchInfo::DownloadWhole::operator()(SearchInfo* si) { try { if(si->sr->getType() == SearchResult::TYPE_FILE) { - QueueManager::getInstance()->addDirectory(Text::fromT(si->path), si->sr->getUser(), Text::fromT(tgt), + QueueManager::getInstance()->addDirectory(Text::fromT(si->columns[COLUMN_PATH]), si->sr->getUser(), Text::fromT(tgt), WinUtil::isShift() ? QueueItem::HIGHEST : QueueItem::DEFAULT); } else { QueueManager::getInstance()->addDirectory(si->sr->getFile(), si->sr->getUser(), Text::fromT(tgt), @@ -466,7 +466,7 @@ void SearchFrame::SearchInfo::getList() { try { - WinUtil::addInitalDir(sr->getUser(), Text::fromT(getPath())); + WinUtil::addInitalDir(sr->getUser(), Text::fromT(columns[COLUMN_PATH])); QueueManager::getInstance()->addList(sr->getUser(), QueueItem::FLAG_CLIENT_VIEW); } catch(const Exception&) { // Ignore for now... @@ -475,20 +475,20 @@ void SearchFrame::SearchInfo::browseList() { try { - QueueManager::getInstance()->addPfs(sr->getUser(), Text::fromT(getPath())); + QueueManager::getInstance()->addPfs(sr->getUser(), Text::fromT(columns[COLUMN_PATH])); } catch(const Exception&) { // Ignore for now... } } void SearchFrame::SearchInfo::CheckSize::operator()(SearchInfo* si) { - if(!si->getTTH().empty()) { + if(!si->columns[COLUMN_TTH].empty()) { if(firstTTH) { - tth = si->getTTH(); + tth = si->columns[COLUMN_TTH]; hasTTH = true; firstTTH = false; } else if(hasTTH) { - if(tth != si->getTTH()) { + if(tth != si->columns[COLUMN_TTH]) { hasTTH = false; } } @@ -499,10 +499,10 @@ if(si->sr->getType() == SearchResult::TYPE_FILE) { if(ext.empty()) { - ext = Util::getFileExt(si->fileName); + ext = Util::getFileExt(si->columns[COLUMN_FILENAME]); size = si->sr->getSize(); } else if(size != -1) { - if((si->sr->getSize() != size) || (Util::stricmp(ext, Util::getFileExt(si->fileName)) != 0)) { + if((si->sr->getSize() != size) || (Util::stricmp(ext, Util::getFileExt(si->columns[COLUMN_FILENAME])) != 0)) { size = -1; } } @@ -526,7 +526,7 @@ SearchResult* sr = si->sr; if(sr->getType() == SearchResult::TYPE_FILE) { - tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)) + si->getFileName(); + tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)) + si->columns[COLUMN_FILENAME]; if(WinUtil::browseFile(target, m_hWnd)) { WinUtil::addLastDir(Util::getFilePath(target)); ctrlResults.forEachSelectedT(SearchInfo::DownloadTarget(target)); @@ -1140,39 +1140,42 @@ void SearchFrame::SearchInfo::update() { if(sr->getType() == SearchResult::TYPE_FILE) { if(sr->getFile().rfind(_T('\\')) == tstring::npos) { - fileName = Text::toT(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile())); + columns[COLUMN_FILENAME] = Text::toT(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile())); } else { - fileName = Text::toT(Util::getFileName(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile()))); - path = Text::toT(Util::getFilePath(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile()))); + columns[COLUMN_FILENAME] = Text::toT(Util::getFileName(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile()))); + columns[COLUMN_PATH] = Text::toT(Util::getFilePath(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile()))); } - type = Text::toT(Util::getFileExt(Text::fromT(fileName))); - if(!type.empty() && type[0] == _T('.')) - type.erase(0, 1); - size = Text::toT(Util::formatBytes(sr->getSize())); - exactSize = Text::toT(Util::formatExactSize(sr->getSize())); + columns[COLUMN_TYPE] = Text::toT(Util::getFileExt(Text::fromT(columns[COLUMN_FILENAME]))); + if(!columns[COLUMN_TYPE].empty() && columns[COLUMN_TYPE][0] == _T('.')) + columns[COLUMN_TYPE].erase(0, 1); + columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(sr->getSize())); + columns[COLUMN_EXACT_SIZE] = Text::toT(Util::formatExactSize(sr->getSize())); } else { - fileName = Text::toT(sr->getUtf8() ? sr->getFileName() : Text::acpToUtf8(sr->getFileName())); - path = Text::toT(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile())); - type = TSTRING(DIRECTORY); + columns[COLUMN_FILENAME] = Text::toT(sr->getUtf8() ? sr->getFileName() : Text::acpToUtf8(sr->getFileName())); + columns[COLUMN_PATH] = Text::toT(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile())); + columns[COLUMN_TYPE] = TSTRING(DIRECTORY); if(sr->getSize() > 0) { - size = Text::toT(Util::formatBytes(sr->getSize())); - exactSize = Text::toT(Util::formatExactSize(sr->getSize())); + columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(sr->getSize())); + columns[COLUMN_EXACT_SIZE] = Text::toT(Util::formatExactSize(sr->getSize())); } } - nick = WinUtil::getNicks(sr->getUser()); - connection = Text::toT(ClientManager::getInstance()->getConnection(sr->getUser()->getCID())); - hubName = Text::toT(sr->getHubName()); - slots = Text::toT(sr->getSlotString()); - ip = Text::toT(sr->getIP()); - if (!ip.empty()) { + columns[COLUMN_NICK] = WinUtil::getNicks(sr->getUser()); + columns[COLUMN_CONNECTION] = Text::toT(ClientManager::getInstance()->getConnection(sr->getUser()->getCID())); + columns[COLUMN_HUB] = Text::toT(sr->getHubName()); + columns[COLUMN_SLOTS] = Text::toT(sr->getSlotString()); + columns[COLUMN_IP] = Text::toT(sr->getIP()); + if (!columns[COLUMN_IP].empty()) { // Only attempt to grab a country mapping if we actually have an IP address tstring tmpCountry = Text::toT(Util::getIpCountry(sr->getIP())); if(!tmpCountry.empty()) - ip = tmpCountry + _T(" (") + ip + _T(")"); + columns[COLUMN_IP] = tmpCountry + _T(" (") + columns[COLUMN_IP] + _T(")"); } - if(sr->getTTH() != NULL) - setTTH(Text::toT(sr->getTTH()->toBase32())); + if(sr->getTTH() != NULL) { + columns[COLUMN_TTH] = Text::toT(sr->getTTH()->toBase32()); + } + columns[COLUMN_CID] = Text::toT(sr->getUser()->getCID().toBase32()); + } /** Modified: dcplusplus/trunk/windows/SearchFrm.h =================================================================== --- dcplusplus/trunk/windows/SearchFrm.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/SearchFrm.h 2006-04-30 11:09:50 UTC (rev 599) @@ -232,13 +232,12 @@ COLUMN_EXACT_SIZE, COLUMN_IP, COLUMN_TTH, + COLUMN_CID, COLUMN_LAST }; class SearchInfo : public UserInfoBase { public: - SearchResult* sr; - SearchInfo(SearchResult* aSR) : UserInfoBase(aSR->getUser()), sr(aSR) { sr->incRef(); update(); } @@ -278,29 +277,14 @@ tstring tth; }; - const tstring& getText(int col) const { - switch(col) { - case COLUMN_NICK: return nick; - case COLUMN_FILENAME: return fileName; - case COLUMN_TYPE: return type; - case COLUMN_SIZE: return size; - case COLUMN_PATH: return path; - case COLUMN_SLOTS: return slots; - case COLUMN_CONNECTION: return connection; - case COLUMN_HUB: return hubName; - case COLUMN_EXACT_SIZE: return exactSize; - case COLUMN_IP: return ip; - case COLUMN_TTH: return tth; - default: return Util::emptyStringT; - } - } + const tstring& getText(int col) const { return columns[col]; } static int compareItems(SearchInfo* a, SearchInfo* b, int col) { switch(col) { case COLUMN_TYPE: if(a->sr->getType() == b->sr->getType()) - return lstrcmpi(a->type.c_str(), b->type.c_str()); + return lstrcmpi(a->columns[COLUMN_TYPE].c_str(), b->columns[COLUMN_TYPE].c_str()); else return(a->sr->getType() == SearchResult::TYPE_DIRECTORY) ? -1 : 1; case COLUMN_SLOTS: @@ -316,17 +300,8 @@ void update(); - GETSET(tstring, nick, Nick); - GETSET(tstring, connection, Connection) - GETSET(tstring, fileName, FileName); - GETSET(tstring, path, Path); - GETSET(tstring, type, Type); - GETSET(tstring, hubName, HubName); - GETSET(tstring, size, Size); - GETSET(tstring, slots, Slots); - GETSET(tstring, exactSize, ExactSize); - GETSET(tstring, ip, IP); - GETSET(tstring, tth, TTH); + SearchResult* sr; + tstring columns[COLUMN_LAST]; }; struct HubInfo : public FastAlloc<HubInfo> { Modified: dcplusplus/trunk/windows/TransferView.cpp =================================================================== --- dcplusplus/trunk/windows/TransferView.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/TransferView.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -28,12 +28,12 @@ #include "WinUtil.h" #include "TransferView.h" -int TransferView::columnIndexes[] = { COLUMN_USER, COLUMN_HUB, COLUMN_STATUS, COLUMN_TIMELEFT, COLUMN_SPEED, COLUMN_FILE, COLUMN_SIZE, COLUMN_PATH, COLUMN_IP, COLUMN_RATIO }; -int TransferView::columnSizes[] = { 150, 100, 250, 75, 75, 175, 100, 200, 50, 75 }; +int TransferView::columnIndexes[] = { COLUMN_USER, COLUMN_HUB, COLUMN_STATUS, COLUMN_TIMELEFT, COLUMN_SPEED, COLUMN_FILE, COLUMN_SIZE, COLUMN_PATH, COLUMN_IP, COLUMN_RATIO, COLUMN_CID }; +int TransferView::columnSizes[] = { 150, 100, 250, 75, 75, 175, 100, 200, 50, 75, 125 }; static ResourceManager::Strings columnNames[] = { ResourceManager::USER, ResourceManager::HUB, ResourceManager::STATUS, ResourceManager::TIME_LEFT, ResourceManager::SPEED, ResourceManager::FILENAME, ResourceManager::SIZE, ResourceManager::PATH, -ResourceManager::IP_BARE, ResourceManager::RATIO}; +ResourceManager::IP_BARE, ResourceManager::RATIO, ResourceManager::CID, }; TransferView::~TransferView() { arrows.Destroy(); @@ -344,6 +344,7 @@ { columns[COLUMN_USER] = WinUtil::getNicks(u); columns[COLUMN_HUB] = WinUtil::getHubNames(u).first; + columns[COLUMN_CID] = Text::toT(u->getCID().toBase32()); } void TransferView::ItemInfo::update(const UpdateInfo& ui) { Modified: dcplusplus/trunk/windows/TransferView.h =================================================================== --- dcplusplus/trunk/windows/TransferView.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/TransferView.h 2006-04-30 11:09:50 UTC (rev 599) @@ -133,6 +133,7 @@ COLUMN_PATH, COLUMN_IP, COLUMN_RATIO, + COLUMN_CID, COLUMN_LAST }; @@ -215,7 +216,7 @@ MASK_TIMELEFT = 1 << 7, MASK_IP = 1 << 8, MASK_STATUS_STRING = 1 << 9, - MASK_COUNTRY = 1 << 10 + MASK_COUNTRY = 1 << 10, }; bool operator==(const ItemInfo& ii) { return download == ii.download && user == ii.user; } Modified: dcplusplus/trunk/windows/UsersFrame.cpp =================================================================== --- dcplusplus/trunk/windows/UsersFrame.cpp 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/UsersFrame.cpp 2006-04-30 11:09:50 UTC (rev 599) @@ -29,9 +29,9 @@ #include "HubFrame.h" -int UsersFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_HUB, COLUMN_SEEN, COLUMN_DESCRIPTION }; -int UsersFrame::columnSizes[] = { 200, 300, 150, 200 }; -static ResourceManager::Strings columnNames[] = { ResourceManager::AUTO_GRANT, ResourceManager::LAST_HUB, ResourceManager::LAST_SEEN, ResourceManager::DESCRIPTION }; +int UsersFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_HUB, COLUMN_SEEN, COLUMN_DESCRIPTION, COLUMN_CID }; +int UsersFrame::columnSizes[] = { 200, 300, 150, 200, 125 }; +static ResourceManager::Strings columnNames[] = { ResourceManager::AUTO_GRANT, ResourceManager::LAST_HUB, ResourceManager::LAST_SEEN, ResourceManager::DESCRIPTION, ResourceManager::CID }; LRESULT UsersFrame::onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { @@ -216,6 +216,7 @@ columns[COLUMN_HUB] = user->isOnline() ? WinUtil::getHubNames(u.getUser()).first : Text::toT(u.getUrl()); columns[COLUMN_SEEN] = user->isOnline() ? TSTRING(ONLINE) : Text::toT(Util::formatTime("%Y-%m-%d %H:%M", u.getLastSeen())); columns[COLUMN_DESCRIPTION] = Text::toT(u.getDescription()); + columns[COLUMN_CID] = Text::toT(u.getUser()->getCID().toBase32()); } LRESULT UsersFrame::onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { Modified: dcplusplus/trunk/windows/UsersFrame.h =================================================================== --- dcplusplus/trunk/windows/UsersFrame.h 2006-04-30 09:27:55 UTC (rev 598) +++ dcplusplus/trunk/windows/UsersFrame.h 2006-04-30 11:09:50 UTC (rev 599) @@ -85,6 +85,7 @@ COLUMN_HUB, COLUMN_SEEN, COLUMN_DESCRIPTION, + COLUMN_CID, COLUMN_LAST }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-04-30 09:34:36
|
Revision: 598 Author: arnetheduck Date: 2006-04-30 02:27:55 -0700 (Sun, 30 Apr 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=598&view=rev Log Message: ----------- New copyright, fixed some annoying crash bugs Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/ADLSearch.cpp dcplusplus/trunk/client/ADLSearch.h dcplusplus/trunk/client/AdcCommand.cpp dcplusplus/trunk/client/AdcCommand.h dcplusplus/trunk/client/AdcHub.cpp dcplusplus/trunk/client/AdcHub.h dcplusplus/trunk/client/BZUtils.cpp dcplusplus/trunk/client/BZUtils.h dcplusplus/trunk/client/BitInputStream.h dcplusplus/trunk/client/BitOutputStream.h dcplusplus/trunk/client/BloomFilter.h dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/BufferedSocket.h dcplusplus/trunk/client/CID.h dcplusplus/trunk/client/Client.cpp dcplusplus/trunk/client/Client.h dcplusplus/trunk/client/ClientManager.cpp dcplusplus/trunk/client/ClientManager.h dcplusplus/trunk/client/ClientManagerListener.h dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/ConnectionManager.h dcplusplus/trunk/client/ConnectionManagerListener.h dcplusplus/trunk/client/CriticalSection.h dcplusplus/trunk/client/CryptoManager.cpp dcplusplus/trunk/client/CryptoManager.h dcplusplus/trunk/client/DCPlusPlus.cpp dcplusplus/trunk/client/DCPlusPlus.h dcplusplus/trunk/client/DirectoryListing.cpp dcplusplus/trunk/client/DirectoryListing.h dcplusplus/trunk/client/DownloadManager.cpp dcplusplus/trunk/client/DownloadManager.h dcplusplus/trunk/client/Encoder.cpp dcplusplus/trunk/client/Encoder.h dcplusplus/trunk/client/Exception.h dcplusplus/trunk/client/FastAlloc.h dcplusplus/trunk/client/FavoriteManager.cpp dcplusplus/trunk/client/FavoriteManager.h dcplusplus/trunk/client/FavoriteUser.h dcplusplus/trunk/client/File.h dcplusplus/trunk/client/FilteredFile.h dcplusplus/trunk/client/FinishedManager.cpp dcplusplus/trunk/client/FinishedManager.h dcplusplus/trunk/client/HashManager.cpp dcplusplus/trunk/client/HashManager.h dcplusplus/trunk/client/HashValue.h dcplusplus/trunk/client/HttpConnection.cpp dcplusplus/trunk/client/HttpConnection.h dcplusplus/trunk/client/LogManager.cpp dcplusplus/trunk/client/LogManager.h dcplusplus/trunk/client/MerkleCheckOutputStream.h dcplusplus/trunk/client/MerkleTree.h dcplusplus/trunk/client/NmdcHub.h dcplusplus/trunk/client/Pointer.h dcplusplus/trunk/client/QueueItem.h dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/QueueManager.h dcplusplus/trunk/client/QueueManagerListener.h dcplusplus/trunk/client/ResourceManager.cpp dcplusplus/trunk/client/ResourceManager.h dcplusplus/trunk/client/SFVReader.cpp dcplusplus/trunk/client/SFVReader.h dcplusplus/trunk/client/SSLSocket.cpp dcplusplus/trunk/client/SSLSocket.h dcplusplus/trunk/client/SearchManager.cpp dcplusplus/trunk/client/SearchManager.h dcplusplus/trunk/client/SearchManagerListener.h dcplusplus/trunk/client/Semaphore.h dcplusplus/trunk/client/ServerSocket.cpp dcplusplus/trunk/client/ServerSocket.h dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/SettingsManager.h dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/client/ShareManager.h dcplusplus/trunk/client/SimpleXML.cpp dcplusplus/trunk/client/SimpleXML.h dcplusplus/trunk/client/Singleton.h dcplusplus/trunk/client/Socket.cpp dcplusplus/trunk/client/Socket.h dcplusplus/trunk/client/Speaker.h dcplusplus/trunk/client/Streams.h dcplusplus/trunk/client/StringSearch.h dcplusplus/trunk/client/StringTokenizer.cpp dcplusplus/trunk/client/StringTokenizer.h dcplusplus/trunk/client/Text.cpp dcplusplus/trunk/client/Text.h dcplusplus/trunk/client/Thread.cpp dcplusplus/trunk/client/Thread.h dcplusplus/trunk/client/TigerHash.cpp dcplusplus/trunk/client/TigerHash.h dcplusplus/trunk/client/TimerManager.cpp dcplusplus/trunk/client/TimerManager.h dcplusplus/trunk/client/UploadManager.cpp dcplusplus/trunk/client/UploadManager.h dcplusplus/trunk/client/User.cpp dcplusplus/trunk/client/User.h dcplusplus/trunk/client/UserCommand.h dcplusplus/trunk/client/UserConnection.cpp dcplusplus/trunk/client/UserConnection.h dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/client/Util.h dcplusplus/trunk/client/ZUtils.cpp dcplusplus/trunk/client/ZUtils.h dcplusplus/trunk/client/config.h dcplusplus/trunk/client/stdinc.cpp dcplusplus/trunk/client/stdinc.h dcplusplus/trunk/help/faq_upnp.html dcplusplus/trunk/windows/ADLSProperties.cpp dcplusplus/trunk/windows/ADLSProperties.h dcplusplus/trunk/windows/ADLSearchFrame.cpp dcplusplus/trunk/windows/ADLSearchFrame.h dcplusplus/trunk/windows/AboutDlg.h dcplusplus/trunk/windows/Advanced3Page.cpp dcplusplus/trunk/windows/Advanced3Page.h dcplusplus/trunk/windows/AdvancedPage.cpp dcplusplus/trunk/windows/AdvancedPage.h dcplusplus/trunk/windows/Appearance2Page.cpp dcplusplus/trunk/windows/Appearance2Page.h dcplusplus/trunk/windows/AppearancePage.cpp dcplusplus/trunk/windows/AppearancePage.h dcplusplus/trunk/windows/CertificatesPage.cpp dcplusplus/trunk/windows/CertificatesPage.h dcplusplus/trunk/windows/CommandDlg.cpp dcplusplus/trunk/windows/CommandDlg.h dcplusplus/trunk/windows/DirectoryListingFrm.cpp dcplusplus/trunk/windows/DirectoryListingFrm.h dcplusplus/trunk/windows/DownloadPage.cpp dcplusplus/trunk/windows/DownloadPage.h dcplusplus/trunk/windows/ExListViewCtrl.cpp dcplusplus/trunk/windows/ExListViewCtrl.h dcplusplus/trunk/windows/FavHubProperties.cpp dcplusplus/trunk/windows/FavHubProperties.h dcplusplus/trunk/windows/FavoriteDirsPage.cpp dcplusplus/trunk/windows/FavoriteDirsPage.h dcplusplus/trunk/windows/FavoritesFrm.cpp dcplusplus/trunk/windows/FavoritesFrm.h dcplusplus/trunk/windows/FinishedFrame.h dcplusplus/trunk/windows/FinishedFrameBase.h dcplusplus/trunk/windows/FinishedULFrame.h dcplusplus/trunk/windows/FlatTabCtrl.h dcplusplus/trunk/windows/GeneralPage.cpp dcplusplus/trunk/windows/GeneralPage.h dcplusplus/trunk/windows/HashProgressDlg.h dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/LineDlg.h dcplusplus/trunk/windows/ListViewArrows.h dcplusplus/trunk/windows/LogPage.cpp dcplusplus/trunk/windows/LogPage.h dcplusplus/trunk/windows/MagnetDlg.h dcplusplus/trunk/windows/MainFrm.cpp dcplusplus/trunk/windows/MainFrm.h dcplusplus/trunk/windows/NetworkPage.cpp dcplusplus/trunk/windows/NetworkPage.h dcplusplus/trunk/windows/NotepadFrame.cpp dcplusplus/trunk/windows/NotepadFrame.h dcplusplus/trunk/windows/PrivateFrame.cpp dcplusplus/trunk/windows/PrivateFrame.h dcplusplus/trunk/windows/PropPage.cpp dcplusplus/trunk/windows/PropPage.h dcplusplus/trunk/windows/PropertiesDlg.cpp dcplusplus/trunk/windows/PropertiesDlg.h dcplusplus/trunk/windows/PublicHubsFrm.cpp dcplusplus/trunk/windows/PublicHubsFrm.h dcplusplus/trunk/windows/PublicHubsListDlg.h dcplusplus/trunk/windows/QueueFrame.cpp dcplusplus/trunk/windows/QueueFrame.h dcplusplus/trunk/windows/QueuePage.cpp dcplusplus/trunk/windows/QueuePage.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/SearchFrm.h dcplusplus/trunk/windows/SingleInstance.h dcplusplus/trunk/windows/SpyFrame.cpp dcplusplus/trunk/windows/SpyFrame.h dcplusplus/trunk/windows/StatsFrame.cpp dcplusplus/trunk/windows/StatsFrame.h dcplusplus/trunk/windows/SystemFrame.cpp dcplusplus/trunk/windows/SystemFrame.h dcplusplus/trunk/windows/TextFrame.cpp dcplusplus/trunk/windows/TextFrame.h dcplusplus/trunk/windows/TransferView.cpp dcplusplus/trunk/windows/TransferView.h dcplusplus/trunk/windows/TreePropertySheet.cpp dcplusplus/trunk/windows/TreePropertySheet.h dcplusplus/trunk/windows/TypedListViewCtrl.h dcplusplus/trunk/windows/UCHandler.h dcplusplus/trunk/windows/UCPage.cpp dcplusplus/trunk/windows/UCPage.h dcplusplus/trunk/windows/UPnP.cpp dcplusplus/trunk/windows/UPnP.h dcplusplus/trunk/windows/UploadPage.cpp dcplusplus/trunk/windows/UploadPage.h dcplusplus/trunk/windows/UsersFrame.cpp dcplusplus/trunk/windows/UsersFrame.h dcplusplus/trunk/windows/WaitingUsersFrame.cpp dcplusplus/trunk/windows/WaitingUsersFrame.h dcplusplus/trunk/windows/WinUtil.cpp dcplusplus/trunk/windows/WinUtil.h dcplusplus/trunk/windows/WindowsPage.cpp dcplusplus/trunk/windows/WindowsPage.h dcplusplus/trunk/windows/main.cpp dcplusplus/trunk/windows/stdafx.cpp dcplusplus/trunk/windows/stdafx.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/changelog.txt 2006-04-30 09:27:55 UTC (rev 598) @@ -1,4 +1,11 @@ --- 0.689 2006-04-01 -- +-- -- +* Small linux / old gcc fixes (thanks jens oknelid) +* Fixed an issue where client could be crashed from remote +* Fixed an issue bad nicks could cause directories to be created in log / file list download folder +* Changed autodrop default to 2 for fewer unexpected autodrops (thanks paka) + + +-- 0.689 2006-04-01 -- * Fixed displaying of available bytes when user list is off * Fixed a potential crash when not showing user list * Fixed 100% CPU bug on upload Modified: dcplusplus/trunk/client/ADLSearch.cpp =================================================================== --- dcplusplus/trunk/client/ADLSearch.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ADLSearch.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ADLSearch.h =================================================================== --- dcplusplus/trunk/client/ADLSearch.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ADLSearch.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,7 +56,7 @@ stringSearchList.clear(); // Replace parameters such as %[nick] - string stringParams = Util::formatParams(searchString, params); + string stringParams = Util::formatParams(searchString, params, false); // Split into substrings StringTokenizer<string> st(stringParams, ' '); Modified: dcplusplus/trunk/client/AdcCommand.cpp =================================================================== --- dcplusplus/trunk/client/AdcCommand.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/AdcCommand.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/AdcCommand.h =================================================================== --- dcplusplus/trunk/client/AdcCommand.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/AdcCommand.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/AdcHub.h =================================================================== --- dcplusplus/trunk/client/AdcHub.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/AdcHub.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BZUtils.cpp =================================================================== --- dcplusplus/trunk/client/BZUtils.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BZUtils.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BZUtils.h =================================================================== --- dcplusplus/trunk/client/BZUtils.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BZUtils.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BitInputStream.h =================================================================== --- dcplusplus/trunk/client/BitInputStream.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BitInputStream.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BitOutputStream.h =================================================================== --- dcplusplus/trunk/client/BitOutputStream.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BitOutputStream.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BloomFilter.h =================================================================== --- dcplusplus/trunk/client/BloomFilter.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BloomFilter.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/BufferedSocket.h =================================================================== --- dcplusplus/trunk/client/BufferedSocket.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/BufferedSocket.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/CID.h =================================================================== --- dcplusplus/trunk/client/CID.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/CID.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Client.cpp =================================================================== --- dcplusplus/trunk/client/Client.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Client.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Client.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -391,7 +391,7 @@ ou.getClient().getHubIdentity().getParams(params, "hub", false); ou.getClient().getMyIdentity().getParams(params, "my", compatibility); ou.getClient().escapeParams(params); - ou.getClient().sendUserCmd(Util::formatParams(uc.getCommand(), params)); + ou.getClient().sendUserCmd(Util::formatParams(uc.getCommand(), params, false)); } void ClientManager::on(AdcSearch, Client*, const AdcCommand& adc, const CID& from) throw() { Modified: dcplusplus/trunk/client/ClientManager.h =================================================================== --- dcplusplus/trunk/client/ClientManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ClientManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ClientManagerListener.h =================================================================== --- dcplusplus/trunk/client/ClientManagerListener.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ClientManagerListener.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -691,8 +691,9 @@ } else if(*i == UserConnection::FEATURE_TTHL) { conn->setFlag(UserConnection::FLAG_SUPPORTS_TTHL); } else if(*i == UserConnection::FEATURE_TTHF) { - conn->setFlag(UserConnection::FLAG_SUPPORTS_TTHF); - conn->getUser()->setFlag(User::TTH_GET); + conn->setFlag(UserConnection::FLAG_SUPPORTS_TTHF); + if(conn->getUser()) + conn->getUser()->setFlag(User::TTH_GET); } } } Modified: dcplusplus/trunk/client/ConnectionManager.h =================================================================== --- dcplusplus/trunk/client/ConnectionManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ConnectionManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ConnectionManagerListener.h =================================================================== --- dcplusplus/trunk/client/ConnectionManagerListener.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ConnectionManagerListener.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/CriticalSection.h =================================================================== --- dcplusplus/trunk/client/CriticalSection.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/CriticalSection.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/CryptoManager.cpp =================================================================== --- dcplusplus/trunk/client/CryptoManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/CryptoManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/CryptoManager.h =================================================================== --- dcplusplus/trunk/client/CryptoManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/CryptoManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DCPlusPlus.cpp =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DCPlusPlus.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DCPlusPlus.h =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DCPlusPlus.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DirectoryListing.cpp =================================================================== --- dcplusplus/trunk/client/DirectoryListing.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DirectoryListing.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DirectoryListing.h =================================================================== --- dcplusplus/trunk/client/DirectoryListing.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DirectoryListing.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DownloadManager.cpp =================================================================== --- dcplusplus/trunk/client/DownloadManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DownloadManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/DownloadManager.h =================================================================== --- dcplusplus/trunk/client/DownloadManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/DownloadManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Encoder.cpp =================================================================== --- dcplusplus/trunk/client/Encoder.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Encoder.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Encoder.h =================================================================== --- dcplusplus/trunk/client/Encoder.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Encoder.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Exception.h =================================================================== --- dcplusplus/trunk/client/Exception.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Exception.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FastAlloc.h =================================================================== --- dcplusplus/trunk/client/FastAlloc.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FastAlloc.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FavoriteManager.cpp =================================================================== --- dcplusplus/trunk/client/FavoriteManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FavoriteManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FavoriteManager.h =================================================================== --- dcplusplus/trunk/client/FavoriteManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FavoriteManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FavoriteUser.h =================================================================== --- dcplusplus/trunk/client/FavoriteUser.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FavoriteUser.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/File.h =================================================================== --- dcplusplus/trunk/client/File.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/File.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FilteredFile.h =================================================================== --- dcplusplus/trunk/client/FilteredFile.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FilteredFile.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FinishedManager.cpp =================================================================== --- dcplusplus/trunk/client/FinishedManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FinishedManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/FinishedManager.h =================================================================== --- dcplusplus/trunk/client/FinishedManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/FinishedManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/HashManager.cpp =================================================================== --- dcplusplus/trunk/client/HashManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/HashManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #define HASH_FILE_VERSION_STRING "2" static const u_int32_t HASH_FILE_VERSION=2; +const int64_t HashManager::MIN_BLOCK_SIZE = 64*1024; bool HashManager::checkTTH(const string& aFileName, int64_t aSize, u_int32_t aTimeStamp) { Lock l(cs); Modified: dcplusplus/trunk/client/HashManager.h =================================================================== --- dcplusplus/trunk/client/HashManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/HashManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +55,7 @@ public: /** We don't keep leaves for blocks smaller than this... */ - static const int64_t MIN_BLOCK_SIZE = 64*1024; + static const int64_t MIN_BLOCK_SIZE; HashManager() { TimerManager::getInstance()->addListener(this); Modified: dcplusplus/trunk/client/HashValue.h =================================================================== --- dcplusplus/trunk/client/HashValue.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/HashValue.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/HttpConnection.cpp =================================================================== --- dcplusplus/trunk/client/HttpConnection.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/HttpConnection.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/HttpConnection.h =================================================================== --- dcplusplus/trunk/client/HttpConnection.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/HttpConnection.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/LogManager.cpp =================================================================== --- dcplusplus/trunk/client/LogManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/LogManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/LogManager.h =================================================================== --- dcplusplus/trunk/client/LogManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/LogManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,8 +47,8 @@ string path = SETTING(LOG_DIRECTORY); string msg; - path += Util::formatParams(getSetting(area, FILE), params); - msg = Util::formatParams(getSetting(area, FORMAT), params); + path += Util::formatParams(getSetting(area, FILE), params, true); + msg = Util::formatParams(getSetting(area, FORMAT), params, false); log(path, msg); } Modified: dcplusplus/trunk/client/MerkleCheckOutputStream.h =================================================================== --- dcplusplus/trunk/client/MerkleCheckOutputStream.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/MerkleCheckOutputStream.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/MerkleTree.h =================================================================== --- dcplusplus/trunk/client/MerkleTree.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/MerkleTree.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/NmdcHub.h =================================================================== --- dcplusplus/trunk/client/NmdcHub.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/NmdcHub.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Pointer.h =================================================================== --- dcplusplus/trunk/client/Pointer.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Pointer.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/QueueItem.h =================================================================== --- dcplusplus/trunk/client/QueueItem.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/QueueItem.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -81,7 +81,7 @@ sm["targetdrive"] = target.substr(0, 3); else sm["targetdrive"] = Util::getConfigPath().substr(0, 3); - setTempTarget(Util::formatParams(SETTING(TEMP_DOWNLOAD_DIRECTORY), sm) + getTempName(getTargetFileName(), getTTH())); + setTempTarget(Util::formatParams(SETTING(TEMP_DOWNLOAD_DIRECTORY), sm, true) + getTempName(getTargetFileName(), getTTH())); #else //_WIN32 setTempTarget(SETTING(TEMP_DOWNLOAD_DIRECTORY) + getTempName(getTargetFileName(), getTTH())); #endif //_WIN32 Modified: dcplusplus/trunk/client/QueueManager.h =================================================================== --- dcplusplus/trunk/client/QueueManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/QueueManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/QueueManagerListener.h =================================================================== --- dcplusplus/trunk/client/QueueManagerListener.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/QueueManagerListener.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ResourceManager.cpp =================================================================== --- dcplusplus/trunk/client/ResourceManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ResourceManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ResourceManager.h =================================================================== --- dcplusplus/trunk/client/ResourceManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ResourceManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SFVReader.cpp =================================================================== --- dcplusplus/trunk/client/SFVReader.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SFVReader.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SFVReader.h =================================================================== --- dcplusplus/trunk/client/SFVReader.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SFVReader.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SSLSocket.cpp =================================================================== --- dcplusplus/trunk/client/SSLSocket.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SSLSocket.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SSLSocket.h =================================================================== --- dcplusplus/trunk/client/SSLSocket.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SSLSocket.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SearchManager.cpp =================================================================== --- dcplusplus/trunk/client/SearchManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SearchManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SearchManager.h =================================================================== --- dcplusplus/trunk/client/SearchManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SearchManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SearchManagerListener.h =================================================================== --- dcplusplus/trunk/client/SearchManagerListener.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SearchManagerListener.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Semaphore.h =================================================================== --- dcplusplus/trunk/client/Semaphore.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Semaphore.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ServerSocket.cpp =================================================================== --- dcplusplus/trunk/client/ServerSocket.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ServerSocket.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ServerSocket.h =================================================================== --- dcplusplus/trunk/client/ServerSocket.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ServerSocket.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -220,7 +220,7 @@ setDefault(AUTODROP_INTERVAL, 10); setDefault(AUTODROP_ELAPSED, 15); setDefault(AUTODROP_INACTIVITY, 10); - setDefault(AUTODROP_MINSOURCES, 1); + setDefault(AUTODROP_MINSOURCES, 2); setDefault(AUTODROP_FILESIZE, 0); setDefault(AUTODROP_ALL, false); setDefault(AUTODROP_FILELISTS, false); Modified: dcplusplus/trunk/client/SettingsManager.h =================================================================== --- dcplusplus/trunk/client/SettingsManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SettingsManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/ShareManager.h =================================================================== --- dcplusplus/trunk/client/ShareManager.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/ShareManager.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SimpleXML.cpp =================================================================== --- dcplusplus/trunk/client/SimpleXML.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SimpleXML.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/SimpleXML.h =================================================================== --- dcplusplus/trunk/client/SimpleXML.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/SimpleXML.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Singleton.h =================================================================== --- dcplusplus/trunk/client/Singleton.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Singleton.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Socket.cpp 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Socket.h =================================================================== --- dcplusplus/trunk/client/Socket.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Socket.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -154,9 +154,9 @@ void setBlocking(bool block) throw() { int flags = fcntl(sock, F_GETFL, 0); if(block) { + fcntl(sock, F_SETFL, flags & (~O_NONBLOCK)); + } else { fcntl(sock, F_SETFL, flags | O_NONBLOCK); - } else { - fcntl(sock, F_SETFL, flags & (~O_NONBLOCK)); } blocking = block; } @@ -233,7 +233,7 @@ static int check(int ret, bool blockOk = false) { if(ret == -1) { int error = getLastError(); - if(blockOk && (error == EWOULDBLOCK || error == ENOBUFS) ) { + if(blockOk && (error == EWOULDBLOCK || error == ENOBUFS || error == EINPROGRESS) ) { return -1; } else { throw SocketException(error); Modified: dcplusplus/trunk/client/Speaker.h =================================================================== --- dcplusplus/trunk/client/Speaker.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Speaker.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/Streams.h =================================================================== --- dcplusplus/trunk/client/Streams.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/Streams.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: dcplusplus/trunk/client/StringSearch.h =================================================================== --- dcplusplus/trunk/client/StringSearch.h 2006-04-01 18:26:49 UTC (rev 597) +++ dcplusplus/trunk/client/StringSearch.h 2006-04-30 09:27:55 UTC (rev 598) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C)... [truncated message content] |
From: <arn...@us...> - 2006-04-01 18:17:34
|
Revision: 596 Author: arnetheduck Date: 2006-04-01 10:17:13 -0800 (Sat, 01 Apr 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=596&view=rev Log Message: ----------- A few fixes for the new release Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/version.h dcplusplus/trunk/help/changelog.html dcplusplus/trunk/windows/DirectoryListingFrm.cpp dcplusplus/trunk/windows/DirectoryListingFrm.h dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/MainFrm.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-04-01 18:17:13 UTC (rev 596) @@ -933,8 +933,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,8,8 - PRODUCTVERSION 0,6,8,8 + FILEVERSION 0,6,8,9 + PRODUCTVERSION 0,6,8,9 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -951,12 +951,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 8, 8" + VALUE "FileVersion", "0, 6, 8, 9" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 8, 8" + VALUE "ProductVersion", "0, 6, 8, 9" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/Example.xml 2006-04-01 18:17:13 UTC (rev 596) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.688" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Author="arnetheduck" Version="0.689" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/changelog.txt 2006-04-01 18:17:13 UTC (rev 596) @@ -1,4 +1,10 @@ --- 0.688 2006-03-18 -- +-- 0.689 2006-04-01 -- +* Fixed displaying of available bytes when user list is off +* Fixed a potential crash when not showing user list +* Fixed 100% CPU bug on upload +* [bug 853] Fixed missing function in opencow + +-- 0.688 2006-03-18 -- * Fixed public hubs sorting (thanks pothead) * Fixed a ZPipe issue (thanks jove) * [bug 858] Fixed a 100% cpu / crash bug Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-04-01 18:17:13 UTC (rev 596) @@ -309,7 +309,7 @@ fire(BufferedSocketListener::BytesSent(), 0, written); } else if(written == -1) { - if(readPos < readBuf.size()) { + if(!readDone && readPos < readBuf.size()) { // Read a little since we're blocking anyway... size_t bytesRead = min(readBuf.size() - readPos, readBuf.size() / 2); size_t actual = file->read(&readBuf[readPos], bytesRead); @@ -324,9 +324,14 @@ readPos += actual; } } else { - int w = sock->wait(POLL_TIMEOUT, Socket::WAIT_WRITE | Socket::WAIT_READ); - if(w & Socket::WAIT_READ) { - threadRead(); + while(!disconnecting) { + int w = sock->wait(POLL_TIMEOUT, Socket::WAIT_WRITE | Socket::WAIT_READ); + if(w & Socket::WAIT_READ) { + threadRead(); + } + if(w & Socket::WAIT_WRITE) { + break; + } } } } Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-04-01 18:17:13 UTC (rev 596) @@ -399,7 +399,7 @@ if(BOOLSETTING(AUTO_SEARCH) && (aTick >= nextSearch) && (fileQueue.getSize() > 0)) { // We keep 30 recent searches to avoid duplicate searches - while((recent.size() > fileQueue.getSize()) || (recent.size() > 30)) { + while((recent.size() >= fileQueue.getSize()) || (recent.size() > 30)) { recent.erase(recent.begin()); } Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/client/version.h 2006-04-01 18:17:13 UTC (rev 596) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.688" -#define VERSIONFLOAT 0.688 +#define VERSIONSTRING "0.689" +#define VERSIONFLOAT 0.689 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/help/changelog.html 2006-04-01 18:17:13 UTC (rev 596) @@ -13,6 +13,14 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.689 <span style="color: gray;">(2006-04-01)</span></h2> +<ul> + <li>Fixed displaying of available bytes when user list is off</li> + <li>Fixed a potential crash when not showing user list</li> + <li>Fixed 100% CPU bug on upload</li> + <li>[bug 853] Fixed missing function in opencow</li> +</ul> + <h2>0.688 <span style="color: gray;">(2006-03-18)</span></h2> <ul> <li>Fixed public hubs sorting (thanks pothead)</li> Modified: dcplusplus/trunk/windows/DirectoryListingFrm.cpp =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-04-01 18:17:13 UTC (rev 596) @@ -339,6 +339,16 @@ } } +void DirectoryListingFrame::up() { + HTREEITEM t = ctrlTree.GetSelectedItem(); + if(t == NULL) + return; + t = ctrlTree.GetParentItem(t); + if(t == NULL) + return; + ctrlTree.SelectItem(t); +} + void DirectoryListingFrame::back() { if(history.size() > 1 && historyIndex > 1) { size_t n = min(historyIndex, history.size()) - 1; @@ -829,15 +839,13 @@ LRESULT DirectoryListingFrame::onKeyDown(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { NMLVKEYDOWN* kd = (NMLVKEYDOWN*) pnmh; if(kd->wVKey == VK_BACK) { - HTREEITEM cur = ctrlTree.GetSelectedItem(); - if(cur != NULL) - { - HTREEITEM parent = ctrlTree.GetParentItem(cur); - if(parent != NULL) - ctrlTree.SelectItem(parent); - } + up(); } else if(kd->wVKey == VK_TAB) { onTab(); + } else if(kd->wVKey == VK_LEFT && WinUtil::isAlt()) { + back(); + } else if(kd->wVKey == VK_RIGHT && WinUtil::isAlt()) { + forward(); } else if(kd->wVKey == VK_RETURN) { if(ctrlList.GetSelectedCount() == 1) { ItemInfo* ii = (ItemInfo*)ctrlList.GetItemData(ctrlList.GetNextItem(-1, LVNI_SELECTED)); Modified: dcplusplus/trunk/windows/DirectoryListingFrm.h =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.h 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/windows/DirectoryListingFrm.h 2006-04-01 18:17:13 UTC (rev 596) @@ -230,6 +230,7 @@ void updateStatus(); void initStatus(); void addHistory(const string& name); + void up(); void back(); void forward(); Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-04-01 18:17:13 UTC (rev 596) @@ -612,11 +612,11 @@ } void HubFrame::clearUserList() { + ctrlUsers.DeleteAllItems(); for(UserMapIter i = userMap.begin(); i != userMap.end(); ++i) { delete i->second; } userMap.clear(); - ctrlUsers.DeleteAllItems(); } void HubFrame::clearTaskList() { @@ -907,6 +907,14 @@ } } +LRESULT HubFrame::onFileReconnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { + client->disconnect(false); + clearUserList(); + clearTaskList(); + client->connect(); + return 0; +} + LRESULT HubFrame::onChar(UINT uMsg, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) { if(!complete.empty() && wParam != VK_TAB && uMsg == WM_KEYDOWN) complete.clear(); @@ -1037,6 +1045,7 @@ ctrlUsers.resort(); } else { showUsers = false; + ctrlUsers.DeleteAllItems(); } SettingsManager::getInstance()->set(SettingsManager::GET_USER_INFO, showUsers); Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/windows/HubFrame.h 2006-04-01 18:17:13 UTC (rev 596) @@ -56,6 +56,7 @@ NOTIFY_HANDLER(IDC_USERS, NM_DBLCLK, onDoubleClickUsers) NOTIFY_HANDLER(IDC_USERS, LVN_KEYDOWN, onKeyDownUsers) NOTIFY_HANDLER(IDC_USERS, NM_RETURN, onEnterUsers) + NOTIFY_HANDLER(IDC_USERS, LVN_ITEMCHANGED, onItemChanged) NOTIFY_CODE_HANDLER(TTN_GETDISPINFO, onGetToolTip) MESSAGE_HANDLER(WM_CLOSE, onClose) MESSAGE_HANDLER(WM_SETFOCUS, onSetFocus) @@ -65,7 +66,7 @@ MESSAGE_HANDLER(WM_CTLCOLORSTATIC, onCtlColor) MESSAGE_HANDLER(WM_CTLCOLOREDIT, onCtlColor) MESSAGE_HANDLER(FTM_CONTEXTMENU, onTabContextMenu) - COMMAND_ID_HANDLER(ID_FILE_RECONNECT, OnFileReconnect) + COMMAND_ID_HANDLER(ID_FILE_RECONNECT, onFileReconnect) COMMAND_ID_HANDLER(IDC_FOLLOW, onFollow) COMMAND_ID_HANDLER(IDC_SEND_MESSAGE, onSendMessage) COMMAND_ID_HANDLER(IDC_ADD_AS_FAVORITE, onAddAsFavorite) @@ -98,6 +99,7 @@ LRESULT onEnterUsers(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/); LRESULT onGetToolTip(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/); LRESULT onCtlColor(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/); + LRESULT onFileReconnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); void UpdateLayout(BOOL bResizeBars = TRUE); void addLine(const tstring& aLine); @@ -129,11 +131,8 @@ return 0; } - LRESULT OnFileReconnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { - client->disconnect(false); - clearUserList(); - clearTaskList(); - client->connect(); + LRESULT onItemChanged(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) { + updateStatusBar(); return 0; } @@ -150,7 +149,6 @@ public: TypedListViewCtrl<UserInfo, IDC_USERS>& getUserList() { return ctrlUsers; } private: - enum Speakers { UPDATE_USER_JOIN, UPDATE_USER, REMOVE_USER, ADD_CHAT_LINE, ADD_STATUS_LINE, ADD_SILENT_STATUS_LINE, SET_WINDOW_TITLE, GET_PASSWORD, PRIVATE_MESSAGE, STATS, CONNECTED, DISCONNECTED @@ -254,6 +252,11 @@ typedef FrameMap::iterator FrameIter; static FrameMap frames; + typedef vector<Task*> TaskList; + typedef TaskList::iterator TaskIter; + typedef HASH_MAP<User::Ptr, UserInfo*, User::HashFunction> UserMap; + typedef UserMap::iterator UserMapIter; + tstring redirect; bool timeStamps; bool showJoins; @@ -273,18 +276,21 @@ void operator()(UserInfo *ui) { available += ui->getIdentity().getBytesShared(); } + void operator()(UserMap::const_reference ui) { + available += ui.second->getIdentity().getBytesShared(); + } }; size_t getUserCount() const { size_t sel = ctrlUsers.GetSelectedCount(); - return sel > 1 ? sel : client->getUserCount(); + return sel > 1 ? sel : userMap.size(); } int64_t getAvailable() { if (ctrlUsers.GetSelectedCount() > 1) { return ctrlUsers.forEachSelectedT(CountAvailable()).available; } else - return ctrlUsers.forEachT(CountAvailable()).available; + return for_each(userMap.begin(), userMap.end(), CountAvailable()).available; } const tstring& getNick(const User::Ptr& u); @@ -311,11 +317,6 @@ TStringMap tabParams; bool tabMenuShown; - typedef vector<Task*> TaskList; - typedef TaskList::iterator TaskIter; - typedef HASH_MAP<User::Ptr, UserInfo*, User::HashFunction> UserMap; - typedef UserMap::iterator UserMapIter; - UserMap userMap; TaskList taskList; CriticalSection taskCS; Modified: dcplusplus/trunk/windows/MainFrm.cpp =================================================================== --- dcplusplus/trunk/windows/MainFrm.cpp 2006-03-18 20:12:05 UTC (rev 595) +++ dcplusplus/trunk/windows/MainFrm.cpp 2006-04-01 18:17:13 UTC (rev 596) @@ -103,7 +103,9 @@ WinUtil::init(m_hWnd); - trayMessage = RegisterWindowMessage(_T("TaskbarCreated")); + //trayMessage = RegisterWindowMessage(_T("TaskbarCreated")); + // Use ASCII version as opencow doesn't support the wide one... + trayMessage = RegisterWindowMessageA("TaskbarCreated"); TimerManager::getInstance()->start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-18 20:12:26
|
Revision: 595 Author: arnetheduck Date: 2006-03-18 12:12:05 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=595&view=rev Log Message: ----------- 0.688 Added Paths: ----------- dcplusplus/tags/dcplusplus-0.688/ dcplusplus/tags/dcplusplus-0.688/changelog.txt dcplusplus/tags/dcplusplus-0.688/client/Client.h dcplusplus/tags/dcplusplus-0.688/client/ClientManager.cpp dcplusplus/tags/dcplusplus-0.688/client/File.h dcplusplus/tags/dcplusplus-0.688/client/version.h dcplusplus/tags/dcplusplus-0.688/help/changelog.html Removed Paths: ------------- dcplusplus/tags/dcplusplus-0.688/changelog.txt dcplusplus/tags/dcplusplus-0.688/client/Client.h dcplusplus/tags/dcplusplus-0.688/client/ClientManager.cpp dcplusplus/tags/dcplusplus-0.688/client/File.h dcplusplus/tags/dcplusplus-0.688/client/version.h dcplusplus/tags/dcplusplus-0.688/help/changelog.html Copied: dcplusplus/tags/dcplusplus-0.688 (from rev 592, dcplusplus/trunk) Deleted: dcplusplus/tags/dcplusplus-0.688/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-18 19:34:20 UTC (rev 592) +++ dcplusplus/tags/dcplusplus-0.688/changelog.txt 2006-03-18 20:12:05 UTC (rev 595) @@ -1,1894 +0,0 @@ --- 0.688 2006-02-26 -- -* Fixed public hubs sorting (thanks pothead) -* Fixed a ZPipe issue (thanks jove) -* [bug 858] Fixed a 100% cpu / crash bug -* [bug 872] Fixed a pm issue hopefully -* [bug 812] Fixed pm's being sent to bots -* Files with invalid crc-32, as per their sfv file, are no longer shared -* [bug 873] Added connect to hub option (thanks joakim tosteberg) -* Fixed an issue with linux file reading (thanks bart vullings and steven) -* Added back/forward mouse/keyboard navigation to directory listing frame - --- 0.687 2006-02-26 -- -* Fixed XML file list generation for invalid filenames from other os's -* Fixed a rare refresh crash -* CID is now shown if no nick name is currently available for a user -* Fixed another crash when loading file lists -* Played some more with bufferedsocket performance -* Fixed some VS 2005 issues (thanks trem) -* Installer now removes old unicows library -* Updated to yaSSL 1.1.5 -* Added possiblity to sort transfer view by all downloads first (thanks guitarm) -* Some cleanup for frame creation (thanks martin) -* Fixed some translation strings (thanks fleetcommand) -* Fixed some finished transfers frames issues (thanks trem) -* /pm and and a few other things work without user list in hub frame -* Added support for the ZPipe extension (test version) (thanks jove) -* Moved to subversion, CVS will no longer be maintained - --- 0.686 2006-02-13 -- -* Fixed active search (oops) -* Fixed a crash when clicking on dchub links - --- 0.685 2006-02-12 -- -* Fixed "browse list" being available for NMDC users -* [ADC] Removed obsolete CI field -* Fixed missing upload progress -* [bug 89] Readded dynamic compression disabling -* Added filelist download speed to filelist browser status bar -* Added advanced hublist filter (thanks trem) -* [bug 579] Fixed 0-byte files not being created if directory doesn't exist -* [bug 804] Cleaned up project files (thanks pothead) -* Socket buffer size = 0 now means use system default -* [bug 789] Fixed wrong nick being copied (thanks ullner) -* [bug 794] [ADC] Fixed automatic reconnect (thanks ullner) -* [bug 806] Fixed description for favorite hubs (thanks ullner) -* Updated to latest ADC specs, this will break 0.68/0.681/0.6811 queue sources and fav users (for NMDC as well) -* Fixed a bufferedsocket crash -* [ADC] Fixed quitting user processing (thanks ullner) -* Clarified upload speed setting (thanks pothead) -* Manual away setting no longer cleared when un-minimizing (thanks pothead) -* Search result automatching waits with match until file list is downloaded if auto-matching enabled -* Slight performance improvement when sending files -* Fixed an issue with nick names disappearing from hub -* Added customizable maximum user count when autosearching -* Changed to open source version unicows for win9x users, perhaps this one will work better for you (see it as a - last attempt; if it doesn't work, w9x support will be phased out completely unless someone else solves the win9x - issues) -* [bug 774] Fixed invalid description being sent if hub modifies it -* [bug 818] Fixed default exit mnemonic -* Fixed some more crashes (thanks bigmuscle) -* Fixed some shutdown issues -* Updated country database - --- 0.6811 2006-01-21 -- -* Fixed a socket race condition leading to failing connections and crashes - --- 0.681 2006-01-21 -- -* Fixed a crash when using slow sources disconnect -* Fixed system log overflow -* Minor user command fix (thanks garg) -* Removed some duplicate code (thanks trem) -* Ctrl-a to select all items in a list (thanks garg) -* [bug 484] Added a check for multiple refreshes running at the same time (thanks trem) -* Fixed a few crashes here and there -* Fixed no-slots message not being sent out always -* Fixed yassl build locations (thanks pothead) -* Added ip resolve cache when searching (thanks trem) -* [bug 413] Failed file moves are now reported to the system log - --- 0.68 2006-01-08 -- -* Changed the user identification process completely to work better with ADC. This leads to a more strict interpretation of - which users are actually the same for NMDC (essentially, NMDC users are now identified by nick+hub always, not only nick) -* Removed saving of directories scheduled for download, since the individual files should appear in the queue fast enough that - this will rarely be used (since file lists are free and downloaded almost instantly) -* Fixed international timestamps (thanks ullner) -* Fixed targetdrive docs (thanks ullner) -* [bug 485] Fixed transfer list view flicker on WinXP -* New connection settings, please check settings page -* Connection type strings changed -* No longer falls back to passive mode on failed UPnP -* Janitorial cleanups (thanks garg) -* Removed some old favorite file format compatibility code -* Added country to search frame (thanks paka) -* Strftime fix (thanks garg) -* [bug 521] Help instead of readme shown on first startup (thanks paka) -* [bug 553] Minimize to tray and confirm appexit default to true (thanks paka) -* [bug 452] Fixed example.xml language file generation (thanks tpo) -* [bug 556] Fixed last searches purge (thanks sulan) -* [bug 73] Added option to disconnect slow sources (thanks paka) -* ADC hub counts updated correctly (thanks ullner) -* [bug 325] Added error message when adding dupe fav hub (thanks ullner) -* Updated bzip2 to 1.0.3 (thanks garg) -* Some small *nix fixes (thanks poison) -* Source path no longer saved for TTH enabled clients (saves memory and queue file space) -* [bug 335] Search window settings saved automatically (thanks pothead) -* Open folder selects file in explorer (thanks pothead) -* Local echo in pm window formatted as the other side should see it (thanks paka) -* Fixed debug assertion (thanks tpo) -* Dirty tabs settings improved (thanks ullner) -* ZLib upgraded to 1.2.3, possibly fixing security issues (thanks garg) -* Slot grants now last one connection instead of 10 minutes -* [bug 632] Subtotals shown when selecting users in hub frame (thanks cologic) -* [bug 625] /u chat command opens url (thanks pur) -* [NMDC] The first word of hub name is taken as short name for displaying purposes when space is limited -* [bug 629] Waiting users frame added (thanks cologic) -* Removed old versions check (thanks cologic) -* [bug 635] Added option to limit maximum file list size to open (thanks paka) -* Filelist transfer logging default to off (thanks paka) -* Added some checks when creating fav hubs (thanks tpo) -* More settings screen updates (thanks ullner) -* Fixed linux file moving (thanks naga) -* [bug 260] Added option to only download files with TTH (thanks ullner) -* [bug 708] Fixed registry creation functions used (thanks ullner) -* Updated WTL -* Rewrote socket code to remove some old hacks and add some new (major change) -* Now using standard windows error messages for socket errors -* [ADC] Added basic SSL encryption support -* Fixed a bug with file list loading and filenames differing in case only -* Fixed a few standard compliance issues -* Added dirtying to waiting users frame (thanks ullner) -* Changed so that a few flags are shown in transfer status, [T] = TTH check on, [Z] = zlib on, [R] = rollback performed, [S] = secure -* Parameter names all updated, your current %[xxx] macros will break all over, on the upside they're now more or less unified -* [ADC] All hubs a user is online on are shown where only one was shown before -* Fixed some log page issues -* Replaced small buffer size option with the possibility to set recv/send buffer sizes manually -* Consolidated bolding options, you'll have to reset them to your preference -* Removed support for old hash index files (pre-0.670) -* Improved hashing error reporting -* Fixed hash database rebuild -* Added /removefav command to remove a favorite hub (thanks ullner) -* [bug 717] Fixed search combo box (thanks pothead) -* Added option to change auto-refresh interval (thanks ullner) -* [bug 740] Removed tab completion option (thanks ullner) -* [bug 743] Added registry key creation failure notification (thanks ullner) -* [bug 717] Fixed dropdown sizes (thanks pothead) -* [bug 760] Fixed list subtraction issue (thanks cologic) -* Added some right-to-left support, but it probably needs more work -* [NMDC] Minislots are no longer given to old DC++ clients (<0.304) -* [ADC] Directory size returned with search results -* Fixed a rare deadlock - --- 0.674 2005-04-10 -- -*** WARNING *** - This version fixes a security bug, upgrade unless you want to risk losing data - anywhere on your drive, this error affects all clients from 0.307 to date (thanks cologic for finding it) -*** WARNING *** -* Added stats window to autoopen (thanks paka) -* Fixed context menu open for multi-screen setups (thanks trem) -* Changed country database to the original format so that users can update by themselves (thanks paka) -* Fixed some registry issues (thanks trem) -* [bug 443] Fixed localised number encodings (thanks trem) -* Updated sorting to use a more windows-like order (thanks trem) -* Fixed an issue with restore all (thanks krzysztof tyszecki) -* Added list view tooltips - --- 0.673 2005-03-22 -- -* Added auto-prio by file size settings (thanks paka) -* Fixed yet another context menu fix (in case anyone wondered, it should now - be possible to use the context menu key for all context menus) -* Fixed a search crash with search history set at 0 -* Updated unicows W95 unicode support -* Updated to latest WTL -* Fixed directory listing total sizes (thanks trem) -* Fixed empty oplist issue - --- 0.672 2005-03-20 -- -* Fixed an issue when loading pre-671 file lists -* Fixed the context menu fix - --- 0.671 2005-03-19 -- -* Added possibility to set minislot size (thanks ullner) -* [bug 22] Added possibility for multiline away messages and user commands (thanks ullner) -* Added file type to queue frame (thanks ullner) -* Changed stats frame to use standard colors (thanks yoji) -* [bug 439] Fixed purge button (thanks ullner) -* Fixed search frame only tth issue (thanks naga) -* Updated to ADC 0.9 -* Fixed a crash bug (thanks trem) -* Fixed a geoip init bug (thanks trem) -* Fixed a prio setting bug (thanks tpo) -* Fixed some font settings (thanks tpo) -* Fixed ADC password sending -* Magnet registration fix (thanks ullner and farcry) -* Finished partial file lists for ADC -* Fixed some ADC crashes -* Basic ADC searches now work -* Basic ADC pms now work -* Basic ADC transfers now work -* Added option to specify bind address for sockets (thanks sed) -* Made the connection flood trigger slighly less sensitive -* [bug 58] Fixed strange user list behaviour -* [bug 83] Consolidated auto-open window options -* Fixed some context menu stuff - --- 0.670 2005-02-04 -- -* Fixed an issue with international formats of float numbers (also fixes UDP port setting) -* Fixed a minor crash log output address issue -* Split off color and sound to a new page (thanks ullner) -* [bug 359] Fixed an issue with negative search terms (thanks naga) -* Added option to filter TTH results in search spy (thanks joakim tosteberg) -* [bug 184] Updated log functionality to allow users to customize log filenames (thanks naga) -* Fixes to log edit function (thanks naga) -* Added possibility to filter all searches without tth (thanks naga) -* More preferences splitting (thanks ullner) -* Small socket fix (thanks tremor) -* Search tab goes bold if set to (thanks naga) -* Hopefully fixed an UPnP crash -* [bug 302] User commands in file lists (thanks joakim tosteberg) -* ADC url's clickable (thanks naga) -* [Bug 117] Improved search timer to avoid spamming hub (thanks naga) -* Redid some of the hash storage code, should be slighly more efficient -* [bug 94] Share is cached for faster startup -* Temporary targetnames are now filled in when download starts, not when item is added to queue, - which makes temp target dir changes happen for current queue items as well, plus we get a huge - memory save on huge queues. -* [bug 363] Added "Remove All Sources" to queue (thanks izzzo & garg) -* Queue menu items greyed out when there are no items (thanks izzzo) -* Fixed a crash with certain empty lists (thanks garg) -* Added "restore all" to undo "minimize all" (thanks guitarm) -* Added optional pm history (thanks trem and ullner) -* Better log file managment (thanks trem) -* [bug 412] Fixed a queue count issue on removal (thanks ullner) -* [bug 9] Fixed a queue move issue (thanks paka) -* [bug 20] Fixed upload auto-slot granting (thanks naga) -* Redid adl search to accomodate for partial list browsing (thanks garg) -* Added initial ADC file transfers support -* ADC hub connectivity improved -* Fixed unnecessary COM initialisation (thanks garg) -* Some linux compile fixes -* Added readd all sources (thanks garg) -* Fixed a deadlock when closing hub windows (thanks trem) -* Added user ip logging in up and downloads (thanks ullner) -* Small spy frame fix (thanks garg) -* Small pm fix (thanks garg) -* Added password warning for n00bs (thanks sed) -* Help file updates (thanks ullner, garg) -* Probably fixed the list redownloading bug -* Hash index format change (as a side effect, it's very easy to find dupes - in the new format, someone should make a tool) -* Download manager changes in preparation for partial list browsing and other - ADC features -* Improved efficiency for small files (<=64KiB) in the hash storage -* Added advanced resume that detects and tries to repair rollback inconsistencies - using tiger trees -* Fixed a rare invalid zlib decompression error -* Autosearch and automatch queue is now done by tth only (!) (thanks garg) -* Automatch search done by tth only, should make things slightly faster -* Search for alternates automatically uses tth if available (thanks garg) -* Lowered compression level so that uploads will take less cpu -* Added exact file size to directory listings (thanks paka) -* Remove confirm fix (thanks trem) -* Added option for the new tab select behaviour (thanks trem) -* [bug 116] Added possibility to download to temp folder on the same drive as target (thanks sed) -* Fixed user command string for file list context (thanks sed) -* [bug 290] Added more correct escaping of search strings (thanks sed) -* [bug 432] Fixed download directory for adlsearch matches (thanks ullner) -* Some UPnP fixes (thanks nils maier) -* ADL Search byte prefix fixes, might screw up your adl search settings on first load (thanks ullner) -* Linux download path fix (thanks jens oknelid) -* Added purge button for search history (thanks sulan) -* Added column reorder to file listing (thanks ullner) -* Fixed alt source download starts (thanks paka) - --- 0.668 2004-11-30 -- -* [bug 311] Fixed crash on open own filelist (thanks sulan) -* Added option to make /join open a new window (thanks ullner) -* Added mailto: to link-clicking (thanks ullner) -* Fixed stack overflow with excessive xml nesting (thanks farcry) -* Fixed virtual name issue with invalid chars in the virtual name (thanks farcry) -* Fixes to ADC implementation, see http://developer.berlios.de/projects/ddc/ for a - somewhat compatible hub in development -* Some linux patches (thanks tim burton) -* PgUp/PgDn now scroll the chat window (thanks jonathan stone) -* Small fix with line history (thanks jonathan stone) -* Added option to use separate TCP and UDP ports -* [bug 303] Fixed a raw command guessing bug (thanks garg) -* [bug 345] Fixed an xml listing parsing bug -* [bug 309] Hopefully fixed nt4 startup -* Hopefully fixed an issue with downloading international search results from old clients - --- 0.667 2004-11-15 -- -* Improved multiple hublist support (thanks garg) -* Fixed some favdirs issues (thanks naga) -* Fixed a status logging issue (thanks naga) -* [bug 289] Fixed annoying login issue -* Added possibility to rename shares (thanks naga and tremor) -* [bug 106] Fixed show joins for fav users (thanks ullner) -* Fixed some unnecessary connects when download slots are full -* Fixed magnet registration issue (thanks garg) -* Some code documentation work (thanks jonathan jansson) -* Makedefs.py fixes (thanks garg) -* A connection attempt is made when you grant a slot to potentially start the other - fella's transfers (thanks sed) -* Fixed passive search results issue with international nicks (thanks garg) -* Fixed search frame extension vs tth again -* FAQ added to the help file (thanks bsod) -* Upgraded to zlib 1.2.2, fixing a security issue (thanks garg) -* Added %[file] to the transfer view user commands (thanks naga) -* Fixed myinfo update issue (thanks sulan) -* Added option to use only up/down for command line history (thanks jonathan stone) -* Improved installer (thanks bsod) -* Fixed so that a connection attempt is made when changing a transfer to highest priority - --- 0.666 2004-11-03 -- -* [bug 173] Fixed copy nick to clipboard (thanks trem) -* Removed some old code (thanks garg) -* Added tth to log codes (thanks garg) -* Added # of locally filtered results to search frame (thanks garg) -* Fixed a crash in the upnp code -* Fixed wide formatting of time (thanks garg) -* [bug 166] Added local filtering of searches with "-" in front of the search term (thanks cologic) -* Fixed a missing hubframe stats bug (thanks trem) -* [bug 87] TTH's are now correctly searched for in search spy (thanks trem) -* [bug 256] Fixed an issue with utf8 user commands (thanks trem) -* Moved to a less intrusive build procedure where stlport and wtl are local to the - DC++ build (see compile.txt) -* Added /log to show log for current hub / user (thanks garg) -* More internationalization (thanks garg) -* Updated some template code (thanks farcry) -* Extended log command (thanks ullner) -* [bug 212] Fixed issue with utf-8 nicks during login to some hubs (thanks garg) -* Fixed issue with utf-8 time formatting for certain languages in certain locales -* Removed search optimisation obsoleted by tth's and bloom filters (those of - you with a large number of files in your share, post on the forum if you notice - any big increase in CPU usage) -* [bug 69] Added option not to download files already in share (by TTH) (thanks TPO) -* Help file work (garg, ullner) -* Added petabytes (PiB) (thanks garg) -* Clicking on active tab will deactivate it (thanks garg) -* [bug 227] Fixed an issue with loading invalid virtual names when upgrading (thanks garg) -* [bug 256] Fixed another issue with user commands (thanks garg) -* Updated to WTL 7.5.4291 -* [bug 183] Hopefully fixed a few issues with w9x and Unicode -* Fixed common control initialization -* Unix makefile now generates a shared lib (thanks jeremy huddleston) -* Slight memory save for hash database -* [bug 130] Added favorite hub removal confirmation option (thanks ullner) -* [bug 5] Fixed broken redirect (thanks garg) -* Added spy frame column saving (thanks garg) -* ADL Search autoqueue saved now (thanks garg) -* Window minimization issue fix (thanks garg) -* [bug 129] Fixed some issues with downloading >4GiB files -* [bug 15] ADL Search goto directory fixed (thanks garg) -* Some fixes for compiling on osx (thanks jonathan jansson) -* Removed Makedefs in favour of a python script -* FastAlloc disabled in debug builds -* [bug 266] Fixed a crash with offline users and user commands (thanks naga) -* [bug 165] Fixed a case insensitivity issue (thanks farcry) -* [bug 18] Added favorite download directories (thanks naga) -* Fixed MyINFO spam when hashing - --- 0.4034 2004-10-03 -- -* Help file additions (thanks naga & ullner) -* [bug 170] Fixed a few issues with files not being hashed correctly (thanks garg) -* More ADC fixes (thanks sed) -* Fixed some ADLSearch stuff (thanks garg) -* Added item count to finished frames (thanks garg) -* Fixed user commands encoding (thanks garg) -* Added last search time to search spy (thanks ullner) -* [bug 3] Fixed queue size growing on queue item move -* Fixed missing file list on 0 byte share -* [bug 185] Fixed missing search results (thanks garg) - --- 0.4033 2004-09-27 -- -*** WARNING *** - This update will change all your config files and queues, and it is - very probable that you won't be able to revert back to an older version - once the update has been done!!! - Also, finish your queue file before upgrading if you care for your - international filenames in it - they will not be correctly converted. -*** WARNING *** - -* Fixed a rare download crash (thanks farcry) -* Fixed tab dropping in the last position (thanks trem) -* Fixed directory sorting in the file listings (thanks trem) -* Files that can't be moved to the target drive from the temp folder - are now renamed to their real name -* Text with unix and mac line end encodings should now be correctly displayed -* [bug 35] TTH Values are used for right click download menus when available -* Upgraded to WTL 7.5.4196 -* Updated license to allow others to release legal binaries compiled against WTL -* Moved the core structures to UTF-8 to allow correct internationalisation (major change) -* Moving towards full unicodization of the user interface, MS layer for unicode - now needed for old crappy windows versions, and I don't know how good that works. The - rest of us can now see correct names being displayed in file listings (for XML filelists anyway) -* Rewrote the share manager so that it doesn't lock the whole of DC++ while reading the - directories of shared files when refreshing the list -* Added virtual share name -* Removed autosearch string, it's not used any more -* Fixed a tth hash speed bug (hashing should be much faster now) -* File listings are now generated on the fly when someone needs them -* [bug 127] Added UPnP support (thanks mark gillespie) -* Ctrl-L now opens file lists (thanks garg) -* Various ADC patches (thanks sedulus) -* Slightly changed temporary download name -* TTH Leaf uploads no longer logged (thanks garg) -* Added (initial) support for hublist.org xml hublists, now default - (you have to change your hub list address to http://www.hublist.org/PublicHubList.xml.bz2 - if you want to benefit) -* Fixed an issue with invalid TTH inconsistencies due to files being downloaded to the same - target filename as a previously downloaded file (.nfo's usually) -* Some memory savings for people with large queues -* Fixed a bug with autosearch repeating the same search needlessly (this should result in fewer - autosearches, good for the hubs) -* Files scheduled for viewing are always set to highest prio -* Added rudimentary automake and autoconf support for the client part, perhaps this will encourage someone - to finish a nice linux port -* [bug 162] Fixed dupe usercommands on reconnect (thanks sed) -* Links now clickable in PM's and notepad as well (thanks naga) -* Files are no longer hashed if the shared directory is removed while hashing -* Added hash progress dialog, hashing is run at a higher priority when dialog is shown -* Fixed a crash issue with invalid DcLst:s (thanks garg) -* Better strategy for removing old filelists on exit (thanks garg) -* Added Geo-IP license and fixes (thanks garg) -* Added Help file - make sure you read it (thanks garg) -* [bug 169] Fixed a memory leak with rollback buffers under certain conditions -* ADC INF updates only send the necessary info (thanks sed) - - -- 0.4032 2004-08-08 -- -* Fixed issue with autosearch not getting filelists -* Fixed an issue with autosearch by tth not being done -* Added folder histore for single file downloads (thanks slowmo) -* Fishing locale from os, changes string representations in some places (thanks garg) -* Caseless icon optimization (thanks garg) -* CTRL-E shortcut for refresh (thanks garg) -* Fixed a process termination issue (thanks defr) -* DCTC file not available detected (thanks defr) -* Fixed bad window size being saved for minimised windows (thanks trem) -* Fixed an issue with the ADC parser (thanks trem) -* More WTL 7.5 preparations (thanks garg) -* Added a switch to ease the life of the UPX compressor (exe compressors suck btw) (thanks garg) -* Added irc:// as web link (thanks ullner) -* Fixed an issue with the adc parser (thanks sed) -* TTH trees no longer require a slot -* Added options to open file lists and pm's in background (thanks sed) -* Minor number formatting fixes (thanks palm and garg) -* Some more linux compile fixes (thanks palm) -* Additional translation strings (thanks garg) -* Fixed own search results bug (thanks garg) -* <64KiB files auto-highest priority (thanks garg) -* Fixed search in utf-8 file lists (thanks fleetcommand) -* Fixed utf-8 encoding/decoding, chinese and other multi-byte scripts should - now work ok (thanks liny) -* Removed obsolete Import from NMDC queue (blame cologic) -* Added option to disable bolding for hub frames (thanks ullner) -* Fixed a small leak in the Search Frame (thanks psf8500) -* Added bitzi.com lookup and magnet link copy (thanks garg) -* Removed .bz2 lists from "open file list" types (thanks garg) -* Fixed a download-to crash (thanks farcry) -* Fixed dialog modality in several places (thanks garg) -* Fixed some debug assertions (thanks garg) -* Queue sorted sensibly (thanks garg) -* Added customizable timestamps (thanks ullner) -* Added extended dupe logging (thanks xan) -* Some code pedantry cleanup done (thanks garg) -* Unfinished files now have a slightly different naming scheme (thanks garg) -* Added default unfinished folder (thanks garg) -* When matching queue, users marked with file not available are readded (thanks farcry) -* Added (limited support for) magnet link handling (thanks garg) -* Uninstaller now removes the one registry key DC++ creates (thanks garg) -* Fixed a few link click bugs (thanks garg) -* Added quick connect (thanks tpo) -* + and - in the queue change priority (thanks tpo) -* Network stat colors are now the same as in the transfer window (thanks tpo) -* Fixed a rare automatch crash (thanks farcry) -* Allowed sharing of network folders (thanks garg) -* Added option to automatically add finished files to share without refresh (thanks farcry) -* Fixed a few closing window crashes (thanks farcry) -* Fixed a tab moving issue (thanks farcry) -* Sources with rollback errors are now automatically removed (thanks garg) -* Fixed compile.txt and readme.txt (thanks garg) -* Magnet handler included in installer (thanks garg & magnethandler author) -* New icon with alpha channels for xp (thanks olle svensson, sorry all other icon - submitters who sent it before him, neither aestethic nor personal reasons why - yours wasn't chosen =) -* Fixed another download to crash (thanks garg) -* Stringdefs automatically rebuilt (thanks farcry & garg) -* DC++ will only share files that HAVE BEEN HASHED! - - -- 0.403 2004-06-27 -- -* Fixed 100% cpu / crash bug - - -- 0.402 2004-06-27 -- -* Fixed transfer view crash (thanks garg) -* Removed default sort in search frame -* Window sizes / positions of favorite hubs saved (thanks trem) -* Begun work on the ADC protocol (major change) -* Fixed issue with the exceptioninfo growing indefinately (recursive behaviour) -* Readded missing TTHSearch to hub $Supports -* Fixed unnecessary $MyINFO being sent out -* Removed time left and speed from waiting transfers (thanks garg) -* Documented %[line:reason] -* Fixed a bug with hanging queue display -* When searching by hash, size mode set to normal (don't care) -* Hash speed tweaks, check if it's any better. -* Fixed a crash when moving files -* Fixed directory sorting in directory listings -* Fixed an unnecessary disconnect on file not available -* Fixed missing write buffering -* Added drag-drop of directories onto the shared dirs view (thanks trem) -* Added option for specifying max hashing speed -* Updated installer to optionally create a backup of the settings when upgrading -* Changed to a more convenient observer implementation (no, not a functor (or something more fancy) based one) -* Fixed an invalid XML file list crash -* Copy address to clipboard from public hub list (thanks joakim tosteberg) -* Changed to IEC binary multiple units (MiB, KiB etc) -* GETSETREF templetized (thanks farcry) -* Small files size increased to 64KiB -* Op's that use a client that supports minislots always get a minislot (for small files / xml file lists), - regardless of how many minislots are already taken. -* Matching by name removed for queue items with a TTH root (for autosearches) -* Autosearch is done by TTH for queue items that have a root -* Removed GetTestZBlock (no more safe/compressed transfers from old clients) -* Added support for automatic user command clearing (code 255) (thanks sedulus) -* User country shown in ip field (thanks pofis) -* Automatic search matching is now done exclusively by tth for those items that have a TTH root and - by exact filename for those that don't. -* Dropped support for bzip2 file lists -* Show joins parts for fav users only option added (thanks psf8500) -* Added possibility to log hub status messages (thanks naga) -* Removed full-row-select option (blame garg) -* Added possibility to drag-drop tabs (thanks trem) -* Added toggles for transferview showing (thanks trem) -* HTTPS added as chat click link (thanks naga) -* Autoconnect postponed if no nick has been set (thanks sed) -* Various unix compile fixes (thanks christer palm) -* Fixes for IEC in settings pages (thanks slowmo) -* Remove multiple directories from share (thanks slowmo) -* Added executable TTH to about box (for reporting bugs) -* Changed exceptioninfo.txt format to prepare for automatic crash logging -* Added download by TTH root instead of share path. This feature enables - the downloading client to find the file even if the uploader has reorganized - its share. -* Fixed number formatting in search and queue frames (thanks slowmo) -* Workaround for WTL75 bug with menus (thanks garg) -* .mkv and .flac added as file formats (thanks garg) -* Added warning about non-shared files with $ in them (thanks garg) -* Fixed a rare deadlock when autosearching -* Search by TTH greyed out for items that don't have a TTH root (thanks slowmo) -* Added default menu items to finished frames (thanks slowmo) -* TTH leaves (TTHL) exchanged between capable clients to verify data integrity -* Fixed a disconnecting bug caused when $UGetBlock and $GetZBlock are given an - unknown number of bytes to send - - -- 0.401 2004-03-28 -- -* Fixed the dupe file issue -* Hopefully fixed the dupe op issue -* Rephrased remove dupes option (thanks garg) - - -- 0.400 2004-03-27 -- -* Fixed escape in user commands (thanks garg) -* Probably fixed search frame hang -* Exact size in queue frame (thanks cologic) -* Ip in search frame (thanks cologic) -* Small fix to transfer view sorting (thanks naga) -* User commands in transfer view (thanks naga) -* Extra logging in main status bar (thanks garg) -* Option not to bold queue tab (thanks garg) -* Option not to send unknown /-commands (thanks garg) -* Hopefully fixed some encoding issues with the xml filelist -* Hashing is now mandatory (stop whining, it was only meant to be optional in 0.307) -* Match files now works correctly with TTH's in queue -* Hub name more or less correct on TTH results in search frame -* Added search by TTH to queue frame -* Large speed improvement in user list loading when lists sorted on user name -* Fixed inverted ratio of uploads -* New icons in window menu (thanks garg) -* SFV failure message (thanks garg) -* Bolds for defaults in some menus (thanks garg) -* Fixed random filelist crash -* Performance improvement in background match queue -* Dupe file check done by TTH value - - -- 0.307 2004-03-10 -- -* Experimental release, lots and lots of core code has changed => high fatal bug probability. -* Fixed full name being displayed in user commands with submenus -* Bloom filters dramatically improve cpu efficiency on incoming searches (if you have a large share) -* Auto match results shown in status bar -* Added option to match autosearch filenames exactly to further avoid the wrong file being downloaded (default on) -* End of zlib transfer test period, semantics slightly changed ($GetTestZBlock -> $GetZBlock, $Sending changed) -* Speed increase when loading shares with many files of the same size (thanks farcry) -* Added file hashing, turn it off in advanced settings (experimental) -* Merkle trees and tiger hashing added for TTH hash support -* Compression totally rewritten, should also fix a few minor issues -* Compression (GetZBlock) and hashing (TTHSearch) is advertised to hubs through $Supports, I advise hubs to advise - its users to keep at least hashes on so that searching by hashes will work efficiently (as it's only useful if - all clients on the hub support it). -* Fixed bug where no/invalid file listing would be written if there was no disk space (the old one is used now - instead...) -* XML File lists that contain hashes if available, and support full utf-8 names (correct viewing is not guaranteed, - but download should work) -* Upgraded to zlib 1.2.1 (thanks garg) -* Extra column for hub in transfer list (thanks naga) -* Copy nick to clipboard in transfer list (thanks naga) -* Files starting with a '.' are no longer shared if hidden files are not shared (...unix...) -* Fixed a minor memory leak when an invalid search result is returned (exploitable minor security issue) -* Slight speedup of file list loading -* File IO rewritten (major change) -* Rollback no longer depends on buffer size -* /rebuild rebuilds the hash database and potentially reduces the size of the raw hash data file (also checks - its integrity) -* Ip column in transfer list (thanks cologic) -* Scrollbar for multiline messages (thanks garg) -* Fixed an issue with icon transparencies (thanks garg) - - -- 0.306 2004-01-09 -- -* Fixed an issue with UNC paths (those starting with "\\") -* Changed autosearch so that it only searches if less than 5 sources are online, this should stop galloping - filelist downloads as well -* Upgraded to WTL 7.1, should fix a few UI issues -* Fixed brightness of compressed transfer progress bars -* Fixed a crash with badly formatted compressed transfer requests -* Some work on memory managment, dramatically improving DC++'s behaviour with large queues / shares -* Auto-match queue is only done on exact match -* Fixed a bug in the compressor that may have caused compressed uploads not to finish and/or 100% cpu -* The sound part of partially corrupted queues is now recovered -* When opening a file list from search results, the file's directory is automatically shown -* An extra buffer flush is done to ensure that file lists are fully written to disk -* Readme automatically shown for new users (thanks johnny) -* Filename is shown on transfer error (no slots etc) (thanks ciber) -* Ctrl-tab order is now the standard last-seen -* Added support for user command menu subitems (add a '\' to the name) -* Fixed locale setting bug -* Added option to automatically add items to queue from ADL search (thanks twink) -* Fixed share sizes not being updated with the "share hidden" box (thanks theparanoidone) -* Directories with '$' in the name are no longer shared (they can't be downloaded) -* Favorite users can now have descriptions -* Added filesize and filesizeshort to search frame %[...] macros (thanks gadget) -* Added option not to log filelist transfers -* Fixed some issues with being / not being op - - -- 0.305 2003-12-04 -- -* Fixed disappearing queue items bug -* Fixed displaying of upload compression in progress bar -* Added compression ratio column and %[actualsize] and %[actualsizeshort] to log formats available -* Fixed doubled name when downloading directories from search frame -* Fixed a mem leak for safe transfers -* Fixed a crash during downloads -* Fixed speed problems with user list -* Added "open download directory" to file and tray menu -* Shift-clicking tab will close window (thanks twink) -* Added support for $UserIP, %[ip] as user command parameter and server side ip detection (automatically used - if the ip field in settings is blank) -* Transfer bar colors updated and user-configurable (thanks garg) -* Fixed possibility to share same folder twice (thanks theparaniodone) -* Fixed translations of kick & redirect user -* Fixed missing subdirs when moving directories in the queue -* Really fixed hublist space trimming =) -* Added ".wmv" and ".ogm" as video extensions -* Fixed some issues with same-named fav users -* Fixed small mem leak in fav users -* Max download slots default changed to 3 -* Max 3 slots more than max download slots are used for highest priority downloads -* Added option to automatically download filelist and match it on autosearch match. This will dramatically speed up - autosearching, lessening the strain on the hubs as less searches have to be done. -* Added accelerator for filtering in public hubs (thanks garg) -* Fixed some translations (thanks ciber) -* Added "downloaded bytes" to queue (thanks ciber) -* Fixed refresh file list from main menu -* Switched user and filename column in search frame so that the image will be attached to the correct column (thanks - garg) -* A few message boxes updated (thanks garg) -* Added supports NoHello, a hub bandwidth easing feature for the hubs that support it -* Fixed a problem with matched list downloads not starting - - -- 0.304 2003-11-19 -- -* Fixed missing usercommands (thanks sed) -* Added option not to receive usercommands -* Fixed a bug with bad search result type (hub owners, make sure your users upgrade if they use 0.302-0.303) - (thanks saurod) -* Added "$Supports MiniSlots" for other clients to profit from dc++'s free small files and filelist free slots - (thanks sed) -* Added /getlist command to get users list from chat (thanks twink) -* Added check so that temp directory cannot be added to share list -* Hopefully speeded up hub connect a little -* Fixed transfer view sorting I think, this is how it should be: running downloads, running uploads, waiting - downloads, waiting uploads -* Fixed missing string (thanks garg) -* Fixed invalid date added formatting -* Fixed trimming of spaces for http downloads (hub list...) -* Fixed a bug in autosearch when using auto search strings (thanks ilkka seppälä) -* Fixed typo in user commands help -* Fixed missing sort arrows -* Added time last seen online to fav users (thanks gargoyle) -* Changed auto-grant slot ui (thanks gargoyle) -* Fixed error removing recently added share directory -* Fixed open folder in finished frames - - - -- 0.303 2003-11-14 -- -* Fixed reversed free and open slots in search results (oops...=)...upgrade or you're likely to be banned! - - -- 0.302 2003-11-14 -- -* Added a small menu to the tray icon (thanks orkblutt) -* Added port to hub log files -* Some fixes so that \client will compile better under linux (thanks christer palm, he's working on - a linux version using dc++ as base...) -* Speedups, code cleanup to GUI list handling -* New STLPort again (4.6) (a lot of the match queue crashes are probably STLPort's fault, - so I'm changing again, to see if the latest is better, + that I changed two lines in it) -* Fixed some bugs in the &-translation -* Can be compiled in MSVC 7.1 without stlport, make sure to undefine HAS_STLPORT in config.h -* Updated the antifrag feature to recover from crashes (thanks distiller) -* Fixed so that tab completion works with multiple [xxx] tags (thanks sed) -* More code cleanup, keep a backup of your queue handy while upgrading, queue code extensively - rewritten to ease future changes -* Updates to the autosearch feature -* Added (well, enabled) GetZBlock, a feature that makes all transfers safer by checking CRC's - during the transfer and if possible, compresses. This is an experimental feature, and it might - require some extra cpu, so it can be turned off in settings, turning it off will turn it off for - both up- and downloads. If both users have it enabled it will automatically be used. Compression - is automatically turned off file files that don't compress well (.rar's for example), but the extra - CRC check is still done. Safe transfers are marked by a * in the active transfers list (I'll think - of something better later on...) -* New, very nice progress bars for the transfers window (thanks citruz) -* Multi-shade progress bars to show how much was resumed and compressed -* Added auto-grant option to favorite users (thanks saurod) -* Improvements of robustness and speed of the XML reader -* Fixed some minor Examples.xml issues ("\\" and "\t" are now correctly shown) -* Fixed a queue crash bug -* Changed transfer view sort order (active downloads, active uploads then connection attempts...one - fine day perhaps it'll be configurable...) -* Added date added column to queue -* Temporary downloads folder no longer shared -* Fixed a bug where the socks5 proxy was used for http proxy connections (thanks dan fulger) -* Added command history scrolling using ctrl-up/down/home/end (thanks cologic) -* Fixed match queue crashes -* Fixed sending of unknown '/'-commands to the hub (thanks sedulus) -* Added support for once-per-nick usercommands (and made kick/redirect work like once) -* Filename and path in finished frames split ut in two columns (thanks twink) -* Fixed NoGetINFO so that it actually doesn't send any getinfo's - - -- 0.301 2003-10-28 -- -* Fixed usercommands in hub frame (kick for example) -* Other fixes to usercommands (thanks sedulus) -* Fixed reading of DCTC file lists I think (haven't tested) (DCTC of course has to be different - from all other clients and create file lists with multiple directories with the _same_ name - for no reason) -* Fixed "open folder" in finished frames -* Added new search for alternates algorithm with possibility to set search string yourself - (thanks saurod) -* Added selection of which hubs to search in (thanks saurod) -* Fixed link opening in some browsers -* Added NoGetINFO extension support - - -- 0.300 2003-10-27 -- -*** WARNING *** - Security update, upgrade unless you want to risk losing files anywhere - on your hd (this is for all versions prior to this one) (thanks fusbar for bringing - it to my attention) -*** WARNING *** - -* Some code cleanup -* Added vertical tiling of windows -* Nick and password are now taken from favorite hubs on redirect (thanks saurod) -* Fixed a case sensitivity bug in favorite hubs (thanks saurod) -* Locale formatting of exact size in search (thanks saurod) -* Fixed a bug where directories were not correctly returned (thanks saurod) -* Replaced the tab control in the settings with a tree, expect many more settings soon -* Fixed a bug when changing priorities from paused -* Reduced transfer view flicker somewhat when sorted by status -* Reconnect time is randomized a little to reduce stress on hub when everyone reconnects -* Small i18n fix in uploads settings (thanks atomicjo) -* Numbers only on search size box (thanks atomicjo) -* Delete multiple favorite users (thanks garg) -* Autocomplete turned off when using shift-tab (to tab between the windows instead) - (thanks garg) -* Small fixes (thanks garg) -* Toolbar updates (thanks garg) -* Speeded up match queue a lot (I mean a _lot_) -* Added a network statistics view -* Added tab-specific context menus -* Added support for hub $Supports -* Added hub-sent usercommands -* Usercommands changed to raw in save file -* New %[ parameters in user commands -* & is used to escape the & in chat (currently only escapes when really necessary, i e - | or $ escape is used) -* Added "Match Queue" to various right-click menus -* Internationalised settings (thanks garg) -* Fixed finished frame lockups -* Moved to Visual Studio 7.1, 7.0 project files are available, but won't be maintained... -* Own icon always set to blue (DC++) (thanks atomicjo) -* Edges around the settings (thanks opera) -* Fixed right-click issue in the hub frame (thanks twink) -* Fixed a problem with detecting protocol extensions -* Updates to the queue frame (bugs fixed and smarter when using with multiple drives) -* Fixes to zblock sends (thanks sandos) -* Links are opened in a new browser window -* New STLPort again (4.5-1020) -* Increased some buffer sizes to increase high-speed transfer performance -* Added tooltip to hub window status bar that shows last 5 status lines -* /-commands that don't exist are now sent to the hub -* Added /pm -* Added /g to search google -* Added /imdb to search imdb - - --- 0.263 2003-09-30 -- -* Fixed a mouse click crash (thanks sed) -* Fixed so that donating is done in euro's from the help menu (why don't you try it out? =) -* Port can now be seen in the hub frame title (thanks sed) -* Fixed a major bug with filename case sensitivity (causing strange queue behaviour) -* Fixed another queue crash bug -* Queue now starts fully expanded (makes sense with smart queues) -* Fixed compiling issue on vc6 - - -- 0.262 2003-09-24 -- -* Added arrows and tri-state sorting (thanks saurod) -* Fixed a crash with certain queues when opening queue frame -* Fixed a bug in the search frame not setting b/kB/MB correctly when searching for alternates -* Fixed bad loading of menu translations -* Fixed tag not being removed when someone turns it off -* Added connection flooding protection -* Fixed a bug with file extension being cut off when moving files in certain windows setups (I think, not tested) -* Small fix to ip detect code (thanks fusbar) -* Fixed a file read crash -* Fixed so that DC++ correctly returns hub port in search results (thanks sed) -* Now correctly reacts to multiple $Hello's with own nick -* When moving items in the fav lists, items are scrolled into view if moved outside the window -* Added "View as text file" option when downloading files (only shows the first 32k though...) -* Made it possible to compile using the stl supplied in msvc 7.x, it's untested though, and I won't maintain it - (I just wanted to see if it works) -* Already existing files are prioritised when queueing -* Changed so that files are downloaded in alphabetical order when first added (this makes opening large user file - lists a little bit slower) -* Upgraded to STLPort 4.5.0725 (should be compatible with msvc 7.1) -* Fixed right-click menu in hub frame when the username comes last on a line (thanks sed) -* Added stored password sent notification when connecting to favorite hubs - - -- 0.261 2003-07-15 -- -* Fixed user list problems -* Fixed a queue frame crash - - -- 0.26 2003-07-15 -- -* Search for alternates now sets file type as well (and should work correctly with sizes...) -* Search now returns results for exact size matches on at least/most searches -* Some minor fixes -* Fixed a crash on adding items to the queue -* Progress bar now has different color for selected items -* Added notification for which file was not available for downloading -* Added H: to main window status bar -* Hub developers: Added section about $Supports scheme for client-hub communication to extensions.txt that - dc++/dch++ will (probably) use to extend the protocol (if it ever happens =). -* Default hub list now points to one that works -* Minor code cleanups -* M:5 in the <++ tag means socks5 mode (this should have worked since 0.20...) -* If no nick is set the settings dialog pops up at startup (to help newbies...) -* Added a smarter queue tree display, to make it less deep -* Fixed downloading of files with ? and * in name -* Fixed downloading of filelists from users with \ in name -* ADLSearch: Added Break on first option and special 'discard' target (see help) (by henrik as usual) -* Added time left and speed columns to transfer window -* Add to favorite user available from search frame -* <++ tag is now shown in a separate column in the hub frame -* Different tab types are now colored differently (some day I might actually make the colors configurable...) -* Tabs are back at using the system menu font instead of the custom one -* Added tab completition in hub frame, turn it off in advanced settings to get old tab behaviour (it can also - be used as a user search...) -* Added move up/down controls to favorite hubs -* Added options to open the finished downloads and favorite hubs window at startup -* Fixed a bug where bad results were being given when searching for directories - - -- 0.251 2003-05-28 -- -* Fixed 100% cpu bug in new search (thanks opera) -* Fixed a bug with queue selection counts (thanks sed) -* Fixed a problem with percents not being escaped correctly in user commands (thanks sed) -* Added so that you can use time formatting in the away message (%Y, %m ...) (thanks vladimir marko) -* Added %[file] to search frame user commands (that becomes the current filename) (thanks sarf) -* Fixed some of the vc6 compile errors/warnings -* ADLSearch: now accepts %[nick] (see help) - - -- 0.25 2003-05-20 -- -Major: -* Implemented a faster substring search algorithm for share and file listing searches (the QuickSearch variant of - Boyer-Moore) -* User commands now work from search as well -* Fixed a major bug where queue items without sources were not loaded from disk on restart -* Fixed slow favorites opening / excessive saving (thanks garg) -* Large speedup in file listing search (QuickSearch + unnecessary processing added earlier removed) -* Added selection size info to queue frame (same as file listing) -* Fixed some crashes when closing windows (and perhaps added some new ones...) - -ADLSearch: (by Henrik Engström) - * Keyboard shortcuts. - * Context menu (back again). - * Removed 'Active' column and made it a check box. - * Unified button texts to the rest of DC++. - * Fixed bug with multiple destination directories, some search results only ended up in the first of multiples. - -Minor: -* Memory savings for users with many files in share -* Hyperthreading / multicpu users, try again and report back if it works -* Fixed %[hub] in upload log -* Some code cleanup -* Fix for buggy HTTP servers sending Content-Length with wrong case (thanks sandos) -* Added link to change log in help menu (thanks garg) -* Fixed link to faq (thanks garg) -* Fixed public hub list mouse clicks and reopening (thanks garg) -* Fixed so that "3/4 users offline" can be translated to polish -* Fixed tabbing in search frame -* Added option for not downloading zero-byte files -* Added handling for dchub:// in main chat (opens the hub) -* Fixed a bug with strange nicks causing problems with file list opening -* Fixed a bug with orphaned file lists -* Fixed a bug with socks5 password length (thanks dwomac) -* Double-clicking text selects the word (as in old versions, thanks garg) -* Directories are no longer returned for "at least" searches with bytes > 0 (i e directory size is assumed 0) -* Fixed another issue with accesses to invalid drive letters (thanks sarf) -* Holding shift during startup (when the main window shows) will disable autoconnecting to hubs -* Fixed user description saving and updating (thanks garg) -* Large files are now moved in a separate thread to avoid losing connection while moving (if using temporary download dir) - - -- 0.242 2003-04-19 -- -* Updated compile.txt with some notes on submitting patches -* Perhaps fixed the multicpu/hyperthreading issue (could someone try and report to the bug tracker?) -* Various optimizations of the socket code to regain some of the upload performance that some seem to have problems - with (keep in mind that SFV-checking, when enabled, slows things down on the downloading end when a file is checked...) -* Fixed problems with changing active port -* Fixed favorite hub properties saving -* Added option not to send away message to bots (users that have not sent a myinfo that is...) (thanks sedulus) -* Fixed 302-moved code a bit (thanks sedulus) -* Added match queue feature to the file listing window. This will take every file in the file listing and see if there - is any matching file in the queue (exact filename & size match). Every match will then be added to the queue as an - extra source. Depending on your queue size and the number of files in the listing this might take some time to do... -* UI updates to ADLSearch (by Henrik Engström) - - -- 0.241 2003-04-01 -- -* Made the XML parser a bit more robust against bad XML data (to avoid embarassing situations such as the last one...) -* Favorite users and hubs are now saved on edit instead of on exit. -* Added support for "302 file moved" for hublist downloads (thanks sedulus/sandos) -* Fixed error reporting for hublist download -* Same server but different port is now properly considered a different hub (thanks sedulus) -* Last entered parameter for user commands is now remembered (%[line:...]) -* VC6 projects files brought up-to-date -* Added a DLL to the installation procedure to make sure we get good debug info under older windows versions (research - by garg) -* Fixed attempt to access f: I think (it seems that the debug info generator tries to access f: when dc++ crashes, - because microsoft compiled their stuff from f:...untested, I don't have any f: =) -* Update to some confirmation dialog (thanks garg) -* Partially changed back to the 0.233 code for uploads (since the new one seems to cause upload performance problems) -* The queue is now only bolded when an file is finished. -* Added away indicator in the main status bar (thanks garg) -* Added finished uploads frame (thanks garg) -* Added finished bold disable option (thanks garg) -* Minor adjustments to the sort order -* Added anti-fragmentation feature. When downloading, it creates a file of the expected target size with unspecified - content. If the download fails, the file is truncated to the size DC++ thinks it has downloaded, and - resume should work fine. If DC++ crashes, you'll lose the whole downloaded part + any resumed part as well, as - there's no way to know how much valid data there is in the file. Disabled by default. -* Added a few keyboard shortcuts here and there -* Fixed bug with SFV retrying (files will now properly be retried _once_ beforer a source is discarded) -* The maximization state of the inner windows is now remebered, default to maximized first time. - - -- 0.24 2003-03-11 -- -* The splash screen is now correctly centered (we thank Vladimir Marko for this important patch =) -* Added ADLSearch, a new search filter for browsing files, submitted/made by Henrik Engström. -* Local ip handling improved, so that a per-hub ip is used if nothing is entered in the active field (good for - people who connect to local hubs or through different network cards) -* You can now use $ and | in the chat. DC++ uses the HTML standard $ and | to replace them...some people - might not like this because it's different than the escape sequence used in the lock, but I prefer a standard way - of escaping that's not limited to numbers below 999...later on, perhaps I'll add full &-escaping support so that - people will be able to send all kinds of strange characters. The same escpace sequences are used in the description - and email. -* Incoming connections are now handled in a completely different, more effective way (one thread less...). This could - perhaps help with the multicpu/hyperthreading issue, but I doubt it... -* Fixed a crash-at-exit in the debug build -* Fixed a bug causing missing search results (thanks opera) -* Another go at the case insensitive string comp bug (tried with a queue file that was reported not to work so...) -* Added custom per-hub user description to favorite hubs (thanks garg) -* Some code cleanup and minor fixes -* Updated H: tag. It now looks like H:x/y/z where x, y, and z are normal, registered and op hubs respectively. It - is updated roughly once a minute, but if you're disconnected, the count won't go down until the window is closed - (i e hubs you're trying to reconnect to count as well, to avoid too many updates being sent to the hub). Also, - note that there's a problem with the op count. All op's will first be counted as registered users, and then, - when they're fully logged in the count will be updated. This is a protocol limitation and there's not much to - do about it (although, most of the time you shouldn't notice, if the hub sends the op list fast enough...). This - release also fixes a bug where the count was not correctly updated across all hubs. -* To avoid confusion when receiving text pasted from the chat, "- " is inserted whenever a line starts with '<' or - '[' in the main and private chat (so that it won't look like somebody else is writing a message) -* I think you can now use %-shortcuts in the nick when specifying user commands (%[line:] does not work tho...) -* Doubled interval between autosearches (2 minutes now, and 60 between each research of the same file), this to - ease the bandwidth load on busy hubs -* Favorites, users and user commands are now saved to a separate file. The old ones will still be loaded for a - few versions... -* Added info about current directory/selection to the file listing browser - - -- 0.233 2003-02-24 -- -* Back to normal... -* Fixed a small bug with disappearing tray icon (thanks vladimir marko) -* Fixed a major bug in the case insensitive string compares resulting in 100% cpu/crashes in certain cases - (specially with filenames that contain international characters). This should also fix sort problems - and perhaps some search problems as well... -* Fixed some problems with file lists not refreshing correctly when they were being downloaded at the same time. -* Added option to disable the hourly automatic share refresher -* Fixed another Finished Files crash -- now it *should* work, I actually tested it once this time... -* Fixed a "dc++ would not shutdown" bug (thanks garg) -* Fixed another thing with hub lists being unnecessarily downloaded (thanks garg) -* Fixed a bug with opening faulty .bz2 file lists (thanks who) -* Fixed a bug with whole descriptions not being visible in the settings - - -- 0.232 2003-02-14 -- -* Fixed a bug when temp download directory was missing '\' in the end -* Fixed another crash when disk full bug -* Files containing $'s are no longer added to share (can't be downloaded later on...) (this is a protocol limitation) -* Changed the "download whole directory" back to the old way of working (see 0.23 notes), it turned out that i didn't - like it and neither did anyone at the forum seem to do...maybe I'll think of something better later on... -* Fixed the move file thing (properly this time, I hope) -* Fixed edit boxes being enabled when option was not in logs&sound settings (thanks garg) -* Fixed "add shared directory" modality (thanks garg) -* Fixed finished files crash -* Added an icon for the finished downloads to the toolbar (thanks garg) -* The main icon now contains a 48x48 icon as well (thanks garg) -* I hope the owner of the picture doesn't sue me / mind =)... - - -- 0.231 2003-02-04 -- -* Minor speedup in the string tokenizer (silly...) -* Fixed missing search results when searching without type (fix also provides a tiny speedup when being searched) -* Fixed a silly assertion fault in the debug build -* Fixed the single file move crash (together with "wrong file moved", same bug) -* Fixed so that a user won't be granted a slot when using a "free" slot if disconnected because of the - autodisconnect feature (thank... [truncated message content] |
From: <arn...@us...> - 2006-03-18 20:10:15
|
Revision: 594 Author: arnetheduck Date: 2006-03-18 12:09:56 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=594&view=rev Log Message: ----------- date fix Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/help/changelog.html Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-18 19:40:59 UTC (rev 593) +++ dcplusplus/trunk/changelog.txt 2006-03-18 20:09:56 UTC (rev 594) @@ -1,4 +1,4 @@ --- 0.688 2006-02-26 -- +-- 0.688 2006-03-18 -- * Fixed public hubs sorting (thanks pothead) * Fixed a ZPipe issue (thanks jove) * [bug 858] Fixed a 100% cpu / crash bug Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-03-18 19:40:59 UTC (rev 593) +++ dcplusplus/trunk/help/changelog.html 2006-03-18 20:09:56 UTC (rev 594) @@ -13,7 +13,7 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. -<h2>0.688 <span style="color: gray;">(2006-02-26)</span></h2> +<h2>0.688 <span style="color: gray;">(2006-03-18)</span></h2> <ul> <li>Fixed public hubs sorting (thanks pothead)</li> <li>Fixed a ZPipe issue (thanks jove)</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-18 19:41:11
|
Revision: 593 Author: arnetheduck Date: 2006-03-18 11:40:59 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=593&view=rev Log Message: ----------- More stuff before release Modified Paths: -------------- dcplusplus/trunk/client/Client.h dcplusplus/trunk/client/ClientManager.cpp dcplusplus/trunk/client/File.h dcplusplus/trunk/client/version.h Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-03-18 19:34:20 UTC (rev 592) +++ dcplusplus/trunk/client/Client.h 2006-03-18 19:40:59 UTC (rev 593) @@ -107,7 +107,7 @@ short getPort() const { return port; } const string& getAddress() const { return address; } - const string& getIp() const { return (!socket || socket->getIp().empty()) ? getAddress() : socket->getIp(); } + const string& getIp() const { return ip; } string getIpPort() const { return getIp() + ':' + Util::toString(port); } string getLocalIp() const; @@ -192,6 +192,7 @@ string hubUrl; string address; + string ip; u_int16_t port; char separator; bool secure; @@ -200,7 +201,7 @@ // BufferedSocketListener virtual void on(Connecting) throw() { fire(ClientListener::Connecting(), this); } - virtual void on(Connected) throw() { updateActivity(); fire(ClientListener::Connected(), this); } + virtual void on(Connected) throw() { updateActivity(); ip = socket->getIp(); fire(ClientListener::Connected(), this); } }; #endif // !defined(CLIENT_H) Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-03-18 19:34:20 UTC (rev 592) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-03-18 19:40:59 UTC (rev 593) @@ -427,7 +427,7 @@ string& client = *it; for(Client::Iter j = clients.begin(); j != clients.end(); ++j) { Client* c = *j; - if(c->isConnected() && c->getIpPort() == client) { + if(c->isConnected() && c->getHubUrl() == client) { c->search(aSizeMode, aSize, aFileType, aString, aToken); } } Modified: dcplusplus/trunk/client/File.h =================================================================== --- dcplusplus/trunk/client/File.h 2006-03-18 19:34:20 UTC (rev 592) +++ dcplusplus/trunk/client/File.h 2006-03-18 19:40:59 UTC (rev 593) @@ -287,7 +287,7 @@ virtual size_t read(void* buf, size_t& len) throw(FileException) { ssize_t x = ::read(h, buf, len); if(x == -1) - throw("Read error"); + throw FileException("Read error"); len = x; return (size_t)x; } Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-03-18 19:34:20 UTC (rev 592) +++ dcplusplus/trunk/client/version.h 2006-03-18 19:40:59 UTC (rev 593) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.6875" -#define VERSIONFLOAT 0.6875 +#define VERSIONSTRING "0.688" +#define VERSIONFLOAT 0.688 /* Update the .rc file as well... */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-18 19:34:29
|
Revision: 592 Author: arnetheduck Date: 2006-03-18 11:34:20 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=592&view=rev Log Message: ----------- Release preparation Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/help/changelog.html Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-03-18 19:04:20 UTC (rev 591) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-03-18 19:34:20 UTC (rev 592) @@ -933,8 +933,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,8,7 - PRODUCTVERSION 0,6,8,7 + FILEVERSION 0,6,8,8 + PRODUCTVERSION 0,6,8,8 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -951,12 +951,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 8, 7" + VALUE "FileVersion", "0, 6, 8, 8" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 8, 7" + VALUE "ProductVersion", "0, 6, 8, 8" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-03-18 19:04:20 UTC (rev 591) +++ dcplusplus/trunk/Example.xml 2006-03-18 19:34:20 UTC (rev 592) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.6875" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Author="arnetheduck" Version="0.688" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-18 19:04:20 UTC (rev 591) +++ dcplusplus/trunk/changelog.txt 2006-03-18 19:34:20 UTC (rev 592) @@ -1,4 +1,4 @@ --- 0.688 -- +-- 0.688 2006-02-26 -- * Fixed public hubs sorting (thanks pothead) * Fixed a ZPipe issue (thanks jove) * [bug 858] Fixed a 100% cpu / crash bug Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-03-18 19:04:20 UTC (rev 591) +++ dcplusplus/trunk/help/changelog.html 2006-03-18 19:34:20 UTC (rev 592) @@ -13,6 +13,19 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.688 <span style="color: gray;">(2006-02-26)</span></h2> +<ul> + <li>Fixed public hubs sorting (thanks pothead)</li> + <li>Fixed a ZPipe issue (thanks jove)</li> + <li>[bug 858] Fixed a 100% cpu / crash bug</li> + <li>[bug 872] Fixed a pm issue hopefully</li> + <li>[bug 812] Fixed pm's being sent to bots</li> + <li>Files with invalid crc-32, as per their sfv file, are no longer shared</li> + <li>[bug 873] Added connect to hub option (thanks joakim tosteberg)</li> + <li>Fixed an issue with linux file reading (thanks bart vullings and steven)</li> + <li>Added back/forward mouse/keyboard navigation to directory listing frame</li> +</ul> + <h2>0.687 <span style="color: gray;">(2006-02-26)</span></h2> <ul> <li>Fixed XML file list generation for invalid filenames from other os's</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-18 19:04:30
|
Revision: 591 Author: arnetheduck Date: 2006-03-18 11:04:20 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=591&view=rev Log Message: ----------- back/forward navigation, refactor ip getting Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/windows/DirectoryListingFrm.cpp dcplusplus/trunk/windows/DirectoryListingFrm.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/SearchFrm.h dcplusplus/trunk/windows/WinUtil.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/changelog.txt 2006-03-18 19:04:20 UTC (rev 591) @@ -7,6 +7,7 @@ * Files with invalid crc-32, as per their sfv file, are no longer shared * [bug 873] Added connect to hub option (thanks joakim tosteberg) * Fixed an issue with linux file reading (thanks bart vullings and steven) +* Added back/forward mouse/keyboard navigation to directory listing frame -- 0.687 2006-02-26 -- * Fixed XML file list generation for invalid filenames from other os's Modified: dcplusplus/trunk/windows/DirectoryListingFrm.cpp =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-03-18 19:04:20 UTC (rev 591) @@ -38,7 +38,6 @@ static ResourceManager::Strings columnNames[] = { ResourceManager::FILE, ResourceManager::TYPE, ResourceManager::EXACT_SIZE, ResourceManager::SIZE, ResourceManager::TTH_ROOT }; - DirectoryListingFrame::UserMap DirectoryListingFrame::lists; void DirectoryListingFrame::openWindow(const tstring& aFile, const User::Ptr& aUser, int64_t aSpeed) { @@ -76,7 +75,8 @@ } DirectoryListingFrame::DirectoryListingFrame(const User::Ptr& aUser, int64_t aSpeed) : - statusContainer(STATUSCLASSNAME, this, STATUS_MESSAGE_MAP), + statusContainer(STATUSCLASSNAME, this, STATUS_MESSAGE_MAP), treeContainer(WC_TREEVIEW, this, CONTROL_MESSAGE_MAP), + listContainer(WC_LISTVIEW, this, CONTROL_MESSAGE_MAP), historyIndex(0), treeRoot(NULL), skipHits(0), files(0), speed(aSpeed), updating(false), dl(new DirectoryListing(aUser)), searching(false) { lists.insert(make_pair(aUser, this)); @@ -111,7 +111,9 @@ statusContainer.SubclassWindow(ctrlStatus.m_hWnd); ctrlTree.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_DISABLEDRAGDROP, WS_EX_CLIENTEDGE, IDC_DIRECTORIES); + treeContainer.SubclassWindow(ctrlTree); ctrlList.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS, WS_EX_CLIENTEDGE, IDC_FILES); + listContainer.SubclassWindow(ctrlList); ctrlList.SetExtendedListViewStyle(LVS_EX_LABELTIP | LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT); ctrlList.SetBkColor(WinUtil::bgColor); @@ -295,11 +297,20 @@ if(p->itemNew.state & TVIS_SELECTED) { DirectoryListing::Directory* d = (DirectoryListing::Directory*)p->itemNew.lParam; changeDir(d, TRUE); + addHistory(dl->getPath(d)); } return 0; } +void DirectoryListingFrame::addHistory(const string& name) { + history.erase(history.begin() + historyIndex, history.end()); + while(history.size() > 25) + history.pop_front(); + history.push_back(name); + historyIndex = history.size(); +} + void DirectoryListingFrame::changeDir(DirectoryListing::Directory* d, BOOL enableRedraw) { ctrlList.SetRedraw(FALSE); @@ -328,6 +339,25 @@ } } +void DirectoryListingFrame::back() { + if(history.size() > 1 && historyIndex > 1) { + size_t n = min(historyIndex, history.size()) - 1; + deque<string> tmp = history; + selectItem(Text::toT(history[n - 1])); + historyIndex = n; + history = tmp; + } +} +void DirectoryListingFrame::forward() { + if(history.size() > 1 && historyIndex < history.size()) { + size_t n = min(historyIndex, history.size() - 1); + deque<string> tmp = history; + selectItem(Text::toT(history[n])); + historyIndex = n + 1; + history = tmp; + } +} + LRESULT DirectoryListingFrame::onDoubleClickFiles(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { NMITEMACTIVATE* item = (NMITEMACTIVATE*) pnmh; @@ -687,6 +717,18 @@ return FALSE; } +HRESULT DirectoryListingFrame::onXButtonUp(UINT /*uMsg*/, WPARAM wParam, LPARAM /* lParam */, BOOL& /* bHandled */) { + if(GET_XBUTTON_WPARAM(wParam) & XBUTTON1) { + back(); + return TRUE; + } else if(GET_XBUTTON_WPARAM(wParam) & XBUTTON2) { + forward(); + return TRUE; + } + + return FALSE; +} + LRESULT DirectoryListingFrame::onDownloadTarget(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { int newId = wID - IDC_DOWNLOAD_TARGET - 1; dcassert(newId >= 0); Modified: dcplusplus/trunk/windows/DirectoryListingFrm.h =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.h 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/windows/DirectoryListingFrm.h 2006-03-18 19:04:20 UTC (rev 591) @@ -36,7 +36,7 @@ #include "../client/FavoriteManager.h" #define STATUS_MESSAGE_MAP 9 - +#define CONTROL_MESSAGE_MAP 10 class DirectoryListingFrame : public MDITabChildWindowImpl<DirectoryListingFrame, RGB(255, 0, 255)>, public CSplitterImpl<DirectoryListingFrame>, public UCHandler<DirectoryListingFrame> @@ -115,6 +115,8 @@ COMMAND_ID_HANDLER(IDC_NEXT, onNext) COMMAND_ID_HANDLER(IDC_MATCH_QUEUE, onMatchQueue) COMMAND_ID_HANDLER(IDC_FILELIST_DIFF, onListDiff) + ALT_MSG_MAP(CONTROL_MESSAGE_MAP) + MESSAGE_HANDLER(WM_XBUTTONUP, onXButtonUp) END_MSG_MAP() LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); @@ -132,6 +134,7 @@ LRESULT onDoubleClickFiles(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); LRESULT onSelChangedDirectories(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); LRESULT onContextMenu(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& bHandled); + LRESULT onXButtonUp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& bHandled); LRESULT onDownloadFavoriteDirs(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT onDownloadWholeFavoriteDirs(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); @@ -226,6 +229,9 @@ HTREEITEM findFile(const StringSearch& str, HTREEITEM root, int &foundFile, int &skipHits); void updateStatus(); void initStatus(); + void addHistory(const string& name); + void back(); + void forward(); class ItemInfo : public FastAlloc<ItemInfo> { public: @@ -305,9 +311,14 @@ CMenu fileMenu; CMenu directoryMenu; CContainedWindow statusContainer; + CContainedWindow treeContainer; + CContainedWindow listContainer; StringList targets; + deque<string> history; + size_t historyIndex; + CTreeViewCtrl ctrlTree; TypedListViewCtrl<ItemInfo, IDC_FILES> ctrlList; CStatusBarCtrl ctrlStatus; Modified: dcplusplus/trunk/windows/SearchFrm.cpp =================================================================== --- dcplusplus/trunk/windows/SearchFrm.cpp 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/windows/SearchFrm.cpp 2006-03-18 19:04:20 UTC (rev 591) @@ -243,7 +243,7 @@ int n = ctrlHubs.GetItemCount(); for(int i = 0; i < n; i++) { if(ctrlHubs.GetCheckState(i)) { - clients.push_back(Text::fromT(ctrlHubs.getItemData(i)->ipPort)); + clients.push_back(Text::fromT(ctrlHubs.getItemData(i)->url)); } } @@ -1055,7 +1055,7 @@ if (!client->isConnected()) continue; - onHubAdded(new HubInfo(Text::toT(client->getIpPort()), Text::toT(client->getHubName()), client->getMyIdentity().isOp())); + onHubAdded(new HubInfo(Text::toT(client->getHubUrl()), Text::toT(client->getHubName()), client->getMyIdentity().isOp())); } clientMgr->unlock(); @@ -1073,7 +1073,7 @@ int nItem = 0; int n = ctrlHubs.GetItemCount(); for(; nItem < n; nItem++) { - if(ctrlHubs.getItemData(nItem)->ipPort == info->ipPort) + if(ctrlHubs.getItemData(nItem)->url == info->url) break; } if (nItem == n) @@ -1093,7 +1093,7 @@ int nItem = 0; int n = ctrlHubs.GetItemCount(); for(; nItem < n; nItem++) { - if(ctrlHubs.getItemData(nItem)->ipPort == info->ipPort) + if(ctrlHubs.getItemData(nItem)->url == info->url) break; } if (nItem == n) Modified: dcplusplus/trunk/windows/SearchFrm.h =================================================================== --- dcplusplus/trunk/windows/SearchFrm.h 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/windows/SearchFrm.h 2006-03-18 19:04:20 UTC (rev 591) @@ -330,7 +330,7 @@ }; struct HubInfo : public FastAlloc<HubInfo> { - HubInfo(const tstring& aIpPort, const tstring& aName, bool aOp) : ipPort(aIpPort), + HubInfo(const tstring& aUrl, const tstring& aName, bool aOp) : url(aUrl), name(aName), op(aOp) { } const tstring& getText(int col) const { @@ -339,7 +339,7 @@ static int compareItems(HubInfo* a, HubInfo* b, int col) { return (col == 0) ? lstrcmpi(a->name.c_str(), b->name.c_str()) : 0; } - tstring ipPort; + tstring url; tstring name; bool op; }; @@ -436,7 +436,7 @@ LRESULT onItemChangedHub(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); void speak(Speakers s, Client* aClient) { - HubInfo* hubInfo = new HubInfo(Text::toT(aClient->getIpPort()), Text::toT(aClient->getHubName()), aClient->getMyIdentity().isOp()); + HubInfo* hubInfo = new HubInfo(Text::toT(aClient->getHubUrl()), Text::toT(aClient->getHubName()), aClient->getMyIdentity().isOp()); PostMessage(WM_SPEAKER, WPARAM(s), LPARAM(hubInfo)); } }; Modified: dcplusplus/trunk/windows/WinUtil.h =================================================================== --- dcplusplus/trunk/windows/WinUtil.h 2006-03-18 16:14:10 UTC (rev 590) +++ dcplusplus/trunk/windows/WinUtil.h 2006-03-18 19:04:20 UTC (rev 591) @@ -335,6 +335,8 @@ SettingsManager::StrSetting widths, int n, int* indexes, int* sizes) throw(); static bool isShift() { return (GetKeyState(VK_SHIFT) & 0x8000) > 0; } + static bool isAlt() { return (GetKeyState(VK_MENU) & 0x8000) > 0; } + static bool isCtrl() { return (GetKeyState(VK_CONTROL) & 0x8000) > 0; } template<class T> static HWND hiddenCreateEx(T& p) throw() { HWND active = (HWND)::SendMessage(mdiClient, WM_MDIGETACTIVE, 0, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-18 16:14:25
|
Revision: 590 Author: arnetheduck Date: 2006-03-18 08:14:10 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=590&view=rev Log Message: ----------- Hub frame cleanup Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/windows/AboutDlg.h dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/UsersFrame.cpp dcplusplus/trunk/windows/UsersFrame.h dcplusplus/trunk/windows/WinUtil.h Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/Example.xml 2006-03-18 16:14:10 UTC (rev 590) @@ -48,6 +48,7 @@ <String Name="CompressionError">Error during compression</String> <String Name="Configure">&Configure</String> <String Name="Connect">&Connect</String> + <String Name="ConnectFavuserHub">Connect to hub</String> <String Name="Connected">Connected</String> <String Name="Connecting">Connecting...</String> <String Name="ConnectingForced">Connecting (forced)...</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/changelog.txt 2006-03-18 16:14:10 UTC (rev 590) @@ -1,10 +1,12 @@ -- 0.688 -- * Fixed public hubs sorting (thanks pothead) * Fixed a ZPipe issue (thanks jove) -* Fixed a 100% cpu / crash bug +* [bug 858] Fixed a 100% cpu / crash bug * [bug 872] Fixed a pm issue hopefully * [bug 812] Fixed pm's being sent to bots * Files with invalid crc-32, as per their sfv file, are no longer shared +* [bug 873] Added connect to hub option (thanks joakim tosteberg) +* Fixed an issue with linux file reading (thanks bart vullings and steven) -- 0.687 2006-02-26 -- * Fixed XML file list generation for invalid filenames from other os's Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-03-18 16:14:10 UTC (rev 590) @@ -49,6 +49,7 @@ "Error during compression", "&Configure", "&Connect", +"Connect to hub", "Connected", "Connecting...", "Connecting (forced)...", @@ -650,6 +651,7 @@ "CompressionError", "Configure", "Connect", +"ConnectFavuserHub", "Connected", "Connecting", "ConnectingForced", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/client/StringDefs.h 2006-03-18 16:14:10 UTC (rev 590) @@ -52,6 +52,7 @@ COMPRESSION_ERROR, // "Error during compression" CONFIGURE, // "&Configure" CONNECT, // "&Connect" + CONNECT_FAVUSER_HUB, // "Connect to hub" CONNECTED, // "Connected" CONNECTING, // "Connecting..." CONNECTING_FORCED, // "Connecting (forced)..." Modified: dcplusplus/trunk/windows/AboutDlg.h =================================================================== --- dcplusplus/trunk/windows/AboutDlg.h 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/AboutDlg.h 2006-03-18 16:14:10 UTC (rev 590) @@ -41,7 +41,7 @@ _T("theparanoidone, gadget, naga, tremor, joakim tosteberg, pofis, psf8500, lauris ievins, ") _T("defr, ullner, fleetcommand, liny, xan, olle svensson, mark gillespie, jeremy huddleston, ") _T("bsod, sulan, jonathan stone, tim burton, izzzo, guitarm, paka, nils maier, jens oknelid, yoji, ") -_T("krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin, jove. ") +_T("krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin, jove, bart vullings, steven. ") _T("Keep it coming!"); class AboutDlg : public CDialogImpl<AboutDlg>, private HttpConnectionListener Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-03-18 16:14:10 UTC (rev 590) @@ -42,7 +42,6 @@ static ResourceManager::Strings columnNames[] = { ResourceManager::NICK, ResourceManager::SHARED, ResourceManager::DESCRIPTION, ResourceManager::TAG, ResourceManager::CONNECTION, ResourceManager::EMAIL }; - LRESULT HubFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { CreateSimpleStatusBar(ATL_IDS_IDLEMESSAGE, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SBARS_SIZEGRIP); @@ -337,32 +336,30 @@ LRESULT HubFrame::onCopyNick(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { int i=-1; - if(client->isConnected()) { - string nicks; + string nicks; - while( (i = ctrlUsers.GetNextItem(i, LVNI_SELECTED)) != -1) { - nicks += (ctrlUsers.getItemData(i))->getIdentity().getNick(); - nicks += ' '; - } - if(!nicks.empty()) { - // remove last space - nicks.erase(nicks.length() - 1); - WinUtil::setClipboard(Text::toT(nicks)); - } + while( (i = ctrlUsers.GetNextItem(i, LVNI_SELECTED)) != -1) { + nicks += (ctrlUsers.getItemData(i))->getIdentity().getNick(); + nicks += ' '; } + if(!nicks.empty()) { + // remove last space + nicks.erase(nicks.length() - 1); + WinUtil::setClipboard(Text::toT(nicks)); + } return 0; } LRESULT HubFrame::onDoubleClickUsers(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { NMITEMACTIVATE* item = (NMITEMACTIVATE*)pnmh; - if(client->isConnected() && item->iItem != -1) { + if(item->iItem != -1) { ctrlUsers.getItemData(item->iItem)->getList(); } return 0; } -bool HubFrame::updateUser(const UpdateInfo& u) { +bool HubFrame::updateUser(const UserTask& u) { UserMapIter i = userMap.find(u.user); if(i == userMap.end()) { UserInfo* ui = new UserInfo(u); @@ -433,97 +430,91 @@ return needsSort; } -LRESULT HubFrame::onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { - if(wParam == UPDATE_USERS) { - ctrlUsers.SetRedraw(FALSE); - { - Lock l(updateCS); - for(UpdateIter i = updateList.begin(); i != updateList.end(); ++i) { - UpdateInfo& u = i->first; - switch(i->second) { - case UPDATE_USER: - if(updateUser(u)) { - if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) { - addLine(_T("*** ") + TSTRING(JOINS) + Text::toT(u.identity.getNick())); - } - } - break; - case UPDATE_USERS: - updateUser(u); - break; - case REMOVE_USER: - removeUser(u.user); - if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) { - addLine(Text::toT("*** " + STRING(PARTS) + u.identity.getNick())); - } +static const COLORREF RED = RGB(255, 0, 0); +static const COLORREF GREEN = RGB(0, 255, 0); - break; - } - } - updateList.clear(); - } +LRESULT HubFrame::onSpeaker(UINT /*uMsg*/, WPARAM /* wParam */, LPARAM /* lParam */, BOOL& /*bHandled*/) { + TaskList t; + { + Lock l(taskCS); + taskList.swap(t); + } - if(resort && showUsers) { - ctrlUsers.resort(); - resort = false; - } + ctrlUsers.SetRedraw(FALSE); - ctrlUsers.SetRedraw(TRUE); - } else if(wParam == DISCONNECTED) { - clearUserList(); - setTabColor(RGB(255, 0, 0)); - } else if(wParam == CONNECTED) { - addClientLine(TSTRING(CONNECTED)); - setTabColor(RGB(0, 255, 0)); - } else if(wParam == ADD_CHAT_LINE) { - tstring* x = (tstring*)lParam; - addLine(*x); - delete x; - } else if(wParam == ADD_STATUS_LINE) { - tstring* x = (tstring*)lParam; - addClientLine(*x); - delete x; - } else if(wParam == ADD_SILENT_STATUS_LINE) { - tstring* x = (tstring*)lParam; - addClientLine(*x, false); - delete x; - } else if(wParam == SET_WINDOW_TITLE) { - tstring* x = (tstring*)lParam; - SetWindowText(x->c_str()); - delete x; - } else if(wParam == STATS) { - ctrlStatus.SetText(1, Text::toT(Util::toString(getUserCount()) + " " + STRING(HUB_USERS)).c_str()); - ctrlStatus.SetText(2, Text::toT(Util::formatBytes(getAvailable())).c_str()); - } else if(wParam == GET_PASSWORD) { - if(client->getPassword().size() > 0) { - client->password(client->getPassword()); - addClientLine(TSTRING(STORED_PASSWORD_SENT)); - } else { - ctrlMessage.SetWindowText(_T("/password ")); - ctrlMessage.SetFocus(); - ctrlMessage.SetSel(10, 10); - waitingForPW = true; - } - } else if(wParam == PRIVATE_MESSAGE) { - PMInfo* i = (PMInfo*)lParam; - if(i->replyTo->isOnline()) { - if(BOOLSETTING(POPUP_PMS) || PrivateFrame::isOpen(i->replyTo)) { - PrivateFrame::gotMessage(i->from, i->to, i->replyTo, i->msg); + for(TaskIter i = t.begin(); i != t.end(); ++i) { + Task* task = *i; + if(task->speaker == UPDATE_USER) { + updateUser(*static_cast<UserTask*>(task)); + } else if(task->speaker == UPDATE_USER_JOIN) { + UserTask& u = *static_cast<UserTask*>(task); + if(updateUser(u)) { + if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) { + addLine(_T("*** ") + TSTRING(JOINS) + Text::toT(u.identity.getNick())); + } + } + } else if(task->speaker == REMOVE_USER) { + UserTask& u = *static_cast<UserTask*>(task); + removeUser(u.user); + if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) { + addLine(Text::toT("*** " + STRING(PARTS) + u.identity.getNick())); + } + } else if(task->speaker == CONNECTED) { + addClientLine(TSTRING(CONNECTED)); + setTabColor(GREEN); + } else if(task->speaker == DISCONNECTED) { + clearUserList(); + setTabColor(RED); + } else if(task->speaker == ADD_CHAT_LINE) { + addLine(static_cast<StringTask*>(task)->msg); + } else if(task->speaker == ADD_STATUS_LINE) { + addClientLine(static_cast<StringTask*>(task)->msg); + } else if(task->speaker == ADD_SILENT_STATUS_LINE) { + addClientLine(static_cast<StringTask*>(task)->msg, false); + } else if(task->speaker == SET_WINDOW_TITLE) { + SetWindowText(static_cast<StringTask*>(task)->msg.c_str()); + } else if(task->speaker == STATS) { + ctrlStatus.SetText(1, Text::toT(Util::toString(getUserCount()) + " " + STRING(HUB_USERS)).c_str()); + ctrlStatus.SetText(2, Text::toT(Util::formatBytes(getAvailable())).c_str()); + } else if(task->speaker == GET_PASSWORD) { + if(client->getPassword().size() > 0) { + client->password(client->getPassword()); + addClientLine(TSTRING(STORED_PASSWORD_SENT)); } else { - addLine(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(i->from) + _T(": ") + i->msg); + ctrlMessage.SetWindowText(_T("/password ")); + ctrlMessage.SetFocus(); + ctrlMessage.SetSel(10, 10); + waitingForPW = true; } - } else { - if(BOOLSETTING(IGNORE_OFFLINE)) { - addClientLine(TSTRING(IGNORED_MESSAGE) + i->msg, false); - } else if(BOOLSETTING(POPUP_OFFLINE)) { - PrivateFrame::gotMessage(i->from, i->to, i->replyTo, i->msg); + } else if(task->speaker == PRIVATE_MESSAGE) { + PMTask& pm = *static_cast<PMTask*>(task); + if(pm.replyTo->isOnline()) { + if(BOOLSETTING(POPUP_PMS) || PrivateFrame::isOpen(pm.replyTo)) { + PrivateFrame::gotMessage(pm.from, pm.to, pm.replyTo, pm.msg); + } else { + addLine(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(pm.from) + _T(": ") + pm.msg); + } } else { - addLine(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(i->from) + _T(": ") + i->msg); + if(BOOLSETTING(IGNORE_OFFLINE)) { + addClientLine(TSTRING(IGNORED_MESSAGE) + pm.msg, false); + } else if(BOOLSETTING(POPUP_OFFLINE)) { + PrivateFrame::gotMessage(pm.from, pm.to, pm.replyTo, pm.msg); + } else { + addLine(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(pm.from) + _T(": ") + pm.msg); + } } } - delete i; + + delete task; } + if(resort && showUsers) { + ctrlUsers.resort(); + resort = false; + } + + ctrlUsers.SetRedraw(TRUE); + return 0; } @@ -590,6 +581,8 @@ FavoriteManager::getInstance()->removeUserCommand(Text::fromT(server)); clearUserList(); + clearTaskList(); + WinUtil::saveHeaderOrder(ctrlUsers, SettingsManager::HUBFRAME_ORDER, SettingsManager::HUBFRAME_WIDTHS, COLUMN_LAST, columnIndexes, columnSizes); @@ -619,18 +612,19 @@ } void HubFrame::clearUserList() { - { - Lock l(updateCS); - updateList.clear(); - } - for(UserMapIter i = userMap.begin(); i != userMap.end(); ++i) { delete i->second; } - ctrlUsers.DeleteAllItems(); userMap.clear(); + ctrlUsers.DeleteAllItems(); } +void HubFrame::clearTaskList() { + Lock l(taskCS); + for_each(taskList.begin(), taskList.end(), DeleteFunction()); + taskList.clear(); +} + LRESULT HubFrame::onLButton(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { HWND focus = GetFocus(); bHandled = false; @@ -1068,6 +1062,7 @@ client->removeListener(this); ClientManager::getInstance()->putClient(client); clearUserList(); + clearTaskList(); client = ClientManager::getInstance()->getClient(Text::fromT(server)); client->addListener(this); client->connect(); @@ -1077,7 +1072,7 @@ LRESULT HubFrame::onEnterUsers(int /*idCtrl*/, LPNMHDR /* pnmh */, BOOL& /*bHandled*/) { int item = ctrlUsers.GetNextItem(-1, LVNI_FOCUSED); - if(client->isConnected() && (item != -1)) { + if(item != -1) { try { QueueManager::getInstance()->addList((ctrlUsers.getItemData(item))->user, QueueItem::FLAG_CLIENT_VIEW); } catch(const Exception& e) { @@ -1138,7 +1133,7 @@ updateStatusBar(); if(updateUsers) { updateUsers = false; - PostMessage(WM_SPEAKER, UPDATE_USERS); + PostMessage(WM_SPEAKER); } } @@ -1153,18 +1148,15 @@ client->setPassword(Util::emptyString); } void HubFrame::on(UserUpdated, Client*, const OnlineUser& user) throw() { - speak(UPDATE_USER, user); + speak(UPDATE_USER_JOIN, user); } void HubFrame::on(UsersUpdated, Client*, const OnlineUser::List& aList) throw() { - Lock l(updateCS); - updateList.reserve(aList.size()); + Lock l(taskCS); + taskList.reserve(aList.size()); for(OnlineUser::List::const_iterator i = aList.begin(); i != aList.end(); ++i) { - if(!(*i)->getIdentity().isHidden()) - updateList.push_back(make_pair(UpdateInfo(*(*i)), UPDATE_USERS)); + taskList.push_back(new UserTask(UPDATE_USER, *(*i))); } - if(!updateList.empty()) { - PostMessage(WM_SPEAKER, UPDATE_USERS); - } + updateUsers = true; } void HubFrame::on(UserRemoved, Client*, const OnlineUser& user) throw() { @@ -1213,11 +1205,10 @@ } void HubFrame::on(PrivateMessage, Client*, const OnlineUser& from, const OnlineUser& to, const OnlineUser& replyTo, const string& line) throw() { - speak(PRIVATE_MESSAGE, from, to, replyTo, Util::toDOS("<" + from.getIdentity().getNick() + "> " + line)); + speak(from, to, replyTo, Util::toDOS("<" + from.getIdentity().getNick() + "> " + line)); } void HubFrame::on(NickTaken, Client*) throw() { speak(ADD_STATUS_LINE, STRING(NICK_TAKEN)); - speak(DISCONNECTED); } void HubFrame::on(SearchFlood, Client*, const string& line) throw() { speak(ADD_STATUS_LINE, STRING(SEARCH_SPAM_FROM) + line); Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/HubFrame.h 2006-03-18 16:14:10 UTC (rev 590) @@ -132,6 +132,7 @@ LRESULT OnFileReconnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { client->disconnect(false); clearUserList(); + clearTaskList(); client->connect(); return 0; } @@ -150,7 +151,7 @@ TypedListViewCtrl<UserInfo, IDC_USERS>& getUserList() { return ctrlUsers; } private: - enum Speakers { UPDATE_USER, UPDATE_USERS, REMOVE_USER, ADD_CHAT_LINE, + enum Speakers { UPDATE_USER_JOIN, UPDATE_USER, REMOVE_USER, ADD_CHAT_LINE, ADD_STATUS_LINE, ADD_SILENT_STATUS_LINE, SET_WINDOW_TITLE, GET_PASSWORD, PRIVATE_MESSAGE, STATS, CONNECTED, DISCONNECTED }; @@ -170,18 +171,35 @@ COLUMN_LAST }; - struct UpdateInfo { - UpdateInfo() { } - UpdateInfo(const OnlineUser& ou) : user(ou.getUser()), identity(ou.getIdentity()) { } + struct Task { + Task(Speakers speaker_) : speaker(speaker_) { } + virtual ~Task() { } + Speakers speaker; + }; + struct UserTask : public Task { + UserTask(Speakers speaker_, const OnlineUser& ou) : Task(speaker_), user(ou.getUser()), identity(ou.getIdentity()) { } + User::Ptr user; Identity identity; }; + struct StringTask : public Task { + StringTask(Speakers speaker_, const tstring& msg_) : Task(speaker_), msg(msg_) { } + tstring msg; + }; + + struct PMTask : public StringTask { + PMTask(const User::Ptr& from_, const User::Ptr& to_, const User::Ptr& replyTo_, const tstring& m) : StringTask(PRIVATE_MESSAGE, m), from(from_), to(to_), replyTo(replyTo_) { } + User::Ptr from; + User::Ptr to; + User::Ptr replyTo; + }; + friend struct CompareItems; class UserInfo : public UserInfoBase, public FastAlloc<UserInfo> { public: - UserInfo(const UpdateInfo& u) : UserInfoBase(u.user) { + UserInfo(const UserTask& u) : UserInfoBase(u.user) { update(u.identity, -1); } @@ -209,14 +227,6 @@ GETSET(Identity, identity, Identity); }; - class PMInfo { - public: - PMInfo(const User::Ptr& from_, const User::Ptr& to_, const User::Ptr& replyTo_, const string& m) : from(from_), to(to_), replyTo(replyTo_), msg(Text::toT(m)) { } - User::Ptr from; - User::Ptr to; - User::Ptr replyTo; - tstring msg; - }; HubFrame(const tstring& aServer) : waitingForPW(false), extraSort(false), server(aServer), closed(false), @@ -231,11 +241,13 @@ } virtual ~HubFrame() { + ClientManager::getInstance()->putClient(client); + dcassert(frames.find(server) != frames.end()); dcassert(frames[server] == this); frames.erase(server); - ClientManager::getInstance()->putClient(client); + clearTaskList(); } typedef HASH_MAP<tstring, HubFrame*> FrameMap; @@ -272,7 +284,7 @@ if (ctrlUsers.GetSelectedCount() > 1) { return ctrlUsers.forEachSelectedT(CountAvailable()).available; } else - return client->getAvailable(); + return ctrlUsers.forEachT(CountAvailable()).available; } const tstring& getNick(const User::Ptr& u); @@ -299,14 +311,14 @@ TStringMap tabParams; bool tabMenuShown; - typedef vector<pair<UpdateInfo, Speakers> > UpdateList; - typedef UpdateList::iterator UpdateIter; + typedef vector<Task*> TaskList; + typedef TaskList::iterator TaskIter; typedef HASH_MAP<User::Ptr, UserInfo*, User::HashFunction> UserMap; typedef UserMap::iterator UserMapIter; UserMap userMap; - UpdateList updateList; - CriticalSection updateCS; + TaskList taskList; + CriticalSection taskCS; bool updateUsers; bool resort; @@ -318,7 +330,7 @@ static int columnIndexes[COLUMN_LAST]; static int columnSizes[COLUMN_LAST]; - bool updateUser(const UpdateInfo& u); + bool updateUser(const UserTask& u); void removeUser(const User::Ptr& aUser); UserInfo* findUser(const tstring& nick); @@ -327,13 +339,11 @@ void removeFavoriteHub(); void clearUserList(); + void clearTaskList(); int getImage(const Identity& u); - void updateStatusBar() { - if(m_hWnd) - PostMessage(WM_SPEAKER, STATS); - } + void updateStatusBar() { if(m_hWnd) speak(STATS); } // TimerManagerListener virtual void on(TimerManagerListener::Second, DWORD /*aTick*/) throw(); @@ -355,15 +365,10 @@ virtual void on(NickTaken, Client*) throw(); virtual void on(SearchFlood, Client*, const string&) throw(); - void speak(Speakers s) { PostMessage(WM_SPEAKER, (WPARAM)s); } - void speak(Speakers s, const string& msg) { PostMessage(WM_SPEAKER, (WPARAM)s, (LPARAM)new tstring(Text::toT(msg))); } - void speak(Speakers s, const OnlineUser& u) { - Lock l(updateCS); - updateList.push_back(make_pair(UpdateInfo(u), s)); - updateUsers = true; - } - void speak(Speakers s, const OnlineUser& from, const OnlineUser& to, const OnlineUser& replyTo, const string& line) { PostMessage(WM_SPEAKER, (WPARAM)s, (LPARAM)new PMInfo(from, to, replyTo, line)); } - + void speak(Speakers s) { Lock l(taskCS); taskList.push_back(new Task(s)); PostMessage(WM_SPEAKER); } + void speak(Speakers s, const string& msg) { Lock l(taskCS); taskList.push_back(new StringTask(s, Text::toT(msg))); PostMessage(WM_SPEAKER); } + void speak(Speakers s, const OnlineUser& u) { Lock l(taskCS); taskList.push_back(new UserTask(s, u)); updateUsers = true; } + void speak(const OnlineUser& from, const OnlineUser& to, const OnlineUser& replyTo, const string& line) { Lock l(taskCS); taskList.push_back(new PMTask(from, to, replyTo, Text::toT(line))); } }; #endif // !defined(HUB_FRAME_H) Modified: dcplusplus/trunk/windows/UsersFrame.cpp =================================================================== --- dcplusplus/trunk/windows/UsersFrame.cpp 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/UsersFrame.cpp 2006-03-18 16:14:10 UTC (rev 590) @@ -27,6 +27,8 @@ #include "LineDlg.h" +#include "HubFrame.h" + int UsersFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_HUB, COLUMN_SEEN, COLUMN_DESCRIPTION }; int UsersFrame::columnSizes[] = { 200, 300, 150, 200 }; static ResourceManager::Strings columnNames[] = { ResourceManager::AUTO_GRANT, ResourceManager::LAST_HUB, ResourceManager::LAST_SEEN, ResourceManager::DESCRIPTION }; @@ -147,8 +149,21 @@ FavoriteManager::getInstance()->setAutoGrant(ctrlUsers.getItemData(l->iItem)->user, ctrlUsers.GetCheckState(l->iItem) != FALSE); } return 0; -} +} +LRESULT UsersFrame::onConnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { + for(int i = 0; i < ctrlUsers.GetItemCount(); ++i) { + UserInfo *ui = ctrlUsers.getItemData(i); + FavoriteManager::FavoriteMap favUsers = FavoriteManager::getInstance()->getFavoriteUsers(); + const FavoriteUser u = favUsers.find(ui->user->getCID())->second; + if(u.getUrl().length() > 0) + { + HubFrame::openWindow(Text::toT(u.getUrl())); + } + } + return 0; +} + void UsersFrame::addUser(const FavoriteUser& aUser) { int i = ctrlUsers.insertItem(new UserInfo(aUser), 0); bool b = aUser.isSet(FavoriteUser::FLAG_GRANTSLOT); Modified: dcplusplus/trunk/windows/UsersFrame.h =================================================================== --- dcplusplus/trunk/windows/UsersFrame.h 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/UsersFrame.h 2006-03-18 16:14:10 UTC (rev 590) @@ -52,6 +52,7 @@ MESSAGE_HANDLER(WM_SETFOCUS, onSetFocus) COMMAND_ID_HANDLER(IDC_REMOVE, onRemove) COMMAND_ID_HANDLER(IDC_EDIT, onEdit) + COMMAND_ID_HANDLER(IDC_CONNECT, onConnect) CHAIN_MSG_MAP(uibBase) CHAIN_MSG_MAP(baseClass) END_MSG_MAP() @@ -62,6 +63,7 @@ LRESULT onEdit(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); LRESULT onItemChanged(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/); LRESULT onContextMenu(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/); + LRESULT onConnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); void UpdateLayout(BOOL bResizeBars = TRUE); Modified: dcplusplus/trunk/windows/WinUtil.h =================================================================== --- dcplusplus/trunk/windows/WinUtil.h 2006-03-17 22:57:48 UTC (rev 589) +++ dcplusplus/trunk/windows/WinUtil.h 2006-03-18 16:14:10 UTC (rev 590) @@ -125,6 +125,7 @@ menu.AppendMenu(MF_STRING, IDC_ADD_TO_FAVORITES, CTSTRING(ADD_TO_FAVORITES)); menu.AppendMenu(MF_STRING, IDC_GRANTSLOT, CTSTRING(GRANT_EXTRA_SLOT)); menu.AppendMenu(MF_STRING, IDC_REMOVEALL, CTSTRING(REMOVE_FROM_ALL)); + menu.AppendMenu(MF_STRING, IDC_CONNECT, CTSTRING(CONNECT_FAVUSER_HUB)); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-17 22:58:09
|
Revision: 589 Author: arnetheduck Date: 2006-03-17 14:57:48 -0800 (Fri, 17 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=589&view=rev Log Message: ----------- sfv check added to hashing Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/HashManager.cpp dcplusplus/trunk/client/HashManager.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/Example.xml 2006-03-17 22:57:48 UTC (rev 589) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.687" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Author="arnetheduck" Version="0.6875" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> @@ -278,6 +278,7 @@ <String Name="Nick">Nick</String> <String Name="NickTaken">Your nick was already taken, please change to something else!</String> <String Name="NickUnknown"> (Nick unknown)</String> + <String Name="NoCrc32Match"> not shared; calculated CRC32 does not match the one found in SFV file.</String> <String Name="NoStr">No</String> <String Name="NoDirectorySpecified">No directory specified</String> <String Name="NoDownloadsFromSelf">You're trying to download from yourself!</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/changelog.txt 2006-03-17 22:57:48 UTC (rev 589) @@ -4,6 +4,7 @@ * Fixed a 100% cpu / crash bug * [bug 872] Fixed a pm issue hopefully * [bug 812] Fixed pm's being sent to bots +* Files with invalid crc-32, as per their sfv file, are no longer shared -- 0.687 2006-02-26 -- * Fixed XML file list generation for invalid filenames from other os's Modified: dcplusplus/trunk/client/HashManager.cpp =================================================================== --- dcplusplus/trunk/client/HashManager.cpp 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/client/HashManager.cpp 2006-03-17 22:57:48 UTC (rev 589) @@ -24,6 +24,8 @@ #include "SimpleXML.h" #include "LogManager.h" #include "File.h" +#include "ZUtils.h" +#include "SFVReader.h" #define HASH_FILE_VERSION_STRING "2" static const u_int32_t HASH_FILE_VERSION=2; @@ -438,7 +440,7 @@ #define BUF_SIZE (256*1024) #ifdef _WIN32 -bool HashManager::Hasher::fastHash(const string& fname, u_int8_t* buf, TigerTree& tth, int64_t size) { +bool HashManager::Hasher::fastHash(const string& fname, u_int8_t* buf, TigerTree& tth, int64_t size, CRC32Filter* xcrc32) { HANDLE h = INVALID_HANDLE_VALUE; DWORD x, y; if(!GetDiskFreeSpace(Text::toT(Util::getFilePath(fname)).c_str(), &y, &x, &y, &y)) { @@ -503,8 +505,13 @@ } tth.update(hbuf, hn); - total -= hn; + if(xcrc32) (*xcrc32)(hbuf, hn); + { + Lock l(cs); + currentSize = max(currentSize - hn, _LL(0)); + } + if(size == 0) { ok = true; break; @@ -560,7 +567,8 @@ { Lock l(cs); if(!w.empty()) { - file = fname = w.begin()->first; + currentFile = fname = w.begin()->first; + currentSize = w.begin()->second; w.erase(w.begin()); last = w.empty(); } else { @@ -586,18 +594,24 @@ try { File f(fname, File::READ, File::OPEN); int64_t bs = max(TigerTree::calcBlockSize(f.getSize(), 10), MIN_BLOCK_SIZE); -#ifdef _WIN32 u_int32_t start = GET_TICK(); -#endif u_int32_t timestamp = f.getLastModified(); TigerTree slowTTH(bs); TigerTree* tth = &slowTTH; + + CRC32Filter crc32; + SFVReader sfv(fname); + CRC32Filter* xcrc32 = 0; + if(sfv.hasCRC()) + xcrc32 = &crc32; + size_t n = 0; #ifdef _WIN32 TigerTree fastTTH(bs); tth = &fastTTH; - if(!virtualBuf || !fastHash(fname, buf, fastTTH, size)) { + if(!virtualBuf || !fastHash(fname, buf, fastTTH, size, xcrc32)) { tth = &slowTTH; + crc32 = CRC32Filter(); #endif u_int32_t lastRead = GET_TICK(); @@ -612,8 +626,12 @@ } n = f.read(buf, bufSize); tth->update(buf, n); + if(xcrc32) (*xcrc32)(buf, n); - total -= n; + { + Lock l(cs); + currentSize = max(currentSize - n, _LL(0)); + } sizeLeft -= n; } while (n > 0 && !stop); #ifdef _WIN32 @@ -623,22 +641,25 @@ #endif f.close(); tth->finalize(); -#ifdef _WIN32 u_int32_t end = GET_TICK(); int64_t speed = 0; if(end > start) { - speed = size * 1000LL / (end - start); + speed = size * _LL(1000) / (end - start); } -#else - int64_t speed = 0; -#endif - HashManager::getInstance()->hashDone(fname, timestamp, *tth, speed); + if(xcrc32 && xcrc32->getValue() != sfv.getCRC()) { + LogManager::getInstance()->message(fname + STRING(NO_CRC32_MATCH)); + } else { + HashManager::getInstance()->hashDone(fname, timestamp, *tth, speed); + } } catch(const FileException& e) { LogManager::getInstance()->message(STRING(ERROR_HASHING) + fname + ": " + e.getError()); } - - total -= sizeLeft; } + { + Lock l(cs); + currentFile.clear(); + currentSize = 0; + } running = false; if(buf != NULL && (last || stop)) { if(virtualBuf) { Modified: dcplusplus/trunk/client/HashManager.h =================================================================== --- dcplusplus/trunk/client/HashManager.h 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/client/HashManager.h 2006-03-17 22:57:48 UTC (rev 589) @@ -35,6 +35,7 @@ STANDARD_EXCEPTION(HashException); class File; +class CRC32Filter; class HashManagerListener { public: @@ -117,13 +118,12 @@ class Hasher : public Thread { public: - Hasher() : stop(false), running(false), rebuild(false), total(0) { } + Hasher() : stop(false), running(false), rebuild(false), currentSize(0) { } void hashFile(const string& fileName, int64_t size) { Lock l(cs); if(w.insert(make_pair(fileName, size)).second) { s.signal(); - total += size; } } @@ -131,7 +131,6 @@ Lock l(cs); for(WorkIter i = w.begin(); i != w.end(); ) { if(Util::strnicmp(baseDir, i->first, baseDir.length()) == 0) { - total -= i->second; w.erase(i++); } else { ++i; @@ -141,18 +140,19 @@ virtual int run(); #ifdef _WIN32 - bool fastHash(const string& fname, u_int8_t* buf, TigerTree& tth, int64_t size); + bool fastHash(const string& fname, u_int8_t* buf, TigerTree& tth, int64_t size, CRC32Filter* xcrc32); #endif void getStats(string& curFile, int64_t& bytesLeft, size_t& filesLeft) { Lock l(cs); - curFile = file; + curFile = currentFile; filesLeft = w.size(); if(running) filesLeft++; - // Just in case... - if(total < 0) - total = 0; - bytesLeft = total; + bytesLeft = 0; + for(WorkMap::const_iterator i = w.begin(); i != w.end(); ++i) { + bytesLeft += i->second; + } + bytesLeft += currentSize; } void shutdown() { stop = true; @@ -176,8 +176,8 @@ bool stop; bool running; bool rebuild; - int64_t total; - string file; + string currentFile; + int64_t currentSize; }; friend class Hasher; Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-03-17 22:57:48 UTC (rev 589) @@ -279,6 +279,7 @@ "Nick", "Your nick was already taken, please change to something else!", " (Nick unknown)", +" not shared; calculated CRC32 does not match the one found in SFV file.", "No", "No directory specified", "You're trying to download from yourself!", @@ -879,6 +880,7 @@ "Nick", "NickTaken", "NickUnknown", +"NoCrc32Match", "NoStr", "NoDirectorySpecified", "NoDownloadsFromSelf", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-03-16 22:49:30 UTC (rev 588) +++ dcplusplus/trunk/client/StringDefs.h 2006-03-17 22:57:48 UTC (rev 589) @@ -282,6 +282,7 @@ NICK, // "Nick" NICK_TAKEN, // "Your nick was already taken, please change to something else!" NICK_UNKNOWN, // " (Nick unknown)" + NO_CRC32_MATCH, // " not shared; calculated CRC32 does not match the one found in SFV file." NO_STR, // "No" NO_DIRECTORY_SPECIFIED, // "No directory specified" NO_DOWNLOADS_FROM_SELF, // "You're trying to download from yourself!" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-16 22:49:53
|
Revision: 588 Author: arnetheduck Date: 2006-03-16 14:49:30 -0800 (Thu, 16 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=588&view=rev Log Message: ----------- A few small fixes Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/version.h dcplusplus/trunk/help/changelog.html dcplusplus/trunk/windows/PrivateFrame.cpp dcplusplus/trunk/windows/WaitingUsersFrame.cpp Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/changelog.txt 2006-03-16 22:49:30 UTC (rev 588) @@ -1,4 +1,11 @@ --- 0.687 2006-02-26 -- +-- 0.688 -- +* Fixed public hubs sorting (thanks pothead) +* Fixed a ZPipe issue (thanks jove) +* Fixed a 100% cpu / crash bug +* [bug 872] Fixed a pm issue hopefully +* [bug 812] Fixed pm's being sent to bots + +-- 0.687 2006-02-26 -- * Fixed XML file list generation for invalid filenames from other os's * Fixed a rare refresh crash * CID is now shown if no nick name is currently available for a user Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-03-16 22:49:30 UTC (rev 588) @@ -42,7 +42,7 @@ BufferedSocket::~BufferedSocket() throw() { delete sock; - if (filterIn) delete filterIn; + delete filterIn; sockets--; } Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-03-16 22:49:30 UTC (rev 588) @@ -93,6 +93,8 @@ getMyIdentity().setHubUrl(getHubUrl()); } else { p = ClientManager::getInstance()->getUser(aNick, getHubUrl()); + // In NMDC, everyone's a bot until they show a good myinfo + p->setFlag(User::BOT); } { @@ -317,6 +319,8 @@ OnlineUser& u = getUser(nick); + u.getUser()->unsetFlag(User::BOT); + j = param.find('$', i); if(j == string::npos) return; Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/client/version.h 2006-03-16 22:49:30 UTC (rev 588) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.687" -#define VERSIONFLOAT 0.687 +#define VERSIONSTRING "0.6875" +#define VERSIONFLOAT 0.6875 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/help/changelog.html 2006-03-16 22:49:30 UTC (rev 588) @@ -13,6 +13,25 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.687 <span style="color: gray;">(2006-02-26)</span></h2> +<ul> + <li>Fixed XML file list generation for invalid filenames from other os's</li> + <li>Fixed a rare refresh crash</li> + <li>CID is now shown if no nick name is currently available for a user</li> + <li>Fixed another crash when loading file lists</li> + <li>Played some more with bufferedsocket performance</li> + <li>Fixed some VS 2005 issues (thanks trem)</li> + <li>Installer now removes old unicows library</li> + <li>Updated to yaSSL 1.1.5</li> + <li>Added possiblity to sort transfer view by all downloads first (thanks guitarm)</li> + <li>Some cleanup for frame creation (thanks martin)</li> + <li>Fixed some translation strings (thanks fleetcommand)</li> + <li>Fixed some finished transfers frames issues (thanks trem)</li> + <li>/pm and and a few other things work without user list in hub frame</li> + <li>Added support for the ZPipe extension (test version) (thanks jove)</li> + <li>Moved to subversion, CVS will no longer be maintained</li> +</ul> + <h2>0.686 <span style="color: gray;">(2006-02-13)</span></h2> <ul> <li>Fixed active search (oops)</li> Modified: dcplusplus/trunk/windows/PrivateFrame.cpp =================================================================== --- dcplusplus/trunk/windows/PrivateFrame.cpp 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/windows/PrivateFrame.cpp 2006-03-16 22:49:30 UTC (rev 588) @@ -71,7 +71,7 @@ void PrivateFrame::gotMessage(const User::Ptr& from, const User::Ptr& to, const User::Ptr& replyTo, const tstring& aMessage) { PrivateFrame* p = NULL; - const User::Ptr& user = (from == ClientManager::getInstance()->getMe()) ? to : replyTo; + const User::Ptr& user = (replyTo == ClientManager::getInstance()->getMe()) ? to : replyTo; FrameIter i = frames.find(user); if(i == frames.end()) { Modified: dcplusplus/trunk/windows/WaitingUsersFrame.cpp =================================================================== --- dcplusplus/trunk/windows/WaitingUsersFrame.cpp 2006-03-08 22:45:13 UTC (rev 587) +++ dcplusplus/trunk/windows/WaitingUsersFrame.cpp 2006-03-16 22:49:30 UTC (rev 588) @@ -181,7 +181,6 @@ LRESULT WaitingUsersFrame::onAddToFavorites(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { User::Ptr user = getSelectedUser(); if (user) { - User::Ptr user = user; FavoriteManager::getInstance()->addFavoriteUser(user); } return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-03-08 22:45:29
|
Revision: 587 Author: arnetheduck Date: 2006-03-08 14:45:13 -0800 (Wed, 08 Mar 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=587&view=rev Log Message: ----------- mem bug fixed, a few other minor things Modified Paths: -------------- dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/client/Util.h dcplusplus/trunk/windows/ExListViewCtrl.h dcplusplus/trunk/windows/PublicHubsFrm.cpp Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-03-08 22:45:13 UTC (rev 587) @@ -180,6 +180,7 @@ string::size_type pos = 0; AutoArray<u_int8_t> buffer (BufSize); size_t in; + l = line; // decompress all input data and store in l. while (left) { in = BufSize; @@ -200,7 +201,7 @@ l.erase (0, pos + 1 /* seperator char */); } // store remainder - line += l; + line = l; break; } Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-03-08 22:45:13 UTC (rev 587) @@ -1048,13 +1048,13 @@ void QueueManager::removeSource(User::Ptr& aUser, int reason) throw() { string x; - StringList removeList; + string removeRunning; { Lock l(cs); QueueItem* qi = NULL; while( (qi = userQueue.getNext(aUser, QueueItem::PAUSED)) != NULL) { if(qi->isSet(QueueItem::FLAG_USER_LIST)) { - removeList.push_back(qi->getTarget()); + remove(qi->getTarget()); } else { userQueue.remove(qi, aUser); qi->removeSource(aUser, reason); @@ -1066,7 +1066,7 @@ qi = userQueue.getRunning(aUser); if(qi != NULL) { if(qi->isSet(QueueItem::FLAG_USER_LIST)) { - removeList.push_back(qi->getTarget()); + removeRunning = qi->getTarget(); } else { userQueue.setWaiting(qi); userQueue.remove(qi, aUser); @@ -1081,8 +1081,8 @@ if(!x.empty()) { DownloadManager::getInstance()->abortDownload(x); } - for(StringIter i = removeList.begin(); i != removeList.end(); ++i) { - remove(*i); + if(!removeRunning.empty()) { + remove(removeRunning); } } Modified: dcplusplus/trunk/client/Util.cpp =================================================================== --- dcplusplus/trunk/client/Util.cpp 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/client/Util.cpp 2006-03-08 22:45:13 UTC (rev 587) @@ -393,6 +393,24 @@ return buf; } +double Util::toBytes(TCHAR* aSize) { + double bytes = _tstof(aSize); + + if (_tcsstr(aSize, CTSTRING(PIB))) { + return bytes * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0; + } else if (_tcsstr(aSize, CTSTRING(TiB))) { + return bytes * 1024.0 * 1024.0 * 1024.0 * 1024.0; + } else if (_tcsstr(aSize, CTSTRING(GiB))) { + return bytes * 1024.0 * 1024.0 * 1024.0; + } else if (_tcsstr(aSize, CTSTRING(MiB))) { + return bytes * 1024.0 * 1024.0; + } else if (_tcsstr(aSize, CTSTRING(KiB))) { + return bytes * 1024.0; + } else { + return bytes; + } +} + string Util::formatExactSize(int64_t aBytes) { #ifdef _WIN32 TCHAR buf[64]; Modified: dcplusplus/trunk/client/Util.h =================================================================== --- dcplusplus/trunk/client/Util.h 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/client/Util.h 2006-03-08 22:45:13 UTC (rev 587) @@ -272,6 +272,8 @@ static string formatBytes(const string& aString) { return formatBytes(toInt64(aString)); } + + static double toBytes(TCHAR* aSize); static string toDOS(const string& tmp); Modified: dcplusplus/trunk/windows/ExListViewCtrl.h =================================================================== --- dcplusplus/trunk/windows/ExListViewCtrl.h 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/windows/ExListViewCtrl.h 2006-03-08 22:45:13 UTC (rev 587) @@ -40,7 +40,8 @@ SORT_STRING, SORT_STRING_NOCASE, SORT_INT, - SORT_FLOAT + SORT_FLOAT, + SORT_BYTES }; typedef ListViewArrows<ExListViewCtrl> arrowBase; @@ -143,7 +144,11 @@ p->GetItemText(na, p->sortColumn, buf, 128); p->GetItemText(nb, p->sortColumn, buf2, 128); result = compare(_tstof(buf), _tstof(buf2)); - } + } else if(result == SORT_BYTES) { + p->GetItemText(na, p->sortColumn, buf, 128); + p->GetItemText(nb, p->sortColumn, buf2, 128); + result = compare(Util::toBytes(buf), Util::toBytes(buf2)); + } if(!p->ascending) result = -result; return result; Modified: dcplusplus/trunk/windows/PublicHubsFrm.cpp =================================================================== --- dcplusplus/trunk/windows/PublicHubsFrm.cpp 2006-02-27 00:04:48 UTC (rev 586) +++ dcplusplus/trunk/windows/PublicHubsFrm.cpp 2006-03-08 22:45:13 UTC (rev 587) @@ -167,8 +167,10 @@ // BAH, sorting on bytes will break of course...oh well...later... if(l->iSubItem == COLUMN_USERS || l->iSubItem == COLUMN_MINSLOTS ||l->iSubItem == COLUMN_MAXHUBS || l->iSubItem == COLUMN_MAXUSERS) { ctrlHubs.setSort(l->iSubItem, ExListViewCtrl::SORT_INT); - } else if(l->iSubItem == COLUMN_SHARED || l->iSubItem == COLUMN_MINSHARE || l->iSubItem == COLUMN_RELIABILITY) { - ctrlHubs.setSort(l->iSubItem, ExListViewCtrl::SORT_FLOAT); + } else if(l->iSubItem == COLUMN_RELIABILITY) { + ctrlHubs.setSort(l->iSubItem, ExListViewCtrl::SORT_FLOAT); + } else if (l->iSubItem == COLUMN_SHARED || l->iSubItem == COLUMN_MINSHARE){ + ctrlHubs.setSort(l->iSubItem, ExListViewCtrl::SORT_BYTES); } else { ctrlHubs.setSort(l->iSubItem, ExListViewCtrl::SORT_STRING_NOCASE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-02-27 00:02:33
|
Revision: 585 Author: arnetheduck Date: 2006-02-26 16:02:20 -0800 (Sun, 26 Feb 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=585&view=rev Log Message: ----------- Oops, wrong place Added Paths: ----------- dcplusplus/tags/ Removed Paths: ------------- tags/ Copied: dcplusplus/tags (from rev 584, tags) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-02-26 23:54:13
|
Revision: 584 Author: arnetheduck Date: 2006-02-26 15:54:07 -0800 (Sun, 26 Feb 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=584&view=rev Log Message: ----------- Added tags dir Added Paths: ----------- tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-02-26 23:36:41
|
Revision: 583 Author: arnetheduck Date: 2006-02-26 15:36:21 -0800 (Sun, 26 Feb 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=583&view=rev Log Message: ----------- Last few changes for release Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/windows/AboutDlg.h Added Paths: ----------- dcplusplus/trunk/opencow.dll Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-02-26 21:19:47 UTC (rev 582) +++ dcplusplus/trunk/changelog.txt 2006-02-26 23:36:21 UTC (rev 583) @@ -1,4 +1,4 @@ --- 0.guess.what -- +-- 0.687 2006-02-26 -- * Fixed XML file list generation for invalid filenames from other os's * Fixed a rare refresh crash * CID is now shown if no nick name is currently available for a user @@ -12,6 +12,8 @@ * Fixed some translation strings (thanks fleetcommand) * Fixed some finished transfers frames issues (thanks trem) * /pm and and a few other things work without user list in hub frame +* Added support for the ZPipe extension (test version) (thanks jove) +* Moved to subversion, CVS will no longer be maintained -- 0.686 2006-02-13 -- * Fixed active search (oops) Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-02-26 21:19:47 UTC (rev 582) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-02-26 23:36:21 UTC (rev 583) @@ -495,7 +495,7 @@ feat.push_back("NoHello"); feat.push_back("UserIP2"); feat.push_back("TTHSearch"); - feat.push_back("ZPipe"); + feat.push_back("ZPipe0"); if(BOOLSETTING(COMPRESS_TRANSFERS)) feat.push_back("GetZBlock"); Added: dcplusplus/trunk/opencow.dll =================================================================== (Binary files differ) Property changes on: dcplusplus/trunk/opencow.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: dcplusplus/trunk/windows/AboutDlg.h =================================================================== --- dcplusplus/trunk/windows/AboutDlg.h 2006-02-26 21:19:47 UTC (rev 582) +++ dcplusplus/trunk/windows/AboutDlg.h 2006-02-26 23:36:21 UTC (rev 583) @@ -41,7 +41,7 @@ _T("theparanoidone, gadget, naga, tremor, joakim tosteberg, pofis, psf8500, lauris ievins, ") _T("defr, ullner, fleetcommand, liny, xan, olle svensson, mark gillespie, jeremy huddleston, ") _T("bsod, sulan, jonathan stone, tim burton, izzzo, guitarm, paka, nils maier, jens oknelid, yoji, ") -_T("krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin. ") +_T("krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin, jove. ") _T("Keep it coming!"); class AboutDlg : public CDialogImpl<AboutDlg>, private HttpConnectionListener This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-02-26 21:20:15
|
Revision: 582 Author: arnetheduck Date: 2006-02-26 13:19:47 -0800 (Sun, 26 Feb 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=582&view=rev Log Message: ----------- Lots of small fixes Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/AdcHub.cpp dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/Client.cpp dcplusplus/trunk/client/Client.h dcplusplus/trunk/client/CriticalSection.h dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/Thread.h dcplusplus/trunk/client/version.h dcplusplus/trunk/help/changelog.html dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h Property Changed: ---------------- dcplusplus/trunk/ dcplusplus/trunk/stlport/ dcplusplus/trunk/wtl/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: svn:ignore + vc7 ADC* App* Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-02-26 21:19:47 UTC (rev 582) @@ -933,8 +933,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,8,6 - PRODUCTVERSION 0,6,8,6 + FILEVERSION 0,6,8,7 + PRODUCTVERSION 0,6,8,7 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -951,12 +951,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 8, 6" + VALUE "FileVersion", "0, 6, 8, 7" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 8, 6" + VALUE "ProductVersion", "0, 6, 8, 7" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/Example.xml 2006-02-26 21:19:47 UTC (rev 582) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.686" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Author="arnetheduck" Version="0.687" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> @@ -363,6 +363,7 @@ <String Name="SettingsAntiFrag">Use antifragmentation method for downloads</String> <String Name="SettingsAppearance">Appearance</String> <String Name="SettingsAppearance2">Appearance\Colors and sounds</String> + <String Name="SettingsAutodropAutodropsettings">Autodrop settings</String> <String Name="SettingsAutodropSpeed">Drop sources below</String> <String Name="SettingsAutodropInterval">Check every</String> <String Name="SettingsAutodropElapsed">Min elapsed</String> @@ -445,6 +446,7 @@ <String Name="SettingsOpenNewWindow">Open new window when using /join</String> <String Name="SettingsOpenUserCmdHelp">Always open help file with this dialog</String> <String Name="SettingsOptions">Options</String> + <String Name="SettingsOtherQueueOptions">Other queue options</String> <String Name="SettingsOutgoing">Outgoing connection settings</String> <String Name="SettingsOverride">Don't allow hub/UPnP to override</String> <String Name="SettingsPersonalInformation">Personal Information</String> @@ -472,7 +474,7 @@ <String Name="SettingsShareSize">Total size:</String> <String Name="SettingsSharedDirectories">Shared directories</String> <String Name="SettingsShowJoins">Show joins / parts in chat by default</String> - <String Name="SettingsShowProgressBars">Show progress bars for transfers (uses some CPU)</String> + <String Name="SettingsShowProgressBars">Show progress bars for transfers</String> <String Name="SettingsSkipZeroByte">Skip zero-byte files</String> <String Name="SettingsSmallSendBuffer">Use small send buffer (enable if uploads slow downloads a lot)</String> <String Name="SettingsSocks5">SOCKS5</String> @@ -485,6 +487,7 @@ <String Name="SettingsStatusInChat">View status messages in main chat</String> <String Name="SettingsTcpPort">TCP Port</String> <String Name="SettingsTextMinislot">Mini slot size</String> + <String Name="SettingsPrioAutoprio">Autoprio settings</String> <String Name="SettingsPrioHighest">Highest prio max size</String> <String Name="SettingsPrioHigh">High prio max size</String> <String Name="SettingsPrioNormal">Normal prio max size</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/changelog.txt 2006-02-26 21:19:47 UTC (rev 582) @@ -10,7 +10,8 @@ * Added possiblity to sort transfer view by all downloads first (thanks guitarm) * Some cleanup for frame creation (thanks martin) * Fixed some translation strings (thanks fleetcommand) -* Fixed some finished transfer frame issues (thanks trem) +* Fixed some finished transfers frames issues (thanks trem) +* /pm and and a few other things work without user list in hub frame -- 0.686 2006-02-13 -- * Fixed active search (oops) Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -54,9 +54,13 @@ SIDIter i = users.find(aSID); if(i != users.end()) return *i->second; + } - User::Ptr p = ClientManager::getInstance()->getUser(aCID); + User::Ptr p = ClientManager::getInstance()->getUser(aCID); + + { + Lock l(cs); u = users.insert(make_pair(aSID, new OnlineUser(p, *this, aSID))).first->second; } @@ -145,7 +149,7 @@ && find(c.getParameters().begin(), c.getParameters().end(), "ADBAS0") == c.getParameters().end()) { fire(ClientListener::StatusMessage(), this, "Failed to negotiate base protocol"); // @todo internationalize - disconnect(false); + socket->disconnect(false); return; } } @@ -337,12 +341,9 @@ } void AdcHub::disconnect(bool graceless) { + Client::disconnect(graceless); state = STATE_PROTOCOL; - Client::disconnect(graceless); - { - Lock l(cs); - clearUsers(); - } + clearUsers(); } void AdcHub::hubMessage(const string& aMessage) { @@ -413,7 +414,7 @@ if(state != STATE_IDENTIFY && state != STATE_NORMAL) return; - reloadSettings(); + reloadSettings(false); AdcCommand c(AdcCommand::CMD_INF, AdcCommand::TYPE_BROADCAST); string tmp; Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -106,9 +106,9 @@ sock = secure ? SSLSocketFactory::getInstance()->getClientSocket() : new Socket; sock->create(); - if(SETTING(SOCKET_IN_BUFFER) > 0) + if(SETTING(SOCKET_IN_BUFFER) >= 1024) sock->setSocketOpt(SO_RCVBUF, SETTING(SOCKET_IN_BUFFER)); - if(SETTING(SOCKET_OUT_BUFFER) > 0) + if(SETTING(SOCKET_OUT_BUFFER) >= 1024) sock->setSocketOpt(SO_SNDBUF, SETTING(SOCKET_OUT_BUFFER)); sock->setBlocking(false); @@ -261,35 +261,72 @@ dcassert(file != NULL); size_t sockSize = (size_t)sock->getSocketOptInt(SO_SNDBUF); size_t bufSize = max(sockSize, (size_t)64*1024); - dcdebug("threadSendFile buffer size: %lu\n", bufSize); - AutoArray<u_int8_t> buf(bufSize); + + vector<u_int8_t> readBuf(bufSize); + vector<u_int8_t> writeBuf(bufSize); + size_t readPos = 0; + + bool readDone = false; + dcdebug("Starting threadSend"); while(true) { - size_t bytesRead = bufSize; - size_t actual = file->read(&buf[0], bytesRead); - if(actual == 0) { + if(!readDone && readBuf.size() > readPos) { + // Fill read buffer + size_t bytesRead = readBuf.size() - readPos; + size_t actual = file->read(&readBuf[readPos], bytesRead); + + if(bytesRead > 0) { + fire(BufferedSocketListener::BytesSent(), bytesRead, 0); + } + + if(actual == 0) { + readDone = true; + } else { + readPos += actual; + } + } + + if(readDone && readPos == 0) { fire(BufferedSocketListener::TransmitDone()); return; } - size_t done = 0; - size_t doneRead = 0; - while(done < actual) { + readBuf.swap(writeBuf); + readBuf.resize(bufSize); + writeBuf.resize(readPos); + readPos = 0; + + size_t writePos = 0; + + while(writePos < writeBuf.size()) { if(disconnecting) return; - - int written = sock->write(buf + done, min(sockSize, actual - done)); + size_t writeSize = min(sockSize / 2, writeBuf.size() - writePos); + int written = sock->write(&writeBuf[writePos], writeSize); if(written > 0) { - done += written; + writePos += written; - size_t doneReadNow = static_cast<size_t>((static_cast<double>(done)/actual) * bytesRead); + fire(BufferedSocketListener::BytesSent(), 0, written); + } else if(written == -1) { + if(readPos < readBuf.size()) { + // Read a little since we're blocking anyway... + size_t bytesRead = min(readBuf.size() - readPos, readBuf.size() / 2); + size_t actual = file->read(&readBuf[readPos], bytesRead); - fire(BufferedSocketListener::BytesSent(), doneReadNow - doneRead, written); - doneRead = doneReadNow; - } else if(written == -1) { - int w = sock->wait(POLL_TIMEOUT, Socket::WAIT_WRITE | Socket::WAIT_READ); - if(w & Socket::WAIT_READ) { - threadRead(); + if(bytesRead > 0) { + fire(BufferedSocketListener::BytesSent(), bytesRead, 0); + } + + if(actual == 0) { + readDone = true; + } else { + readPos += actual; + } + } else { + int w = sock->wait(POLL_TIMEOUT, Socket::WAIT_WRITE | Socket::WAIT_READ); + if(w & Socket::WAIT_READ) { + threadRead(); + } } } } Modified: dcplusplus/trunk/client/Client.cpp =================================================================== --- dcplusplus/trunk/client/Client.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/Client.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -30,7 +30,7 @@ Client::Client(const string& hubURL, char separator_, bool secure_) : reconnDelay(120), lastActivity(0), registered(false), socket(NULL), - hubUrl(hubURL), port(0), separator(separator_), + hubUrl(hubURL), port(0), separator(separator_), secure(secure_), countType(COUNT_UNCOUNTED) { string file; @@ -49,10 +49,11 @@ } } -void Client::reloadSettings() { +void Client::reloadSettings(bool updateNick) { FavoriteHubEntry* hub = FavoriteManager::getInstance()->getFavoriteHubEntry(getHubUrl()); if(hub) { - getMyIdentity().setNick(checkNick(hub->getNick(true))); + if(updateNick) + getMyIdentity().setNick(checkNick(hub->getNick(true))); if(!hub->getUserDescription().empty()) { getMyIdentity().setDescription(hub->getUserDescription()); } else { @@ -72,7 +73,7 @@ BufferedSocket::putSocket(socket); setReconnDelay(120 + Util::rand(0, 60)); - reloadSettings(); + reloadSettings(true); setRegistered(false); try { @@ -89,6 +90,13 @@ updateActivity(); } +void Client::disconnect(bool graceLess) { + if(!socket) + return; + socket->removeListener(this); + socket->disconnect(graceLess); +} + void Client::updateActivity() { lastActivity = GET_TICK(); } Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/Client.h 2006-02-26 21:19:47 UTC (rev 582) @@ -84,7 +84,7 @@ typedef List::iterator Iter; virtual void connect(); - virtual void disconnect(bool graceless) { if(socket) socket->disconnect(graceless); } + virtual void disconnect(bool graceless); virtual void connect(const OnlineUser& user) = 0; virtual void hubMessage(const string& aMessage) = 0; @@ -173,8 +173,8 @@ void updateCounts(bool aRemove); void updateActivity(); - // reload nick from settings, other details from favmanager - void reloadSettings(); + /** Reload details from favmanager or settings */ + void reloadSettings(bool updateNick); virtual string checkNick(const string& nick) = 0; Modified: dcplusplus/trunk/client/CriticalSection.h =================================================================== --- dcplusplus/trunk/client/CriticalSection.h 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/CriticalSection.h 2006-02-26 21:19:47 UTC (rev 582) @@ -127,21 +127,19 @@ ~RWLock() throw() { dcassert(readers==0); } void enterRead() throw() { - Lock l(cs); + cs.enter(); readers++; dcassert(readers < 100); + cs.leave(); } - void leaveRead() throw() { + dcassert(readers > 0); Thread::safeDec(readers); - dcassert(readers >= 0); } void enterWrite() throw() { cs.enter(); while(readers > 0) { - cs.leave(); Thread::yield(); - cs.enter(); } } void leaveWrite() { Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2005 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ void NmdcHub::connect(const OnlineUser& aUser) { checkstate(); - dcdebug("NmdcHub::connectToMe %s\n", aUser.getIdentity().getNick().c_str()); + dcdebug("NmdcHub::connect %s\n", aUser.getIdentity().getNick().c_str()); if(ClientManager::getInstance()->isActive()) { connectToMe(aUser); } else { @@ -84,15 +84,19 @@ NickIter i = users.find(aNick); if(i != users.end()) return *i->second; + } - User::Ptr p; - if(aNick == getMyNick()) { - p = ClientManager::getInstance()->getMe(); - getMyIdentity().setUser(p); - getMyIdentity().setHubUrl(getHubUrl()); - } else { - p = ClientManager::getInstance()->getUser(aNick, getHubUrl()); - } + User::Ptr p; + if(aNick == getMyNick()) { + p = ClientManager::getInstance()->getMe(); + getMyIdentity().setUser(p); + getMyIdentity().setHubUrl(getHubUrl()); + } else { + p = ClientManager::getInstance()->getUser(aNick, getHubUrl()); + } + + { + Lock l(cs); u = users.insert(make_pair(aNick, new OnlineUser(p, *this, 0))).first->second; u->getIdentity().setNick(aNick); } @@ -525,12 +529,12 @@ fire(ClientListener::UserUpdated(), this, u); } } else if(cmd == "$ForceMove") { - disconnect(false); + socket->disconnect(false); fire(ClientListener::Redirect(), this, param); } else if(cmd == "$HubIsFull") { fire(ClientListener::HubFull(), this); } else if(cmd == "$ValidateDenide") { // Mind the spelling... - disconnect(false); + socket->disconnect(false); fire(ClientListener::NickTaken(), this); } else if(cmd == "$UserIP") { if(!param.empty()) { @@ -684,7 +688,7 @@ void NmdcHub::myInfo(bool alwaysSend) { checkstate(); - reloadSettings(); + reloadSettings(false); dcdebug("MyInfo %s...\n", getMyNick().c_str()); lastCounts = counts; @@ -726,8 +730,8 @@ } void NmdcHub::disconnect(bool graceless) throw() { + Client::disconnect(graceless); state = STATE_CONNECT; - Client::disconnect(graceless); clearUsers(); } Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -270,6 +270,7 @@ } void QueueManager::UserQueue::setWaiting(QueueItem* qi) { + dcassert(qi->getCurrentDownload() != NULL); dcassert(qi->getCurrent() != NULL); dcassert(qi->getStatus() == QueueItem::STATUS_RUNNING); @@ -278,8 +279,9 @@ running.erase(qi->getCurrent()->getUser()); // Set flag to waiting + qi->setStatus(QueueItem::STATUS_WAITING); qi->setCurrent(NULL); - qi->setStatus(QueueItem::STATUS_WAITING); + qi->setCurrentDownload(NULL); // Add to the userQueue add(qi); @@ -559,7 +561,7 @@ /** Add a source to an existing queue item */ bool QueueManager::addSource(QueueItem* qi, const string& aFile, User::Ptr aUser, Flags::MaskType addBad, bool utf8) throw(QueueException, FileException) { QueueItem::Source* s = NULL; - bool wantConnection = (qi->getPriority() != QueueItem::PAUSED); + bool wantConnection = (qi->getPriority() != QueueItem::PAUSED) && (qi->getStatus() != QueueItem::STATUS_RUNNING); if(qi->isSource(aUser)) { throw QueueException(STRING(DUPLICATE_SOURCE)); @@ -582,9 +584,7 @@ wantConnection = false; } else if(qi->getStatus() != QueueItem::STATUS_RUNNING) { userQueue.add(qi, aUser); - } else { - wantConnection = false; - } + } aUser->setFlag(User::SAVE_NICK); @@ -768,7 +768,6 @@ } } - Download* QueueManager::getDownload(User::Ptr& aUser, bool supportsTrees) throw() { Lock l(cs); @@ -789,10 +788,10 @@ userQueue.setRunning(q, aUser); - fire(QueueManagerListener::StatusUpdated(), q); - Download* d = new Download(q); + q->setCurrentDownload(d); + if(d->getSize() != -1 && d->getTTH()) { if(HashManager::getInstance()->getTree(*d->getTTH(), d->getTigerTree())) { d->setTreeValid(true); @@ -814,8 +813,8 @@ d->setStartPos(q->getDownloadedBytes()); } - q->setCurrentDownload(d); + fire(QueueManagerListener::StatusUpdated(), q); return d; } @@ -837,7 +836,6 @@ fire(QueueManagerListener::PartialList(), aDownload->getUserConnection()->getUser(), aDownload->getPFS()); } } else { - QueueItem* q = fileQueue.find(aDownload->getTarget()); if(q != NULL) { @@ -849,7 +847,6 @@ } } - if(finished) { dcassert(q->getStatus() == QueueItem::STATUS_RUNNING); if(aDownload->isSet(Download::FLAG_TREE_DOWNLOAD)) { @@ -857,12 +854,10 @@ dcassert(aDownload->getTreeValid()); HashManager::getInstance()->addTree(aDownload->getTigerTree()); - q->setCurrentDownload(NULL); userQueue.setWaiting(q); fire(QueueManagerListener::StatusUpdated(), q); } else { - userQueue.remove(q); fire(QueueManagerListener::Finished(), q, aDownload->getAverageSpeed()); fire(QueueManagerListener::Removed(), q); // Now, let's see if this was a directory download filelist... @@ -874,6 +869,7 @@ flag = (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) ? QueueItem::FLAG_DIRECTORY_DOWNLOAD : 0) | (q->isSet(QueueItem::FLAG_MATCH_QUEUE) ? QueueItem::FLAG_MATCH_QUEUE : 0); } + userQueue.remove(q); fileQueue.remove(q); setDirty(); } @@ -893,15 +889,9 @@ } if(q->getPriority() != QueueItem::PAUSED) { - for(QueueItem::Source::Iter j = q->getSources().begin(); j != q->getSources().end(); ++j) { - if((*j)->getUser()->isOnline()) { - getConn.push_back((*j)->getUser()); - } - } + q->getOnlineUsers(getConn); } - q->setCurrentDownload(NULL); - // This might have been set to wait by removesource already... if(q->getStatus() == QueueItem::STATUS_RUNNING) { userQueue.setWaiting(q); @@ -963,49 +953,58 @@ void QueueManager::remove(const string& aTarget) throw() { string x; + { Lock l(cs); QueueItem* q = fileQueue.find(aTarget); - if(q != NULL) { - if(q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD)) { - dcassert(q->getSources().size() == 1); - DirectoryItem::DirectoryPair dp = directories.equal_range(q->getSources()[0]->getUser()); - for(DirectoryItem::DirectoryIter i = dp.first; i != dp.second; ++i) { - delete i->second; - } - directories.erase(q->getSources()[0]->getUser()); - } + if(q == NULL) + return; - if(q->getStatus() == QueueItem::STATUS_RUNNING) { - x = q->getTarget(); - } else if(!q->getTempTarget().empty() && q->getTempTarget() != q->getTarget()) { - File::deleteFile(q->getTempTarget() + Download::ANTI_FRAG_EXT); - File::deleteFile(q->getTempTarget()); + if(q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD)) { + dcassert(q->getSources().size() == 1); + DirectoryItem::DirectoryPair dp = directories.equal_range(q->getSources()[0]->getUser()); + for(DirectoryItem::DirectoryIter i = dp.first; i != dp.second; ++i) { + delete i->second; } + directories.erase(q->getSources()[0]->getUser()); + } - userQueue.remove(q); + if(q->getStatus() == QueueItem::STATUS_RUNNING) { + x = q->getTarget(); + } else if(!q->getTempTarget().empty() && q->getTempTarget() != q->getTarget()) { + File::deleteFile(q->getTempTarget() + Download::ANTI_FRAG_EXT); + File::deleteFile(q->getTempTarget()); + } - fire(QueueManagerListener::Removed(), q); - fileQueue.remove(q); + fire(QueueManagerListener::Removed(), q); - setDirty(); - } + userQueue.remove(q); + fileQueue.remove(q); + + setDirty(); } + if(!x.empty()) { DownloadManager::getInstance()->abortDownload(x); } } void QueueManager::removeSource(const string& aTarget, User::Ptr& aUser, int reason, bool removeConn /* = true */) throw() { - Lock l(cs); - QueueItem* q = fileQueue.find(aTarget); string x; - if(q != NULL) { - dcassert(q->isSource(aUser)); + bool removeCompletely = false; + { + Lock l(cs); + QueueItem* q = fileQueue.find(aTarget); + if(q == NULL) + return; + + if(!q->isSource(aUser)) + return; + if(q->isSet(QueueItem::FLAG_USER_LIST)) { - remove(q->getTarget()); - return; + removeCompletely = true; + goto endCheck; } if(reason == QueueItem::Source::FLAG_NO_TREE) { @@ -1034,23 +1033,28 @@ } q->removeSource(aUser, reason); - + fire(QueueManagerListener::SourcesUpdated(), q); setDirty(); } +endCheck: if(!x.empty()) { DownloadManager::getInstance()->abortDownload(x); } + if(removeCompletely) { + remove(aTarget); + } } void QueueManager::removeSource(User::Ptr& aUser, int reason) throw() { string x; + StringList removeList; { Lock l(cs); QueueItem* qi = NULL; while( (qi = userQueue.getNext(aUser, QueueItem::PAUSED)) != NULL) { if(qi->isSet(QueueItem::FLAG_USER_LIST)) { - remove(qi->getTarget()); + removeList.push_back(qi->getTarget()); } else { userQueue.remove(qi, aUser); qi->removeSource(aUser, reason); @@ -1062,7 +1066,7 @@ qi = userQueue.getRunning(aUser); if(qi != NULL) { if(qi->isSet(QueueItem::FLAG_USER_LIST)) { - remove(qi->getTarget()); + removeList.push_back(qi->getTarget()); } else { userQueue.setWaiting(qi); userQueue.remove(qi, aUser); @@ -1073,9 +1077,13 @@ } } } + if(!x.empty()) { DownloadManager::getInstance()->abortDownload(x); } + for(StringIter i = removeList.begin(); i != removeList.end(); ++i) { + remove(*i); + } } void QueueManager::setPriority(const string& aTarget, QueueItem::Priority p) throw() { @@ -1086,7 +1094,7 @@ QueueItem* q = fileQueue.find(aTarget); if( (q != NULL) && (q->getPriority() != p) ) { - if( q->getStatus() != QueueItem::STATUS_RUNNING ) { + if( q->getStatus() == QueueItem::STATUS_WAITING ) { if(q->getPriority() == QueueItem::PAUSED || p == QueueItem::HIGHEST) { // Problem, we have to request connections to all these users... q->getOnlineUsers(ul); Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -364,6 +364,7 @@ "Use antifragmentation method for downloads", "Appearance", "Appearance\\Colors and sounds", +"Autodrop settings", "Drop sources below", "Check every", "Min elapsed", @@ -446,6 +447,7 @@ "Open new window when using /join", "Always open help file with this dialog", "Options", +"Other queue options", "Outgoing connection settings", "Don't allow hub/UPnP to override", "Personal Information", @@ -473,7 +475,7 @@ "Total size:", "Shared directories", "Show joins / parts in chat by default", -"Show progress bars for transfers (uses some CPU)", +"Show progress bars for transfers", "Skip zero-byte files", "Use small send buffer (enable if uploads slow downloads a lot)", "SOCKS5", @@ -486,6 +488,7 @@ "View status messages in main chat", "TCP Port", "Mini slot size", +"Autoprio settings", "Highest prio max size", "High prio max size", "Normal prio max size", @@ -961,6 +964,7 @@ "SettingsAntiFrag", "SettingsAppearance", "SettingsAppearance2", +"SettingsAutodropAutodropsettings", "SettingsAutodropSpeed", "SettingsAutodropInterval", "SettingsAutodropElapsed", @@ -1043,6 +1047,7 @@ "SettingsOpenNewWindow", "SettingsOpenUserCmdHelp", "SettingsOptions", +"SettingsOtherQueueOptions", "SettingsOutgoing", "SettingsOverride", "SettingsPersonalInformation", @@ -1083,6 +1088,7 @@ "SettingsStatusInChat", "SettingsTcpPort", "SettingsTextMinislot", +"SettingsPrioAutoprio", "SettingsPrioHighest", "SettingsPrioHigh", "SettingsPrioNormal", Modified: dcplusplus/trunk/client/Thread.h =================================================================== --- dcplusplus/trunk/client/Thread.h 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/Thread.h 2006-02-26 21:19:47 UTC (rev 582) @@ -67,7 +67,7 @@ void setThreadPriority(Priority p) throw() { ::SetThreadPriority(threadHandle, p); } static void sleep(u_int32_t millis) { ::Sleep(millis); } - static void yield() { ::Sleep(0); } + static void yield() { ::Sleep(1); } static long safeInc(volatile long& v) { return InterlockedIncrement(&v); } static long safeDec(volatile long& v) { return InterlockedDecrement(&v); } static long safeExchange(volatile long& target, long value) { return InterlockedExchange(&target, value); } Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/client/version.h 2006-02-26 21:19:47 UTC (rev 582) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.686" -#define VERSIONFLOAT 0.686 +#define VERSIONSTRING "0.687" +#define VERSIONFLOAT 0.687 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/help/changelog.html 2006-02-26 21:19:47 UTC (rev 582) @@ -12,6 +12,7 @@ <body> <h1>DC++ Changelog</h1> See the version history of DC++ below. + <h2>0.686 <span style="color: gray;">(2006-02-13)</span></h2> <ul> <li>Fixed active search (oops)</li> Property changes on: dcplusplus/trunk/stlport ___________________________________________________________________ Name: svn:ignore + * Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-02-26 21:19:47 UTC (rev 582) @@ -221,9 +221,9 @@ removeFavoriteHub(); } else if(Util::stricmp(cmd.c_str(), _T("getlist")) == 0){ if( !param.empty() ){ - int k = ctrlUsers.findItem(param); - if(k != -1) { - ctrlUsers.getItemData(k)->getList(); + UserInfo* ui = findUser(param); + if(ui) { + ui->getList(); } } } else if(Util::stricmp(cmd.c_str(), _T("log")) == 0) { @@ -242,18 +242,17 @@ string::size_type j = param.find(_T(' ')); if(j != string::npos) { tstring nick = param.substr(0, j); - int k = ctrlUsers.findItem(nick); - if(k != -1) { - UserInfo* ui = ctrlUsers.getItemData(k); - if(param.size() > j + 1) + UserInfo* ui = findUser(nick); + + if(ui) { + if(param.size() > j + 1) PrivateFrame::openWindow(ui->user, param.substr(j+1)); - else + else PrivateFrame::openWindow(ui->user); } } else if(!param.empty()) { - int k = ctrlUsers.findItem(param); - if(k != -1) { - UserInfo* ui = ctrlUsers.getItemData(k); + UserInfo* ui = findUser(param); + if(ui) { PrivateFrame::openWindow(ui->user); } } @@ -287,21 +286,6 @@ const int col; }; -int HubFrame::findUser(const User::Ptr& aUser) { - UserMapIter i = userMap.find(aUser); - if(i == userMap.end()) - return -1; - - UserInfo* ui = i->second; - - if(ctrlUsers.getSortColumn() == COLUMN_NICK) { - // Sort order of the other columns changes too late when the user's updated - dcassert(ctrlUsers.getItemData(ctrlUsers.getSortPos(ui)) == ui); - return ctrlUsers.getSortPos(ui); - } - return ctrlUsers.findItem(ui); -} - const tstring& HubFrame::getNick(const User::Ptr& aUser) { UserMapIter i = userMap.find(aUser); if(i == userMap.end()) @@ -420,6 +404,14 @@ delete ui; } +HubFrame::UserInfo* HubFrame::findUser(const tstring& nick) { + for(UserMapIter i = userMap.begin(); i != userMap.end(); ++i) { + if(i->second->columns[COLUMN_NICK] == nick) + return i->second; + } + return 0; +} + bool HubFrame::UserInfo::update(const Identity& identity, int sortCol) { bool needsSort = (getIdentity().isOp() != identity.isOp()); tstring old; @@ -661,21 +653,25 @@ return 0; // Nickname click, let's see if we can find one like it in the name list... - int pos = ctrlUsers.findItem(x.substr(start, end - start)); - if(pos != -1) { + tstring nick = x.substr(start, end - start); + UserInfo* ui = findUser(nick); + if(ui) { bHandled = true; if (wParam & MK_CONTROL) { // MK_CONTROL = 0x0008 - PrivateFrame::openWindow(ctrlUsers.getItemData(pos)->user); + PrivateFrame::openWindow(ui->user); } else if (wParam & MK_SHIFT) { try { - QueueManager::getInstance()->addList(ctrlUsers.getItemData(pos)->user, QueueItem::FLAG_CLIENT_VIEW); + QueueManager::getInstance()->addList(ui->user, QueueItem::FLAG_CLIENT_VIEW); } catch(const Exception& e) { addClientLine(Text::toT(e.getError())); } - } else { + } else if(showUsers) { int items = ctrlUsers.GetItemCount(); + int pos = -1; ctrlUsers.SetRedraw(FALSE); for(int i = 0; i < items; ++i) { + if(ctrlUsers.getItemData(i) == ui) + pos = i; ctrlUsers.SetItemState(i, (i == pos) ? LVIS_SELECTED | LVIS_FOCUSED : 0, LVIS_SELECTED | LVIS_FOCUSED); } ctrlUsers.SetRedraw(TRUE); @@ -739,6 +735,18 @@ return TRUE; } +LRESULT HubFrame::onCtlColor(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { + HWND hWnd = (HWND)lParam; + HDC hDC = (HDC)wParam; + if(hWnd == ctrlClient.m_hWnd || hWnd == ctrlMessage.m_hWnd) { + ::SetBkColor(hDC, WinUtil::bgColor); + ::SetTextColor(hDC, WinUtil::textColor); + return (LRESULT)WinUtil::bgBrush; + } else { + return 0; + } +} + LRESULT HubFrame::onContextMenu(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; @@ -763,6 +771,7 @@ } // Nickname click, let's see if we can find one like it in the name list... + int pos = ctrlUsers.findItem(x.substr(start, end - start)); if(pos != -1) { int items = ctrlUsers.GetItemCount(); Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-02-25 19:14:25 UTC (rev 581) +++ dcplusplus/trunk/windows/HubFrame.h 2006-02-26 21:19:47 UTC (rev 582) @@ -97,6 +97,7 @@ LRESULT onLButton(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); LRESULT onEnterUsers(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/); LRESULT onGetToolTip(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/); + LRESULT onCtlColor(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/); void UpdateLayout(BOOL bResizeBars = TRUE); void addLine(const tstring& aLine); @@ -128,18 +129,6 @@ return 0; } - LRESULT onCtlColor(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { - HWND hWnd = (HWND)lParam; - HDC hDC = (HDC)wParam; - if(hWnd == ctrlClient.m_hWnd || hWnd == ctrlMessage.m_hWnd) { - ::SetBkColor(hDC, WinUtil::bgColor); - ::SetTextColor(hDC, WinUtil::textColor); - return (LRESULT)WinUtil::bgBrush; - } else { - return 0; - } - } - LRESULT OnFileReconnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { client->disconnect(false); clearUserList(); @@ -259,10 +248,6 @@ bool favShowJoins; tstring complete; - tstring lastKick; - tstring lastRedir; - tstring lastServer; - bool waitingForPW; bool extraSort; @@ -280,7 +265,7 @@ size_t getUserCount() const { size_t sel = ctrlUsers.GetSelectedCount(); - return sel>1?sel:client->getUserCount(); + return sel > 1 ? sel : client->getUserCount(); } int64_t getAvailable() { @@ -333,11 +318,11 @@ static int columnIndexes[COLUMN_LAST]; static int columnSizes[COLUMN_LAST]; - int findUser(const User::Ptr& aUser); - bool updateUser(const UpdateInfo& u); void removeUser(const User::Ptr& aUser); + UserInfo* findUser(const tstring& nick); + void addAsFavorite(); void removeFavoriteHub(); Property changes on: dcplusplus/trunk/wtl ___________________________________________________________________ Name: svn:ignore + *.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Jacek S. <arn...@us...> - 2006-02-19 23:51:38
|
Update of /cvsroot/dcplusplus/dcplusplus/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18176/client Modified Files: NmdcHub.h Client.h BufferedSocket.cpp ClientManager.cpp Client.cpp Log Message: Last few cleanups for the day Index: ClientManager.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ClientManager.cpp,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** ClientManager.cpp 18 Feb 2006 23:32:17 -0000 1.96 --- ClientManager.cpp 19 Feb 2006 23:51:31 -0000 1.97 *************** *** 55,62 **** void ClientManager::putClient(Client* aClient) { ! aClient->disconnect(true); fire(ClientManagerListener::ClientDisconnected(), aClient); aClient->removeListeners(); ! { Lock l(cs); --- 55,63 ---- void ClientManager::putClient(Client* aClient) { ! aClient->shutdown(); ! fire(ClientManagerListener::ClientDisconnected(), aClient); aClient->removeListeners(); ! { Lock l(cs); Index: BufferedSocket.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/BufferedSocket.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** BufferedSocket.cpp 19 Feb 2006 16:19:06 -0000 1.102 --- BufferedSocket.cpp 19 Feb 2006 23:51:31 -0000 1.103 *************** *** 362,366 **** delete this; } - } --- 362,365 ---- Index: NmdcHub.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/NmdcHub.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** NmdcHub.h 19 Feb 2006 20:39:20 -0000 1.32 --- NmdcHub.h 19 Feb 2006 23:51:31 -0000 1.33 *************** *** 27,33 **** #include "SettingsManager.h" - #include "ClientManager.h" - - #include "BufferedSocket.h" #include "User.h" #include "CriticalSection.h" --- 27,30 ---- *************** *** 35,38 **** --- 32,37 ---- #include "Client.h" + class ClientManager; + class NmdcHub : public Client, private TimerManagerListener, private Flags { *************** *** 40,43 **** --- 39,43 ---- using Client::send; + virtual void connect(); virtual void connect(const OnlineUser& aUser); virtual void disconnect(bool graceless) throw(); *************** *** 96,101 **** NmdcHub& operator=(const NmdcHub&); - virtual void connect(); - void clearUsers(); void onLine(const string& aLine) throw(); --- 96,99 ---- Index: Client.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/Client.h,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** Client.h 19 Feb 2006 20:39:20 -0000 1.110 --- Client.h 19 Feb 2006 23:51:31 -0000 1.111 *************** *** 30,34 **** class Client; class AdcCommand; ! class ClientListener { --- 30,34 ---- class Client; class AdcCommand; ! class ClientManager; class ClientListener { *************** *** 84,90 **** typedef List::iterator Iter; - Client(const string& hubURL, char separator, bool secure_); - virtual ~Client() throw(); - virtual void connect(); virtual void disconnect(bool graceless) { if(socket) socket->disconnect(graceless); } --- 84,87 ---- *************** *** 129,132 **** --- 126,131 ---- } + void shutdown(); + void send(const string& aMessage) { send(aMessage.c_str(), aMessage.length()); } void send(const char* aMessage, size_t aLen) { *************** *** 156,159 **** --- 155,161 ---- protected: + friend class ClientManager; + Client(const string& hubURL, char separator, bool secure_); + virtual ~Client() throw(); struct Counts { Counts(long n = 0, long r = 0, long o = 0) : normal(n), registered(r), op(o) { } Index: Client.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/Client.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** Client.cpp 19 Feb 2006 16:19:06 -0000 1.93 --- Client.cpp 19 Feb 2006 23:51:31 -0000 1.94 *************** *** 39,47 **** Client::~Client() throw() { ! if(socket) ! BufferedSocket::putSocket(socket); updateCounts(true); } void Client::reloadSettings() { FavoriteHubEntry* hub = FavoriteManager::getInstance()->getFavoriteHubEntry(getHubUrl()); --- 39,53 ---- Client::~Client() throw() { ! dcassert(!socket); updateCounts(true); } + void Client::shutdown() { + if(socket) { + BufferedSocket::putSocket(socket); + socket = 0; + } + } + void Client::reloadSettings() { FavoriteHubEntry* hub = FavoriteManager::getInstance()->getFavoriteHubEntry(getHubUrl()); |
From: Jacek S. <arn...@us...> - 2006-02-19 23:51:38
|
Update of /cvsroot/dcplusplus/dcplusplus/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18176/windows Modified Files: HubFrame.cpp Log Message: Last few cleanups for the day Index: HubFrame.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/windows/HubFrame.cpp,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** HubFrame.cpp 19 Feb 2006 16:19:06 -0000 1.130 --- HubFrame.cpp 19 Feb 2006 23:51:31 -0000 1.131 *************** *** 640,644 **** } - LRESULT HubFrame::onLButton(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { HWND focus = GetFocus(); --- 640,643 ---- |
From: Jacek S. <arn...@us...> - 2006-02-19 20:39:24
|
Update of /cvsroot/dcplusplus/dcplusplus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv564 Modified Files: Example.xml Log Message: More janitory action Index: Example.xml =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/Example.xml,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** Example.xml 13 Feb 2006 21:13:27 -0000 1.165 --- Example.xml 19 Feb 2006 20:39:20 -0000 1.166 *************** *** 509,512 **** --- 509,513 ---- <String Name="SettingsWindowsOptions">Window options</String> <String Name="SettingsWriteBuffer">Write buffer size</String> + <String Name="SettingsAltSortOrder">Sort all downloads first</String> <String Name="SettingsUseSsl">Use SSL when remote client supports it</String> <String Name="SfvInconsistency">CRC32 inconsistency (SFV-Check)</String> |
From: Jacek S. <arn...@us...> - 2006-02-19 20:39:24
|
Update of /cvsroot/dcplusplus/dcplusplus/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv564/client Modified Files: NmdcHub.h AdcCommand.h AdcHub.h Client.h NmdcHub.cpp AdcCommand.cpp StringDefs.cpp Log Message: More janitory action Index: Client.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/Client.h,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** Client.h 19 Feb 2006 16:19:06 -0000 1.109 --- Client.h 19 Feb 2006 20:39:20 -0000 1.110 *************** *** 88,93 **** virtual void connect(); ! bool isConnected() const { return socket && socket->isConnected(); } ! void disconnect(bool graceless) { if(socket) socket->disconnect(graceless); } virtual void connect(const OnlineUser& user) = 0; --- 88,92 ---- virtual void connect(); ! virtual void disconnect(bool graceless) { if(socket) socket->disconnect(graceless); } virtual void connect(const OnlineUser& user) = 0; *************** *** 101,105 **** virtual size_t getUserCount() const = 0; virtual int64_t getAvailable() const = 0; ! bool isOp() const { return getMyIdentity().isOp(); } --- 100,109 ---- virtual size_t getUserCount() const = 0; virtual int64_t getAvailable() const = 0; ! ! virtual void send(const AdcCommand& command) = 0; ! ! virtual string escape(string const& str) const { return str; } ! ! bool isConnected() const { return socket && socket->isConnected(); } bool isOp() const { return getMyIdentity().isOp(); } *************** *** 111,117 **** string getLocalIp() const; ! void updated(const OnlineUser& aUser) { ! fire(ClientListener::UserUpdated(), this, aUser); ! } static string getCounts() { --- 115,119 ---- string getLocalIp() const; ! void updated(const OnlineUser& aUser) { fire(ClientListener::UserUpdated(), this, aUser); } static string getCounts() { *************** *** 120,124 **** } - virtual string escape(string const& str) const { return str; } StringMap& escapeParams(StringMap& sm) { for(StringMapIter i = sm.begin(); i != sm.end(); ++i) { --- 122,125 ---- *************** *** 136,140 **** socket->write(aMessage, aLen); } - virtual void send(const AdcCommand& command) = 0; const string& getMyNick() const { return getMyIdentity().getNick(); } --- 137,140 ---- Index: NmdcHub.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/NmdcHub.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** NmdcHub.h 19 Feb 2006 16:19:06 -0000 1.31 --- NmdcHub.h 19 Feb 2006 20:39:20 -0000 1.32 *************** *** 37,56 **** class NmdcHub : public Client, private TimerManagerListener, private Flags { - friend class ClientManager; public: ! typedef NmdcHub* Ptr; ! typedef list<Ptr> List; ! typedef List::iterator Iter; ! ! enum SupportFlags { ! SUPPORTS_USERCOMMAND = 0x01, ! SUPPORTS_NOGETINFO = 0x02, ! SUPPORTS_USERIP2 = 0x04 ! }; ! ! #define checkstate() if(state != STATE_CONNECTED) return virtual void connect(const OnlineUser& aUser); ! virtual void hubMessage(const string& aMessage) { checkstate(); send(toNmdc( "<" + getMyNick() + "> " + Util::validateMessage(aMessage, false) + "|" ) ); } virtual void privateMessage(const OnlineUser& aUser, const string& aMessage); virtual void sendUserCmd(const string& aUserCmd) throw() { send(toNmdc(aUserCmd)); } --- 37,47 ---- class NmdcHub : public Client, private TimerManagerListener, private Flags { public: ! using Client::send; virtual void connect(const OnlineUser& aUser); ! virtual void disconnect(bool graceless) throw(); ! ! virtual void hubMessage(const string& aMessage); virtual void privateMessage(const OnlineUser& aUser, const string& aMessage); virtual void sendUserCmd(const string& aUserCmd) throw() { send(toNmdc(aUserCmd)); } *************** *** 64,97 **** virtual string escape(string const& str) const { return Util::validateMessage(str, false); } - virtual void disconnect(bool graceless) throw(); - using Client::send; virtual void send(const AdcCommand&) { dcassert(0); } - void myInfo(bool alwaysSend); - - void refreshUserList(bool unknownOnly = false); - - void validateNick(const string& aNick) { send("$ValidateNick " + toNmdc(aNick) + "|"); } - void key(const string& aKey) { send("$Key " + aKey + "|"); } - void version() { send("$Version 1,0091|"); } - void getNickList() { checkstate(); send("$GetNickList|"); } - void getInfo(const OnlineUser& aUser) { checkstate(); send("$GetINFO " + toNmdc(aUser.getIdentity().getNick()) + " " + toNmdc(getMyNick()) + "|"); } - - void connectToMe(const OnlineUser& aUser); - void revConnectToMe(const OnlineUser& aUser); - - /* void privateMessage(const string& aNick, const string& aMessage) { - } - */ - void supports(const StringList& feat) { - string x; - for(StringList::const_iterator i = feat.begin(); i != feat.end(); ++i) { - x+= *i + ' '; - } - send("$Supports " + x + '|'); - } - GETSET(int, supportFlags, SupportFlags); private: enum States { STATE_CONNECT, --- 55,69 ---- virtual string escape(string const& str) const { return Util::validateMessage(str, false); } virtual void send(const AdcCommand&) { dcassert(0); } GETSET(int, supportFlags, SupportFlags); private: + friend class ClientManager; + enum SupportFlags { + SUPPORTS_USERCOMMAND = 0x01, + SUPPORTS_NOGETINFO = 0x02, + SUPPORTS_USERIP2 = 0x04 + }; + enum States { STATE_CONNECT, *************** *** 136,139 **** --- 108,120 ---- string toNmdc(const string& str) const { return Text::utf8ToAcp(str); } + void validateNick(const string& aNick) { send("$ValidateNick " + toNmdc(aNick) + "|"); } + void key(const string& aKey) { send("$Key " + aKey + "|"); } + void version() { send("$Version 1,0091|"); } + void getNickList() { send("$GetNickList|"); } + void connectToMe(const OnlineUser& aUser); + void revConnectToMe(const OnlineUser& aUser); + void myInfo(bool alwaysSend); + void supports(const StringList& feat); + void updateFromTag(Identity& id, const string& tag); Index: AdcCommand.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/AdcCommand.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** AdcCommand.h 17 Feb 2006 19:23:51 -0000 1.28 --- AdcCommand.h 19 Feb 2006 20:39:20 -0000 1.29 *************** *** 138,158 **** bool operator==(u_int32_t aCmd) { return cmdInt == aCmd; } ! static string escape(const string& str, bool old) { ! string tmp = str; ! string::size_type i = 0; ! while( (i = tmp.find_first_of(" \n\\", i)) != string::npos) { ! if(old) { ! tmp.insert(i, "\\"); ! } else { ! switch(tmp[i]) { ! case ' ': tmp.replace(i, 1, "\\s"); break; ! case '\n': tmp.replace(i, 1, "\\n"); break; ! case '\\': tmp.replace(i, 1, "\\\\"); break; ! } ! } ! i+=2; ! } ! return tmp; ! } u_int32_t getTo() const { return to; } AdcCommand& setTo(const u_int32_t sid) { to = sid; return *this; } --- 138,142 ---- bool operator==(u_int32_t aCmd) { return cmdInt == aCmd; } ! static string escape(const string& str, bool old); u_int32_t getTo() const { return to; } AdcCommand& setTo(const u_int32_t sid) { to = sid; return *this; } Index: AdcHub.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/AdcHub.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** AdcHub.h 19 Feb 2006 16:19:06 -0000 1.41 --- AdcHub.h 19 Feb 2006 20:39:20 -0000 1.42 *************** *** 33,41 **** class AdcHub : public Client, public CommandHandler<AdcHub>, private TimerManagerListener { public: - using Client::send; virtual void connect(const OnlineUser& user); ! virtual void connect(const OnlineUser& user, string const& token, bool secure); virtual void disconnect(bool graceless); --- 33,40 ---- class AdcHub : public Client, public CommandHandler<AdcHub>, private TimerManagerListener { public: using Client::send; virtual void connect(const OnlineUser& user); ! void connect(const OnlineUser& user, string const& token, bool secure); virtual void disconnect(bool graceless); *************** *** 50,76 **** virtual int64_t getAvailable() const; - template<typename T> void handle(T, AdcCommand&) { - //Speaker<AdcHubListener>::fire(t, this, c); - } - - void send(const AdcCommand& cmd); - void sendUDP(const AdcCommand& cmd); - - void handle(AdcCommand::SUP, AdcCommand& c) throw(); - void handle(AdcCommand::SID, AdcCommand& c) throw(); - void handle(AdcCommand::MSG, AdcCommand& c) throw(); - void handle(AdcCommand::INF, AdcCommand& c) throw(); - void handle(AdcCommand::GPA, AdcCommand& c) throw(); - void handle(AdcCommand::QUI, AdcCommand& c) throw(); - void handle(AdcCommand::CTM, AdcCommand& c) throw(); - void handle(AdcCommand::RCM, AdcCommand& c) throw(); - void handle(AdcCommand::STA, AdcCommand& c) throw(); - void handle(AdcCommand::SCH, AdcCommand& c) throw(); - void handle(AdcCommand::CMD, AdcCommand& c) throw(); virtual string escape(string const& str) const { return AdcCommand::escape(str, false); } string getMySID() { return AdcCommand::fromSID(sid); } private: friend class ClientManager; enum States { --- 49,59 ---- virtual int64_t getAvailable() const; virtual string escape(string const& str) const { return AdcCommand::escape(str, false); } + virtual void send(const AdcCommand& cmd); string getMySID() { return AdcCommand::fromSID(sid); } private: friend class ClientManager; + friend class CommandHandler<AdcHub>; enum States { *************** *** 114,117 **** --- 97,118 ---- void clearUsers(); + void handle(AdcCommand::SUP, AdcCommand& c) throw(); + void handle(AdcCommand::SID, AdcCommand& c) throw(); + void handle(AdcCommand::MSG, AdcCommand& c) throw(); + void handle(AdcCommand::INF, AdcCommand& c) throw(); + void handle(AdcCommand::GPA, AdcCommand& c) throw(); + void handle(AdcCommand::QUI, AdcCommand& c) throw(); + void handle(AdcCommand::CTM, AdcCommand& c) throw(); + void handle(AdcCommand::RCM, AdcCommand& c) throw(); + void handle(AdcCommand::STA, AdcCommand& c) throw(); + void handle(AdcCommand::SCH, AdcCommand& c) throw(); + void handle(AdcCommand::CMD, AdcCommand& c) throw(); + + template<typename T> void handle(T, AdcCommand&) { + //Speaker<AdcHubListener>::fire(t, this, c); + } + + void sendUDP(const AdcCommand& cmd); + virtual void on(Connecting) throw() { fire(ClientListener::Connecting(), this); } virtual void on(Connected) throw(); Index: StringDefs.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/StringDefs.cpp,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -d -r1.162 -r1.163 *** StringDefs.cpp 13 Feb 2006 21:13:27 -0000 1.162 --- StringDefs.cpp 19 Feb 2006 20:39:20 -0000 1.163 *************** *** 510,513 **** --- 510,514 ---- "Window options", "Write buffer size", + "Sort all downloads first", "Use SSL when remote client supports it", "CRC32 inconsistency (SFV-Check)", *************** *** 1106,1109 **** --- 1107,1111 ---- "SettingsWindowsOptions", "SettingsWriteBuffer", + "SettingsAltSortOrder", "SettingsUseSsl", "SfvInconsistency", Index: AdcCommand.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/AdcCommand.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AdcCommand.cpp 12 Feb 2006 18:16:12 -0000 1.17 --- AdcCommand.cpp 19 Feb 2006 20:39:20 -0000 1.18 *************** *** 132,135 **** --- 132,153 ---- } + string AdcCommand::escape(const string& str, bool old) { + string tmp = str; + string::size_type i = 0; + while( (i = tmp.find_first_of(" \n\\", i)) != string::npos) { + if(old) { + tmp.insert(i, "\\"); + } else { + switch(tmp[i]) { + case ' ': tmp.replace(i, 1, "\\s"); break; + case '\n': tmp.replace(i, 1, "\\n"); break; + case '\\': tmp.replace(i, 1, "\\\\"); break; + } + } + i+=2; + } + return tmp; + } + string AdcCommand::getHeaderString(u_int32_t sid, bool nmdc) const { string tmp; Index: NmdcHub.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/NmdcHub.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** NmdcHub.cpp 10 Feb 2006 07:56:46 -0000 1.54 --- NmdcHub.cpp 19 Feb 2006 20:39:20 -0000 1.55 *************** *** 56,59 **** --- 56,61 ---- } + #define checkstate() if(state != STATE_CONNECTED) return + void NmdcHub::connect(const OnlineUser& aUser) { checkstate(); *************** *** 75,92 **** } - void NmdcHub::refreshUserList(bool unknownOnly /* = false */) { - if(unknownOnly) { - Lock l(cs); - for(NickIter i = users.begin(); i != users.end(); ++i) { - if(!i->second->getIdentity().isSet(Identity::GOT_INF)) { - getInfo(*i->second); - } - } - } else { - clearUsers(); - getNickList(); - } - } - OnlineUser& NmdcHub::getUser(const string& aNick) { OnlineUser* u = NULL; --- 77,80 ---- *************** *** 114,117 **** --- 102,113 ---- } + void NmdcHub::supports(const StringList& feat) { + string x; + for(StringList::const_iterator i = feat.begin(); i != feat.end(); ++i) { + x+= *i + ' '; + } + send("$Supports " + x + '|'); + } + OnlineUser* NmdcHub::findUser(const string& aNick) { Lock l(cs); *************** *** 678,681 **** --- 674,682 ---- } + void NmdcHub::hubMessage(const string& aMessage) { + checkstate(); + send(toNmdc( "<" + getMyNick() + "> " + Util::validateMessage(aMessage, false) + "|" ) ); + } + void NmdcHub::myInfo(bool alwaysSend) { checkstate(); |
Update of /cvsroot/dcplusplus/dcplusplus/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6640/client Modified Files: SettingsManager.h HttpConnection.h ClientManagerListener.h ServerSocket.h DownloadManager.h UploadManager.h DirectoryListing.h HashManager.h BufferedSocket.h SearchManagerListener.h FinishedManager.h ConnectionManagerListener.h QueueManagerListener.h StringDefs.h HashValue.h UserConnection.h TimerManager.h FavoriteManager.h DirectoryListing.cpp SettingsManager.cpp LogManager.h Log Message: More pedantry, sort order patch Index: SearchManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SearchManagerListener.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SearchManagerListener.h 24 Apr 2005 08:13:10 -0000 1.8 --- SearchManagerListener.h 19 Feb 2006 17:19:04 -0000 1.9 *************** *** 28,31 **** --- 28,32 ---- class SearchManagerListener { public: + virtual ~SearchManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: StringDefs.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/StringDefs.h,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** StringDefs.h 13 Feb 2006 21:13:27 -0000 1.158 --- StringDefs.h 19 Feb 2006 17:19:04 -0000 1.159 *************** *** 513,516 **** --- 513,517 ---- SETTINGS_WINDOWS_OPTIONS, // "Window options" SETTINGS_WRITE_BUFFER, // "Write buffer size" + SETTINGS_ALT_SORT_ORDER, // "Sort all downloads first" SETTINGS_USE_SSL, // "Use SSL when remote client supports it" SFV_INCONSISTENCY, // "CRC32 inconsistency (SFV-Check)" Index: DirectoryListing.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DirectoryListing.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** DirectoryListing.h 19 Feb 2006 16:19:06 -0000 1.46 --- DirectoryListing.h 19 Feb 2006 17:19:04 -0000 1.47 *************** *** 101,106 **** int64_t getTotalSize(bool adls = false); void filterList(DirectoryListing& dirList); ! void filterList(const HASH_SET<TTHValue, TTHValue::Hash>& l); ! void getHashList(HASH_SET<TTHValue, TTHValue::Hash>& l); size_t getFileCount() { return files.size(); } --- 101,106 ---- int64_t getTotalSize(bool adls = false); void filterList(DirectoryListing& dirList); ! void filterList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l); ! void getHashList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l); size_t getFileCount() { return files.size(); } Index: BufferedSocket.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/BufferedSocket.h,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** BufferedSocket.h 19 Feb 2006 16:19:06 -0000 1.78 --- BufferedSocket.h 19 Feb 2006 17:19:04 -0000 1.79 *************** *** 36,39 **** --- 36,40 ---- class BufferedSocketListener { public: + virtual ~BufferedSocketListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: SettingsManager.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SettingsManager.cpp,v retrieving revision 1.141 retrieving revision 1.142 diff -C2 -d -r1.141 -r1.142 *** SettingsManager.cpp 10 Feb 2006 07:56:46 -0000 1.141 --- SettingsManager.cpp 19 Feb 2006 17:19:04 -0000 1.142 *************** *** 74,78 **** "BoldHub", "BoldPm", "BoldSearch", "SocketInBuffer", "SocketOutBuffer", "OnlyDlTthFiles", "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", ! "UseSsl", "AutoSearchLimit", "SENTRY", // Int64 --- 74,78 ---- "BoldHub", "BoldPm", "BoldSearch", "SocketInBuffer", "SocketOutBuffer", "OnlyDlTthFiles", "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", ! "UseSsl", "AutoSearchLimit", "AltSortOrder", "SENTRY", // Int64 *************** *** 255,258 **** --- 255,259 ---- setDefault(USE_SSL, false); setDefault(AUTO_SEARCH_LIMIT, 5); + setDefault(ALT_SORT_ORDER, false); #ifdef _WIN32 Index: ConnectionManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ConnectionManagerListener.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConnectionManagerListener.h 19 Feb 2006 16:19:06 -0000 1.7 --- ConnectionManagerListener.h 19 Feb 2006 17:19:04 -0000 1.8 *************** *** 28,31 **** --- 28,32 ---- class ConnectionManagerListener { public: + virtual ~ConnectionManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HttpConnection.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HttpConnection.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** HttpConnection.h 19 Feb 2006 16:19:06 -0000 1.27 --- HttpConnection.h 19 Feb 2006 17:19:04 -0000 1.28 *************** *** 30,33 **** --- 30,34 ---- class HttpConnectionListener { public: + virtual ~HttpConnectionListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: TimerManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/TimerManager.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TimerManager.h 19 Feb 2006 16:19:06 -0000 1.29 --- TimerManager.h 19 Feb 2006 17:19:04 -0000 1.30 *************** *** 35,38 **** --- 35,39 ---- class TimerManagerListener { public: + virtual ~TimerManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: UploadManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/UploadManager.h,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** UploadManager.h 19 Feb 2006 16:19:06 -0000 1.85 --- UploadManager.h 19 Feb 2006 17:19:04 -0000 1.86 *************** *** 61,64 **** --- 61,65 ---- class UploadManagerListener { public: + virtual ~UploadManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HashValue.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HashValue.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HashValue.h 19 Feb 2006 16:19:06 -0000 1.13 --- HashValue.h 19 Feb 2006 17:19:04 -0000 1.14 *************** *** 41,48 **** struct Hash { size_t operator()(const HashValue& rhs) const { return *(size_t*)&rhs; } - bool operator()(const HashValue& lhs, const HashValue& rhs) const { return lhs == rhs; } - }; - struct Less { - bool operator()(const HashValue& lhs, const HashValue& rhs) const { return lhs < rhs; } }; --- 41,44 ---- Index: UserConnection.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/UserConnection.h,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** UserConnection.h 19 Feb 2006 16:19:06 -0000 1.106 --- UserConnection.h 19 Feb 2006 17:19:04 -0000 1.107 *************** *** 36,39 **** --- 36,40 ---- class UserConnectionListener { public: + virtual ~UserConnectionListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: LogManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/LogManager.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** LogManager.h 19 Feb 2006 16:19:05 -0000 1.21 --- LogManager.h 19 Feb 2006 17:19:04 -0000 1.22 *************** *** 31,34 **** --- 31,35 ---- class LogManagerListener { public: + virtual ~LogManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: QueueManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/QueueManagerListener.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** QueueManagerListener.h 23 Jan 2006 08:00:49 -0000 1.11 --- QueueManagerListener.h 19 Feb 2006 17:19:04 -0000 1.12 *************** *** 28,31 **** --- 28,32 ---- class QueueManagerListener { public: + virtual ~QueueManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: ClientManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ClientManagerListener.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ClientManagerListener.h 9 Dec 2005 22:50:07 -0000 1.12 --- ClientManagerListener.h 19 Feb 2006 17:19:04 -0000 1.13 *************** *** 26,29 **** --- 26,30 ---- class ClientManagerListener { public: + virtual ~ClientManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: FavoriteManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/FavoriteManager.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FavoriteManager.h 19 Feb 2006 16:19:06 -0000 1.12 --- FavoriteManager.h 19 Feb 2006 17:19:04 -0000 1.13 *************** *** 111,114 **** --- 111,115 ---- class FavoriteManagerListener { public: + virtual ~FavoriteManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HashManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HashManager.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** HashManager.h 19 Feb 2006 16:19:06 -0000 1.33 --- HashManager.h 19 Feb 2006 17:19:04 -0000 1.34 *************** *** 39,42 **** --- 39,43 ---- class HashManagerListener { public: + virtual ~HashManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; *************** *** 231,235 **** typedef DirMap::iterator DirIter; ! typedef HASH_MAP_X(TTHValue, TreeInfo, TTHValue::Hash, TTHValue::Hash, TTHValue::Less) TreeMap; typedef TreeMap::iterator TreeIter; --- 232,236 ---- typedef DirMap::iterator DirIter; ! typedef HASH_MAP_X(TTHValue, TreeInfo, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>) TreeMap; typedef TreeMap::iterator TreeIter; Index: SettingsManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SettingsManager.h,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** SettingsManager.h 19 Feb 2006 16:19:06 -0000 1.111 --- SettingsManager.h 19 Feb 2006 17:19:04 -0000 1.112 *************** *** 32,35 **** --- 32,36 ---- class SettingsManagerListener { public: + virtual ~SettingsManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; *************** *** 89,93 **** BOLD_HUB, BOLD_PM, BOLD_SEARCH, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, ONLY_DL_TTH_FILES, OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, ! USE_SSL, AUTO_SEARCH_LIMIT, INT_LAST }; --- 90,94 ---- BOLD_HUB, BOLD_PM, BOLD_SEARCH, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, ONLY_DL_TTH_FILES, OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, ! USE_SSL, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, INT_LAST }; Index: ServerSocket.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ServerSocket.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ServerSocket.h 19 Feb 2006 16:19:06 -0000 1.28 --- ServerSocket.h 19 Feb 2006 17:19:04 -0000 1.29 *************** *** 29,32 **** --- 29,33 ---- class ServerSocketListener { public: + virtual ~ServerSocketListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: FinishedManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/FinishedManager.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** FinishedManager.h 19 Feb 2006 16:19:06 -0000 1.18 --- FinishedManager.h 19 Feb 2006 17:19:04 -0000 1.19 *************** *** 62,65 **** --- 62,66 ---- class FinishedManagerListener { public: + virtual ~FinishedManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: DownloadManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DownloadManager.h,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** DownloadManager.h 19 Feb 2006 16:19:05 -0000 1.85 --- DownloadManager.h 19 Feb 2006 17:19:04 -0000 1.86 *************** *** 128,131 **** --- 128,132 ---- class DownloadManagerListener { public: + virtual ~DownloadManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: DirectoryListing.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DirectoryListing.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** DirectoryListing.cpp 19 Feb 2006 16:19:06 -0000 1.58 --- DirectoryListing.cpp 19 Feb 2006 17:19:04 -0000 1.59 *************** *** 371,376 **** struct HashContained { ! HashContained(const HASH_SET<TTHValue, TTHValue::Hash>& l) : tl(l) { } ! const HASH_SET<TTHValue, TTHValue::Hash>& tl; bool operator()(const DirectoryListing::File::Ptr i) const { return tl.count(*(i->getTTH())) && (DeleteFunction()(i), true); --- 371,376 ---- struct HashContained { ! HashContained(const HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) : tl(l) { } ! const HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& tl; bool operator()(const DirectoryListing::File::Ptr i) const { return tl.count(*(i->getTTH())) && (DeleteFunction()(i), true); *************** *** 391,400 **** DirectoryListing::Directory* d = dirList.getRoot(); ! HASH_SET<TTHValue, TTHValue::Hash> l; d->getHashList(l); filterList(l); } ! void DirectoryListing::Directory::filterList(const HASH_SET<TTHValue, TTHValue::Hash>& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l); directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end()); --- 391,400 ---- DirectoryListing::Directory* d = dirList.getRoot(); ! HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>) l; d->getHashList(l); filterList(l); } ! void DirectoryListing::Directory::filterList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l); directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end()); *************** *** 402,406 **** } ! void DirectoryListing::Directory::getHashList(HASH_SET<TTHValue, TTHValue::Hash>& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->getHashList(l); for(DirectoryListing::File::Iter i = files.begin(); i != files.end(); ++i) l.insert(*(*i)->getTTH()); --- 402,406 ---- } ! void DirectoryListing::Directory::getHashList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->getHashList(l); for(DirectoryListing::File::Iter i = files.begin(); i != files.end(); ++i) l.insert(*(*i)->getTTH()); |
From: Jacek S. <arn...@us...> - 2006-02-19 17:19:11
|
Update of /cvsroot/dcplusplus/dcplusplus/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6640/windows Modified Files: TransferView.h HubFrame.h AppearancePage.cpp Log Message: More pedantry, sort order patch Index: AppearancePage.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/windows/AppearancePage.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** AppearancePage.cpp 12 Oct 2005 14:02:53 -0000 1.28 --- AppearancePage.cpp 19 Feb 2006 17:19:05 -0000 1.29 *************** *** 46,49 **** --- 46,50 ---- PropPage::ListItem AppearancePage::listItems[] = { + { SettingsManager::ALT_SORT_ORDER, ResourceManager::SETTINGS_ALT_SORT_ORDER }, { SettingsManager::FILTER_MESSAGES, ResourceManager::SETTINGS_FILTER_MESSAGES }, { SettingsManager::MINIMIZE_TRAY, ResourceManager::SETTINGS_MINIMIZE_TRAY }, Index: HubFrame.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/windows/HubFrame.h,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** HubFrame.h 19 Feb 2006 16:19:06 -0000 1.74 --- HubFrame.h 19 Feb 2006 17:19:05 -0000 1.75 *************** *** 188,193 **** User::Ptr user; Identity identity; ! } ! friend struct CompareItems; --- 188,192 ---- User::Ptr user; Identity identity; ! }; friend struct CompareItems; Index: TransferView.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/windows/TransferView.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** TransferView.h 19 Feb 2006 16:19:06 -0000 1.26 --- TransferView.h 19 Feb 2006 17:19:05 -0000 1.27 *************** *** 176,187 **** static int compareItems(ItemInfo* a, ItemInfo* b, int col) { ! if(a->status == b->status) { ! if(a->download != b->download) { return a->download ? -1 : 1; } } else { ! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1; } - switch(col) { case COLUMN_STATUS: return 0; --- 176,196 ---- static int compareItems(ItemInfo* a, ItemInfo* b, int col) { ! if(BOOLSETTING(ALT_SORT_ORDER)) { ! if(a->download == b->download) { ! if(a->status != b->status) { ! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1; ! } ! } else { return a->download ? -1 : 1; } } else { ! if(a->status == b->status) { ! if(a->download != b->download) { ! return a->download ? -1 : 1; ! } ! } else { ! return (a->status == ItemInfo::STATUS_RUNNING) ? -1 : 1; ! } } switch(col) { case COLUMN_STATUS: return 0; |
From: Jacek S. <arn...@us...> - 2006-02-19 17:19:10
|
Update of /cvsroot/dcplusplus/dcplusplus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6640 Modified Files: changelog.txt Log Message: More pedantry, sort order patch Index: changelog.txt =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/changelog.txt,v retrieving revision 1.316 retrieving revision 1.317 diff -C2 -d -r1.316 -r1.317 *** changelog.txt 19 Feb 2006 16:51:08 -0000 1.316 --- changelog.txt 19 Feb 2006 17:19:05 -0000 1.317 *************** *** 8,12 **** * Installer now removes old unicows library * Updated to yaSSL 1.1.5 ! -- 0.686 2006-02-13 -- --- 8,12 ---- * Installer now removes old unicows library * Updated to yaSSL 1.1.5 ! * Added possiblity to sort transfer view by all downloads first (thanks guitarm) -- 0.686 2006-02-13 -- |
Update of /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25210/yassl/taocrypt/src Modified Files: integer.cpp misc.cpp twofish.cpp arc4.cpp md5.cpp asn.cpp des.cpp ripemd.cpp aes.cpp sha.cpp blowfish.cpp Log Message: yassl update, installer fix Index: misc.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/src/misc.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** misc.cpp 27 Nov 2005 19:23:07 -0000 1.1 --- misc.cpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 27,82 **** #include <new> // for NewHandler - - void* operator new(size_t sz, TaoCrypt::new_t) - { #ifdef YASSL_PURE_C - void* ptr = malloc(sz ? sz : 1); - if (!ptr) abort(); ! return ptr; ! #else ! return ::operator new(sz); ! #endif ! } - void operator delete(void* ptr, TaoCrypt::new_t) - { - #ifdef YASSL_PURE_C - if (ptr) free(ptr); - #else - ::operator delete(ptr); - #endif - } - void* operator new[](size_t sz, TaoCrypt::new_t nt) - { - return ::operator new(sz, nt); - } - void operator delete[](void* ptr, TaoCrypt::new_t nt) - { - ::operator delete(ptr, nt); - } - /* uncomment to test - // make sure not using globals anywhere by forgetting to use overloaded - void* operator new(size_t sz); ! void operator delete(void* ptr); ! void* operator new[](size_t sz); ! void operator delete[](void* ptr); ! */ - namespace TaoCrypt { ! new_t tc; // for library new --- 27,81 ---- #include <new> // for NewHandler #ifdef YASSL_PURE_C ! void* operator new(size_t sz, TaoCrypt::new_t) ! { ! void* ptr = malloc(sz ? sz : 1); ! if (!ptr) abort(); + return ptr; + } + void operator delete(void* ptr, TaoCrypt::new_t) + { + if (ptr) free(ptr); + } + void* operator new[](size_t sz, TaoCrypt::new_t nt) + { + return ::operator new(sz, nt); + } + void operator delete[](void* ptr, TaoCrypt::new_t nt) + { + ::operator delete(ptr, nt); + } ! /* uncomment to test ! // make sure not using globals anywhere by forgetting to use overloaded ! void* operator new(size_t sz); ! void operator delete(void* ptr); ! void* operator new[](size_t sz); + void operator delete[](void* ptr); + */ + namespace TaoCrypt { ! new_t tc; // for library new ! ! } ! ! #endif // YASSL_PURE_C ! ! ! namespace TaoCrypt { Index: aes.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/src/aes.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aes.cpp 27 Nov 2005 19:23:07 -0000 1.1 --- aes.cpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 471,474 **** --- 471,475 ---- AS2( movd mm3, edi ) \ AS2( movd mm4, ebx ) \ + AS2( sub esp, 4 ) \ AS2( movd mm7, ebp ) \ AS2( mov [ebp - 4], esi ) \ *************** *** 478,484 **** #define EPILOG() \ ! AS2( movd esp, mm7 ) \ ! AS2( mov esi, [ebp - 4] ) \ AS2( movd ebx, mm4 ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ --- 479,485 ---- #define EPILOG() \ ! AS2( mov esp, ebp ) \ AS2( movd ebx, mm4 ) \ + AS2( mov esi, [ebp - 4] ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ *************** *** 493,496 **** --- 494,498 ---- AS2( movd mm3, edi ) \ AS2( movd mm4, ebx ) \ + AS2( sub esp, 4 ) \ AS2( movd mm7, ebp ) \ AS2( mov [ebp - 4], esi ) \ *************** *** 520,525 **** PROLOG() ! AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds ! AS2( lea edi, [ecx + 60] ) // rk AS1( dec edx ) --- 522,532 ---- PROLOG() ! #ifdef OLD_GCC_OFFSET ! AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds ! AS2( lea edi, [ecx + 64] ) // rk ! #else ! AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds ! AS2( lea edi, [ecx + 60] ) // rk ! #endif AS1( dec edx ) *************** *** 528,549 **** AS2( mov eax, DWORD PTR [esi] ) - AS1( bswap eax ) - AS2( mov edx, DWORD PTR [edi] ) - AS2( xor eax, edx ) // s0 - AS2( mov ebx, DWORD PTR [esi + 4] ) - AS1( bswap ebx ) - AS2( mov edx, DWORD PTR [edi + 4] ) - AS2( xor ebx, edx ) // s1 - AS2( mov ecx, DWORD PTR [esi + 8] ) - AS1( bswap ecx ) - AS2( mov edx, DWORD PTR [edi + 8] ) - AS2( xor ecx, edx ) // s2 - AS2( mov edx, DWORD PTR [esi + 12] ) AS1( bswap edx ) ! AS2( mov esp, DWORD PTR [edi + 12] ) ! AS2( xor edx, esp ) // s3 AS1(loop1: ) --- 535,551 ---- AS2( mov eax, DWORD PTR [esi] ) AS2( mov ebx, DWORD PTR [esi + 4] ) AS2( mov ecx, DWORD PTR [esi + 8] ) AS2( mov edx, DWORD PTR [esi + 12] ) + + AS1( bswap eax ) + AS1( bswap ebx ) + AS1( bswap ecx ) AS1( bswap edx ) ! ! AS2( xor eax, DWORD PTR [edi] ) // s0 ! AS2( xor ebx, DWORD PTR [edi + 4] ) // s1 ! AS2( xor ecx, DWORD PTR [edi + 8] ) // s2 ! AS2( xor edx, DWORD PTR [edi + 12] ) // s3 AS1(loop1: ) *************** *** 557,574 **** AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, ch ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, dl ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm0, esp ) /* Put1 (mm1) = --- 559,576 ---- AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, ch ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, dl ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm0, esi ) /* Put1 (mm1) = *************** *** 581,598 **** AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ecx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, dh ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, al ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm1, esp ) --- 583,600 ---- AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ecx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, dh ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, al ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm1, esi ) *************** *** 606,623 **** AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, ah ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, bl ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm2, esp ) /* Put3 (edx) = --- 608,625 ---- AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, ah ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, bl ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm2, esi ) /* Put3 (edx) = *************** *** 645,662 **** // xOr ! AS2( movd esi, mm6 ) // rk ! AS2( add esi, 16 ) ! AS2( movd mm6, esi ) // save back AS2( movd eax, mm0 ) AS2( movd ebx, mm1 ) AS2( movd ecx, mm2 ) AS2( xor eax, DWORD PTR [esi] ) AS2( xor ebx, DWORD PTR [esi + 4] ) AS2( xor ecx, DWORD PTR [esi + 8] ) AS2( xor edx, DWORD PTR [esi + 12] ) - AS2( movd edi, mm5 ) AS1( dec edi ) AS2( movd mm5, edi ) --- 647,664 ---- // xOr ! AS2( movd esi, mm6 ) // rk AS2( movd eax, mm0 ) + AS2( add esi, 16 ) AS2( movd ebx, mm1 ) + AS2( movd mm6, esi ) // save back AS2( movd ecx, mm2 ) AS2( xor eax, DWORD PTR [esi] ) AS2( xor ebx, DWORD PTR [esi + 4] ) + AS2( movd edi, mm5 ) AS2( xor ecx, DWORD PTR [esi + 8] ) AS2( xor edx, DWORD PTR [esi + 12] ) AS1( dec edi ) AS2( movd mm5, edi ) *************** *** 674,698 **** AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, ch ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, dl ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm0, esp ) /* --- 676,700 ---- AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, ch ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, dl ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm0, esi ) /* *************** *** 705,729 **** AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, ecx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, dh ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, al ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm1, esp ) /* --- 707,731 ---- AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, ecx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, dh ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, al ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm1, esi ) /* *************** *** 736,760 **** AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, ah ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, bl ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm2, esp ) /* --- 738,762 ---- AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, ah ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, bl ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm2, esi ) /* *************** *** 789,797 **** // xOr - AS2( movd esi, mm6 ) // rk - AS2( add esi, 16 ) - AS2( movd eax, mm0 ) AS2( movd ebx, mm1 ) AS2( movd ecx, mm2 ) --- 791,798 ---- // xOr AS2( movd eax, mm0 ) + AS2( movd esi, mm6 ) // rk AS2( movd ebx, mm1 ) + AS2( add esi, 16 ) AS2( movd ecx, mm2 ) *************** *** 807,812 **** AS1( bswap eax ) AS1( bswap ebx ) - AS1( bswap ecx ) - AS1( bswap edx ) // store --- 808,811 ---- *************** *** 816,819 **** --- 815,822 ---- AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock #endif + + AS1( bswap ecx ) + AS1( bswap edx ) + AS2( mov DWORD PTR [esi], eax ) AS2( mov DWORD PTR [esi + 4], ebx ) *************** *** 834,863 **** PROLOG() ! AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds ! AS2( lea edi, [ecx + 60] ) // rk AS1( dec edx ) AS2( movd mm6, edi ) // save rk AS2( movd mm5, edx ) // save rounds - - AS2( mov eax, DWORD PTR [esi] ) - AS1( bswap eax ) - AS2( mov edx, DWORD PTR [edi] ) - AS2( xor eax, edx ) // s0 AS2( mov ebx, DWORD PTR [esi + 4] ) - AS1( bswap ebx ) - AS2( mov edx, DWORD PTR [edi + 4] ) - AS2( xor ebx, edx ) // s1 - AS2( mov ecx, DWORD PTR [esi + 8] ) - AS1( bswap ecx ) - AS2( mov edx, DWORD PTR [edi + 8] ) - AS2( xor ecx, edx ) // s2 - AS2( mov edx, DWORD PTR [esi + 12] ) AS1( bswap edx ) ! AS2( mov esp, DWORD PTR [edi + 12] ) ! AS2( xor edx, esp ) // s3 AS1(loop2: ) --- 837,867 ---- PROLOG() ! #ifdef OLD_GCC_OFFSET ! AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds ! AS2( lea edi, [ecx + 64] ) // rk ! #else ! AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds ! AS2( lea edi, [ecx + 60] ) // rk ! #endif AS1( dec edx ) AS2( movd mm6, edi ) // save rk AS2( movd mm5, edx ) // save rounds + AS2( mov eax, DWORD PTR [esi] ) AS2( mov ebx, DWORD PTR [esi + 4] ) AS2( mov ecx, DWORD PTR [esi + 8] ) AS2( mov edx, DWORD PTR [esi + 12] ) + + AS1( bswap eax ) + AS1( bswap ebx ) + AS1( bswap ecx ) AS1( bswap edx ) ! ! AS2( xor eax, DWORD PTR [edi] ) // s0 ! AS2( xor ebx, DWORD PTR [edi + 4] ) // s1 ! AS2( xor ecx, DWORD PTR [edi + 8] ) // s2 ! AS2( xor edx, DWORD PTR [edi + 12] ) // s3 ! AS1(loop2: ) *************** *** 870,887 **** AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, ch ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, bl ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm0, esp ) /* Put1 (mm1) = --- 874,891 ---- AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, ch ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, bl ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm0, esi ) /* Put1 (mm1) = *************** *** 893,910 **** AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, eax ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, dh ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, cl ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm1, esp ) /* Put2 (mm2) = --- 897,914 ---- AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, eax ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, dh ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, cl ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm1, esi ) /* Put2 (mm2) = *************** *** 916,933 **** AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esp, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx esi, ah ) ! AS2( xor esp, DWORD PTR [ebp + 2048 + esi*4] ) AS2( movzx edi, dl ) ! AS2( xor esp, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm2, esp ) /* Put3 (edx) = --- 920,937 ---- AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + esi*4] ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] ) ! AS2( movzx edi, ah ) ! AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] ) AS2( movzx edi, dl ) ! AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] ) ! AS2( movd mm2, esi ) /* Put3 (edx) = *************** *** 984,1008 **** AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, ch ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, bl ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm0, esp ) /* --- 988,1012 ---- AS2( mov esi, eax ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, edx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, ch ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, bl ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm0, esi ) /* *************** *** 1015,1039 **** AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, eax ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, dh ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, cl ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm1, esp ) /* --- 1019,1043 ---- AS2( mov esi, ebx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, eax ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, dh ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, cl ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm1, esi ) /* *************** *** 1046,1070 **** AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esp, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esp, 4278190080 ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 16711680 ) ! AS2( xor esp, esi ) ! AS2( movzx esi, ah ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] ) AS2( and edi, 65280 ) ! AS2( xor esp, edi ) AS2( movzx edi, dl ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and esi, 255 ) ! AS2( xor esp, esi ) ! AS2( movd mm2, esp ) /* --- 1050,1074 ---- AS2( mov esi, ecx ) AS2( shr esi, 24 ) ! AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] ) ! AS2( and esi, 4278190080 ) AS2( mov edi, ebx ) AS2( shr edi, 16 ) AS2( and edi, 255 ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 16711680 ) ! AS2( xor esi, edi ) ! AS2( movzx edi, ah ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) AS2( and edi, 65280 ) ! AS2( xor esi, edi ) AS2( movzx edi, dl ) ! AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] ) ! AS2( and edi, 255 ) ! AS2( xor esi, edi ) ! AS2( movd mm2, esi ) /* Index: sha.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/src/sha.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sha.cpp 27 Nov 2005 19:23:07 -0000 1.1 --- sha.cpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 27,32 **** #include "sha.hpp" - #include <stdio.h> // for vc7 test - #if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM) --- 27,30 ---- *************** *** 225,243 **** // use esi for f ! // use esp as tmp #define ASMR0(v,w,x,y,z,i) \ AS2( mov esi, x ) \ ! AS2( mov esp, [edi - i * 4] ) \ AS2( xor esi, y ) \ AS2( and esi, w ) \ ! AS2( lea z, [esp + z + 0x5A827999] ) \ ! AS2( mov esp, v ) \ AS2( xor esi, y ) \ ! AS2( rol esp, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, esp ) --- 223,241 ---- // use esi for f ! // use edi as tmp #define ASMR0(v,w,x,y,z,i) \ AS2( mov esi, x ) \ ! AS2( mov edi, [esp + i * 4] ) \ AS2( xor esi, y ) \ AS2( and esi, w ) \ ! AS2( lea z, [edi + z + 0x5A827999] ) \ ! AS2( mov edi, v ) \ AS2( xor esi, y ) \ ! AS2( rol edi, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, edi ) *************** *** 271,290 **** #define ASMR1(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov esp, [edi - W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor esp, [edi - W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor esp, [edi - W3 * 4] ) \ AS2( and esi, w ) \ ! AS2( xor esp, [edi - W4 * 4] ) \ ! AS2( rol esp, 1 ) \ AS2( xor esi, y ) \ ! AS2( mov [edi - W1 * 4], esp ) \ ! AS2( lea z, [esp + z + 0x5A827999] ) \ ! AS2( mov esp, v ) \ ! AS2( rol esp, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, esp ) --- 269,288 ---- #define ASMR1(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov edi, [esp + W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor edi, [esp + W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor edi, [esp + W3 * 4] ) \ AS2( and esi, w ) \ ! AS2( xor edi, [esp + W4 * 4] ) \ ! AS2( rol edi, 1 ) \ AS2( xor esi, y ) \ ! AS2( mov [esp + W1 * 4], edi ) \ ! AS2( lea z, [edi + z + 0x5A827999] ) \ ! AS2( mov edi, v ) \ ! AS2( rol edi, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, edi ) *************** *** 292,310 **** #define ASMR2(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov esp, [edi - W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor esp, [edi - W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor esp, [edi - W3 * 4] ) \ AS2( xor esi, w ) \ ! AS2( xor esp, [edi - W4 * 4] ) \ ! AS2( rol esp, 1 ) \ AS2( add z, esi ) \ ! AS2( mov [edi - W1 * 4], esp ) \ ! AS2( lea z, [esp + z + 0x6ED9EBA1] ) \ ! AS2( mov esp, v ) \ ! AS2( rol esp, 5 ) \ AS2( rol w, 30 ) \ ! AS2( add z, esp ) --- 290,308 ---- #define ASMR2(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov edi, [esp + W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor edi, [esp + W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor edi, [esp + W3 * 4] ) \ AS2( xor esi, w ) \ ! AS2( xor edi, [esp + W4 * 4] ) \ ! AS2( rol edi, 1 ) \ AS2( add z, esi ) \ ! AS2( mov [esp + W1 * 4], edi ) \ ! AS2( lea z, [edi + z + 0x6ED9EBA1] ) \ ! AS2( mov edi, v ) \ ! AS2( rol edi, 5 ) \ AS2( rol w, 30 ) \ ! AS2( add z, edi ) *************** *** 313,336 **** #define ASMR3(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov esp, [edi - W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor esp, [edi - W2 * 4] ) \ AS2( or esi, w ) \ ! AS2( xor esp, [edi - W3 * 4] ) \ AS2( and esi, y ) \ ! AS2( xor esp, [edi - W4 * 4] ) \ AS2( movd mm0, esi ) \ ! AS2( rol esp, 1 ) \ AS2( mov esi, x ) \ ! AS2( mov [edi - W1 * 4], esp ) \ AS2( and esi, w ) \ ! AS2( lea z, [esp + z + 0x8F1BBCDC] ) \ ! AS2( movd esp, mm0 ) \ ! AS2( or esi, esp ) \ ! AS2( mov esp, v ) \ ! AS2( rol esp, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, esp ) --- 311,334 ---- #define ASMR3(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov edi, [esp + W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor edi, [esp + W2 * 4] ) \ AS2( or esi, w ) \ ! AS2( xor edi, [esp + W3 * 4] ) \ AS2( and esi, y ) \ ! AS2( xor edi, [esp + W4 * 4] ) \ AS2( movd mm0, esi ) \ ! AS2( rol edi, 1 ) \ AS2( mov esi, x ) \ ! AS2( mov [esp + W1 * 4], edi ) \ AS2( and esi, w ) \ ! AS2( lea z, [edi + z + 0x8F1BBCDC] ) \ ! AS2( movd edi, mm0 ) \ ! AS2( or esi, edi ) \ ! AS2( mov edi, v ) \ ! AS2( rol edi, 5 ) \ AS2( add z, esi ) \ AS2( rol w, 30 ) \ ! AS2( add z, edi ) *************** *** 338,356 **** #define ASMR4(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov esp, [edi - W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor esp, [edi - W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor esp, [edi - W3 * 4] ) \ AS2( xor esi, w ) \ ! AS2( xor esp, [edi - W4 * 4] ) \ ! AS2( rol esp, 1 ) \ AS2( add z, esi ) \ ! AS2( mov [edi - W1 * 4], esp ) \ ! AS2( lea z, [esp + z + 0xCA62C1D6] ) \ ! AS2( mov esp, v ) \ ! AS2( rol esp, 5 ) \ AS2( rol w, 30 ) \ ! AS2( add z, esp ) --- 336,354 ---- #define ASMR4(v,w,x,y,z,i,W1,W2,W3,W4) \ ! AS2( mov edi, [esp + W1 * 4] ) \ AS2( mov esi, x ) \ ! AS2( xor edi, [esp + W2 * 4] ) \ AS2( xor esi, y ) \ ! AS2( xor edi, [esp + W3 * 4] ) \ AS2( xor esi, w ) \ ! AS2( xor edi, [esp + W4 * 4] ) \ ! AS2( rol edi, 1 ) \ AS2( add z, esi ) \ ! AS2( mov [esp + W1 * 4], edi ) \ ! AS2( lea z, [edi + z + 0xCA62C1D6] ) \ ! AS2( mov edi, v ) \ ! AS2( rol edi, 5 ) \ AS2( rol w, 30 ) \ ! AS2( add z, edi ) *************** *** 375,381 **** #define EPILOG() \ ! AS2( movd esp, mm6 ) \ AS2( movd esi, mm5 ) \ AS2( movd ebx, mm4 ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ --- 373,380 ---- #define EPILOG() \ ! AS2( movd ebp, mm6 ) \ AS2( movd esi, mm5 ) \ AS2( movd ebx, mm4 ) \ + AS2( mov esp, ebp ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ *************** *** 409,416 **** AS2( mov esi, ecx ) ! AS2( add esi, 16 ) // digest_[0] AS2( movd mm2, eax ) // store times_ AS2( movd mm1, esi ) // store digest_ AS1( loopStart: ) --- 408,423 ---- AS2( mov esi, ecx ) ! ! #ifdef OLD_GCC_OFFSET ! AS2( add esi, 20 ) // digest_[0] ! #else ! AS2( add esi, 16 ) // digest_[0] ! #endif ! AS2( movd mm2, eax ) // store times_ AS2( movd mm1, esi ) // store digest_ + AS2( sub esp, 68 ) // make room on stack + AS1( loopStart: ) *************** *** 428,435 **** AS1( bswap edx ) ! AS2( mov [ebp - 4], eax ) ! AS2( mov [ebp - 8], ebx ) ! AS2( mov [ebp - 12], ecx ) ! AS2( mov [ebp - 16], edx ) // part 2 --- 435,442 ---- AS1( bswap edx ) ! AS2( mov [esp], eax ) ! AS2( mov [esp + 4], ebx ) ! AS2( mov [esp + 8], ecx ) ! AS2( mov [esp + 12], edx ) // part 2 *************** *** 444,451 **** AS1( bswap edx ) ! AS2( mov [ebp - 20], eax ) ! AS2( mov [ebp - 24], ebx ) ! AS2( mov [ebp - 28], ecx ) ! AS2( mov [ebp - 32], edx ) --- 451,458 ---- AS1( bswap edx ) ! AS2( mov [esp + 16], eax ) ! AS2( mov [esp + 20], ebx ) ! AS2( mov [esp + 24], ecx ) ! AS2( mov [esp + 28], edx ) *************** *** 461,468 **** AS1( bswap edx ) ! AS2( mov [ebp - 36], eax ) ! AS2( mov [ebp - 40], ebx ) ! AS2( mov [ebp - 44], ecx ) ! AS2( mov [ebp - 48], edx ) --- 468,475 ---- AS1( bswap edx ) ! AS2( mov [esp + 32], eax ) ! AS2( mov [esp + 36], ebx ) ! AS2( mov [esp + 40], ecx ) ! AS2( mov [esp + 44], edx ) *************** *** 478,490 **** AS1( bswap edx ) ! AS2( mov [ebp - 52], eax ) ! AS2( mov [ebp - 56], ebx ) ! AS2( mov [ebp - 60], ecx ) ! AS2( mov [ebp - 64], edx ) ! ! AS2( mov [ebp - 68], edi ) // store edi for end ! // set edi to beginning of byte reversed input ! AS2( lea edi, [ebp - 4] ) // read from digest_ --- 485,494 ---- AS1( bswap edx ) ! AS2( mov [esp + 48], eax ) ! AS2( mov [esp + 52], ebx ) ! AS2( mov [esp + 56], ecx ) ! AS2( mov [esp + 60], edx ) ! AS2( mov [esp + 64], edi ) // store edi for end // read from digest_ *************** *** 495,502 **** AS2( mov ebp, [esi + 16] ) // e1 - // setup - AS2( mov esi, ecx ) - AS2( mov esp, [edi] ) - ASMR0(eax, ebx, ecx, edx, ebp, 0) --- 499,502 ---- *************** *** 596,609 **** // setup next round ! AS2( movd ebp, mm6 ) // original ebp ! AS2( movd esp, mm2 ) // times ! AS2( mov edi, DWORD PTR [ebp - 68] ) // data AS2( add edi, 64 ) // next round of data ! AS2( mov [ebp - 68], edi ) // restore ! AS1( dec esp ) ! AS2( movd mm2, esp ) AS1( jnz loopStart ) --- 596,608 ---- // setup next round ! AS2( movd ebp, mm2 ) // times ! AS2( mov edi, DWORD PTR [esp + 64] ) // data AS2( add edi, 64 ) // next round of data ! AS2( mov [esp + 64], edi ) // restore ! AS1( dec ebp ) ! AS2( movd mm2, ebp ) AS1( jnz loopStart ) Index: arc4.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/src/arc4.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** arc4.cpp 27 Nov 2005 19:23:07 -0000 1.1 --- arc4.cpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 122,128 **** #define EPILOG() \ ! AS2( movd esp, mm6 ) \ AS2( movd esi, mm5 ) \ AS2( movd ebx, mm4 ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ --- 122,129 ---- #define EPILOG() \ ! AS2( movd ebp, mm6 ) \ AS2( movd esi, mm5 ) \ AS2( movd ebx, mm4 ) \ + AS2( mov esp, ebp ) \ AS2( movd edi, mm3 ) \ AS1( emms ) \ *************** *** 157,173 **** PROLOG() ! AS2( cmp ebp, 0 ) ! AS1( jz done ) ! AS2( mov esp, ecx ) ! AS2( add esp, 2 ) // state_ AS2( movzx edx, BYTE PTR [ecx + 1] ) // y AS2( movzx ecx, BYTE PTR [ecx] ) // x // setup loop // a = s[x]; ! AS2( movzx eax, BYTE PTR [esp + ecx] ) --- 158,175 ---- PROLOG() ! AS2( sub esp, 4 ) // make room + AS2( cmp ebp, 0 ) + AS1( jz nothing ... [truncated message content] |
From: Jacek S. <arn...@us...> - 2006-02-19 16:51:44
|
Update of /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25210/yassl/taocrypt/include Modified Files: misc.hpp hash.hpp block.hpp asn.hpp Log Message: yassl update, installer fix Index: misc.hpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/include/misc.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** misc.hpp 27 Nov 2005 19:19:19 -0000 1.1 --- misc.hpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 41,85 **** namespace TaoCrypt { ! // library allocation ! struct new_t {}; // TaoCrypt New type ! extern new_t tc; // pass in parameter ! } // namespace TaoCrypt ! void* operator new (size_t, TaoCrypt::new_t); ! void* operator new[](size_t, TaoCrypt::new_t); ! void operator delete (void*, TaoCrypt::new_t); ! void operator delete[](void*, TaoCrypt::new_t); - namespace TaoCrypt { ! template<typename T> ! void tcDelete(T* ptr) ! { ! if (ptr) ptr->~T(); ! ::operator delete(ptr, TaoCrypt::tc); ! } ! template<typename T> ! void tcArrayDelete(T* ptr) ! { ! // can't do array placement destruction since not tracking size in ! // allocation, only allow builtins to use array placement since they ! // don't need destructors called ! typedef char builtin[IsFundamentalType<T>::Yes ? 1 : -1]; ! (void)sizeof(builtin); ! ::operator delete[](ptr, TaoCrypt::tc); ! } ! // to resolve compiler generated operator delete on base classes with ! // virtual destructors (when on stack), make sure doesn't get called ! class virtual_base { ! public: ! static void operator delete(void*) { assert(0); } ! }; --- 41,111 ---- namespace TaoCrypt { ! #ifdef YASSL_PURE_C ! // library allocation ! struct new_t {}; // TaoCrypt New type ! extern new_t tc; // pass in parameter ! } // namespace TaoCrypt ! void* operator new (size_t, TaoCrypt::new_t); ! void* operator new[](size_t, TaoCrypt::new_t); + void operator delete (void*, TaoCrypt::new_t); + void operator delete[](void*, TaoCrypt::new_t); ! namespace TaoCrypt { ! template<typename T> ! void tcDelete(T* ptr) ! { ! if (ptr) ptr->~T(); ! ::operator delete(ptr, TaoCrypt::tc); ! } ! template<typename T> ! void tcArrayDelete(T* ptr) ! { ! // can't do array placement destruction since not tracking size in ! // allocation, only allow builtins to use array placement since they ! // don't need destructors called ! typedef char builtin[IsFundamentalType<T>::Yes ? 1 : -1]; ! (void)sizeof(builtin); ! ! ::operator delete[](ptr, TaoCrypt::tc); ! } + #define NEW_TC new (tc) ! ! // to resolve compiler generated operator delete on base classes with ! // virtual destructors (when on stack), make sure doesn't get called ! class virtual_base { ! public: ! static void operator delete(void*) { assert(0); } ! }; ! ! #else // YASSL_PURE_C ! ! ! template<typename T> ! void tcDelete(T* ptr) ! { ! delete ptr; ! } ! ! template<typename T> ! void tcArrayDelete(T* ptr) ! { ! delete[] ptr; ! } ! ! #define NEW_TC new ! ! class virtual_base {}; ! ! ! #endif // YASSL_PURE_C *************** *** 113,123 **** // Turn on ia32 ASM for Ciphers and Message Digests ! // For GCC user has to enable during ./configure because of problems with ! // intel syntax addressing on older gas versions ! #if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(_MSC_VER) #define TAO_ASM #endif #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define TAOCRYPT_MALLOC_ALIGNMENT_IS_16 --- 139,155 ---- // Turn on ia32 ASM for Ciphers and Message Digests ! // Seperate define since these are more complex, use member offsets ! // and user may want to turn off while leaving Big Integer optos on ! #if defined(TAOCRYPT_X86ASM_AVAILABLE) && !defined(DISABLE_TAO_ASM) #define TAO_ASM #endif + // Extra word in older vtable implementations, for ASM member offset + #if defined(__GNUC__) && __GNUC__ < 3 + #define OLD_GCC_OFFSET + #endif + + #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define TAOCRYPT_MALLOC_ALIGNMENT_IS_16 Index: asn.hpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/include/asn.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** asn.hpp 27 Nov 2005 19:19:19 -0000 1.1 --- asn.hpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 185,189 **** public: explicit PublicKey(const byte* k = 0, word32 s = 0); ! ~PublicKey() { tcArrayDelete(key_); } const byte* GetKey() const { return key_; } --- 185,189 ---- public: explicit PublicKey(const byte* k = 0, word32 s = 0); ! ~PublicKey() { tcDelete(key_); } const byte* GetKey() const { return key_; } *************** *** 238,242 **** explicit CertDecoder(Source&, bool decode = true, SignerList* sl = 0, ! CertType ct = USER); ~CertDecoder(); --- 238,242 ---- explicit CertDecoder(Source&, bool decode = true, SignerList* sl = 0, ! bool noVerify = false, CertType ct = USER); ~CertDecoder(); *************** *** 260,263 **** --- 260,264 ---- char* issuer_; // CommonName char* subject_; // CommonName + bool verify_; // Default to yes, but could be off void ReadHeader(); Index: block.hpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/include/block.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** block.hpp 27 Nov 2005 19:19:19 -0000 1.1 --- block.hpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 100,104 **** if (n == 0) return 0; ! return new T[n]; } --- 100,104 ---- if (n == 0) return 0; ! return NEW_TC T[n]; } Index: hash.hpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/yassl/taocrypt/include/hash.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hash.hpp 27 Nov 2005 19:19:19 -0000 1.1 --- hash.hpp 19 Feb 2006 16:51:07 -0000 1.2 *************** *** 77,80 **** --- 77,81 ---- + } // namespace |