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-09-19 19:21:18
|
Revision: 653 http://svn.sourceforge.net/dcplusplus/?rev=653&view=rev Author: arnetheduck Date: 2006-09-19 12:20:45 -0700 (Tue, 19 Sep 2006) Log Message: ----------- search socket fix, init order Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/AdcHub.cpp dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/ConnectionManager.h dcplusplus/trunk/client/SearchManager.cpp dcplusplus/trunk/client/SearchManager.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/version.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/main.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-09-19 19:20:45 UTC (rev 653) @@ -942,8 +942,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,5 - PRODUCTVERSION 0,6,9,5 + FILEVERSION 0,6,9,6 + PRODUCTVERSION 0,6,9,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -960,12 +960,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 5" + VALUE "FileVersion", "0, 6, 9, 6" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 5" + VALUE "ProductVersion", "0, 6, 9, 6" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/Example.xml 2006-09-19 19:20:45 UTC (rev 653) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.695" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.696" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> @@ -304,6 +304,7 @@ <String Name="NoUsers">No users</String> <String Name="NoUsersToDownloadFrom">No users to download from</String> <String Name="Normal">Normal</String> + <String Name="NotListening">Not listening for connections - please restart DC++</String> <String Name="Notepad">Notepad</String> <String Name="Offline">Offline</String> <String Name="Online">Online</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/changelog.txt 2006-09-19 19:20:45 UTC (rev 653) @@ -1,4 +1,4 @@ --- -- +-- 0.696 -- * Fixed a possible deadlock * [bug 1058] Removed some whitespace (big thanks to pothead) * Removed the possibility to download files without TTH Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -30,6 +30,8 @@ #include "UserCommand.h" #include "FavoriteManager.h" #include "CryptoManager.h" +#include "ResourceManager.h" +#include "LogManager.h" const string AdcHub::CLIENT_PROTOCOL("ADC/0.10"); const string AdcHub::SECURE_CLIENT_PROTOCOL("ADCS/0.10"); @@ -383,7 +385,11 @@ const string& proto = secure ? SECURE_CLIENT_PROTOCOL : CLIENT_PROTOCOL; short port = secure ? ConnectionManager::getInstance()->getSecurePort() : ConnectionManager::getInstance()->getPort(); - + if(port == 0) { + // Oops? + LogManager::getInstance()->message(STRING(NOT_LISTENING)); + return; + } if(ClientManager::getInstance()->isActive()) { send(AdcCommand(AdcCommand::CMD_CTM, user.getIdentity().getSID()).addParam(proto).addParam(Util::toString(port)).addParam(token)); } else { Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -51,6 +51,7 @@ server = new Server(false, port, SETTING(BIND_ADDRESS)); if(!CryptoManager::getInstance()->TLSOk()) { + dcdebug("Skipping secure port: %d\n", SETTING(USE_TLS)); return; } Modified: dcplusplus/trunk/client/ConnectionManager.h =================================================================== --- dcplusplus/trunk/client/ConnectionManager.h 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/ConnectionManager.h 2006-09-19 19:20:45 UTC (rev 653) @@ -115,8 +115,8 @@ void listen() throw(SocketException); void disconnect() throw(); - unsigned short getPort() { return static_cast<unsigned short>(server->getPort()); } - unsigned short getSecurePort() { return static_cast<unsigned short>(secureServer->getPort()); } + unsigned short getPort() { return server ? static_cast<unsigned short>(server->getPort()) : 0; } + unsigned short getSecurePort() { return secureServer ? static_cast<unsigned short>(secureServer->getPort()) : 0; } private: class Server : public Thread { Modified: dcplusplus/trunk/client/SearchManager.cpp =================================================================== --- dcplusplus/trunk/client/SearchManager.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/SearchManager.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -96,37 +96,14 @@ return getFile().substr(i + 1); } -void SearchManager::listen() throw(Exception) { - unsigned short lastPort = (unsigned short)SETTING(UDP_PORT); +void SearchManager::listen() throw(SocketException) { - if(lastPort == 0) - lastPort = (unsigned short)Util::rand(1025, 32000); - - unsigned short firstPort = lastPort; - disconnect(); - while(true) { - try { - if(socket != NULL) { - disconnect(); - } else { - socket = new Socket(); - } + socket = new Socket(); + socket->create(Socket::TYPE_UDP); + port = socket->bind(static_cast<short>(SETTING(UDP_PORT))); - socket->create(Socket::TYPE_UDP); - socket->bind(lastPort); - port = lastPort; - break; - } catch(const Exception&) { - short newPort = (short)((lastPort == 32000) ? 1025 : lastPort + 1); - if(!SettingsManager::getInstance()->isDefault(SettingsManager::UDP_PORT) || (firstPort == newPort)) { - throw Exception("Could not find a suitable free port"); - } - lastPort = newPort; - } - } - start(); } Modified: dcplusplus/trunk/client/SearchManager.h =================================================================== --- dcplusplus/trunk/client/SearchManager.h 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/SearchManager.h 2006-09-19 19:20:45 UTC (rev 653) @@ -38,6 +38,7 @@ #include "AdcCommand.h" class SearchManager; +class SocketException; class SearchResult : public FastAlloc<SearchResult> { public: @@ -146,7 +147,7 @@ return port; } - void listen() throw(Exception); + void listen() throw(SocketException); void disconnect() throw(); void onSearchResult(const string& aLine) { onData((const u_int8_t*)aLine.data(), aLine.length(), Util::emptyString); Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -305,6 +305,7 @@ "No users", "No users to download from", "Normal", +"Not listening for connections - please restart DC++", "Notepad", "Offline", "Online", @@ -931,6 +932,7 @@ "NoUsers", "NoUsersToDownloadFrom", "Normal", +"NotListening", "Notepad", "Offline", "Online", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/StringDefs.h 2006-09-19 19:20:45 UTC (rev 653) @@ -308,6 +308,7 @@ NO_USERS, // "No users" NO_USERS_TO_DOWNLOAD_FROM, // "No users to download from" NORMAL, // "Normal" + NOT_LISTENING, // "Not listening for connections - please restart DC++" NOTEPAD, // "Notepad" OFFLINE, // "Offline" ONLINE, // "Online" Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/client/version.h 2006-09-19 19:20:45 UTC (rev 653) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.695" -#define VERSIONFLOAT 0.695 +#define VERSIONSTRING "0.696" +#define VERSIONFLOAT 0.696 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/windows/SearchFrm.cpp =================================================================== --- dcplusplus/trunk/windows/SearchFrm.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/windows/SearchFrm.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -778,7 +778,9 @@ ucParams["fileFN"] = sr->getFile(); ucParams["fileSI"] = Util::toString(sr->getSize()); ucParams["fileSIshort"] = Util::formatBytes(sr->getSize()); - ucParams["fileTR"] = sr->getTTH().toBase32(); + if(sr->getType() == SearchResult::TYPE_FILE) { + ucParams["fileTR"] = sr->getTTH().toBase32(); + } // compatibility with 0.674 and earlier ucParams["file"] = ucParams["fileFN"]; @@ -854,8 +856,9 @@ if(ctrlResults.GetSelectedCount() == 1) { int i = ctrlResults.GetNextItem(-1, LVNI_SELECTED); SearchResult* sr = ctrlResults.getItemData(i)->sr; - - WinUtil::searchHash(sr->getTTH()); + if(sr->getType() == SearchResult::TYPE_FILE) { + WinUtil::searchHash(sr->getTTH()); + } } return 0; @@ -865,7 +868,9 @@ if(ctrlResults.GetSelectedCount() == 1) { int i = ctrlResults.GetNextItem(-1, LVNI_SELECTED); SearchResult* sr = ctrlResults.getItemData(i)->sr; - WinUtil::bitziLink(sr->getTTH()); + if(sr->getType() == SearchResult::TYPE_FILE) { + WinUtil::bitziLink(sr->getTTH()); + } } return 0; } @@ -874,7 +879,9 @@ if(ctrlResults.GetSelectedCount() == 1) { int i = ctrlResults.GetNextItem(-1, LVNI_SELECTED); SearchResult* sr = ctrlResults.getItemData(i)->sr; - WinUtil::copyMagnet(sr->getTTH(), Text::toT(sr->getFileName())); + if(sr->getType() == SearchResult::TYPE_FILE) { + WinUtil::copyMagnet(sr->getTTH(), Text::toT(sr->getFileName())); + } } return 0; } @@ -1140,7 +1147,9 @@ if(!tmpCountry.empty()) columns[COLUMN_IP] = tmpCountry + _T(" (") + columns[COLUMN_IP] + _T(")"); } - columns[COLUMN_TTH] = Text::toT(sr->getTTH().toBase32()); + if(sr->getType() == SearchResult::TYPE_FILE) { + columns[COLUMN_TTH] = Text::toT(sr->getTTH().toBase32()); + } columns[COLUMN_CID] = Text::toT(sr->getUser()->getCID().toBase32()); } Modified: dcplusplus/trunk/windows/main.cpp =================================================================== --- dcplusplus/trunk/windows/main.cpp 2006-09-19 13:00:44 UTC (rev 652) +++ dcplusplus/trunk/windows/main.cpp 2006-09-19 19:20:45 UTC (rev 653) @@ -212,8 +212,6 @@ CMessageLoop theLoop; _Module.AddMessageLoop(&theLoop); - MainFrame wndMain; - CEdit dummy; CEdit splash; @@ -249,6 +247,8 @@ SettingsManager::getInstance()->setDefault(SettingsManager::BACKGROUND_COLOR, (int)(GetSysColor(COLOR_WINDOW))); SettingsManager::getInstance()->setDefault(SettingsManager::TEXT_COLOR, (int)(GetSysColor(COLOR_WINDOWTEXT))); + MainFrame wndMain; + rc = wndMain.rcDefault; if( (SETTING(MAIN_WINDOW_POS_X) != CW_USEDEFAULT) && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-09-19 13:00:56
|
Revision: 652 http://svn.sourceforge.net/dcplusplus/?rev=652&view=rev Author: arnetheduck Date: 2006-09-19 06:00:44 -0700 (Tue, 19 Sep 2006) Log Message: ----------- patch Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/windows/AboutDlg.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-19 09:42:13 UTC (rev 651) +++ dcplusplus/trunk/changelog.txt 2006-09-19 13:00:44 UTC (rev 652) @@ -12,6 +12,7 @@ * Upgraded yaSSL to 1.4.0 * Fixed some SSL connection issues * Fixed on-the-fly compression of file lists +* [bug 1055] Stopped files.xml.bz2 from being deleted on linux (thanks dorian) -- 0.695 2006-09-10 -- * PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-09-19 09:42:13 UTC (rev 651) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-09-19 13:00:44 UTC (rev 652) @@ -70,7 +70,7 @@ WIN32_FIND_DATA data; HANDLE hFind; - hFind = FindFirstFile(Text::toT(Util::getConfigPath() + "files*.xml.bz2").c_str(), &data); + hFind = FindFirstFile(Text::toT(Util::getConfigPath() + "files?*.xml.bz2").c_str(), &data); if(hFind != INVALID_HANDLE_VALUE) { do { if(_tcslen(data.cFileName) > 13) // length of "files.xml.bz2" @@ -84,7 +84,7 @@ DIR* dir = opendir(Util::getConfigPath().c_str()); if (dir) { while (struct dirent* ent = readdir(dir)) { - if (fnmatch("files*.xml.bz2", ent->d_name, 0) == 0) { + if (fnmatch("files?*.xml.bz2", ent->d_name, 0) == 0) { File::deleteFile(Util::getConfigPath() + ent->d_name); } } Modified: dcplusplus/trunk/windows/AboutDlg.h =================================================================== --- dcplusplus/trunk/windows/AboutDlg.h 2006-09-19 09:42:13 UTC (rev 651) +++ dcplusplus/trunk/windows/AboutDlg.h 2006-09-19 13:00:44 UTC (rev 652) @@ -42,7 +42,7 @@ _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, bart vullings, ") -_T("steven sheehy, tobias nygren, poy. ") +_T("steven sheehy, tobias nygren, poy, dorian. ") _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-09-19 09:42:45
|
Revision: 651 http://svn.sourceforge.net/dcplusplus/?rev=651&view=rev Author: arnetheduck Date: 2006-09-19 02:42:13 -0700 (Tue, 19 Sep 2006) Log Message: ----------- Removed some more code, fixed some utf8 issues Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/Extensions.txt dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/DownloadManager.cpp dcplusplus/trunk/client/SearchManager.cpp dcplusplus/trunk/client/SearchManager.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/UploadManager.cpp dcplusplus/trunk/client/UploadManager.h dcplusplus/trunk/client/User.h dcplusplus/trunk/client/UserConnection.cpp dcplusplus/trunk/client/UserConnection.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/TransferView.cpp Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/Example.xml 2006-09-19 09:42:13 UTC (rev 651) @@ -551,7 +551,7 @@ <String Name="SocksFailed">The socks server failed establish a connection</String> <String Name="SocksNeedsAuth">The socks server requires authentication</String> <String Name="SocksSetupError">Failed to set up the socks server for UDP relay (check socks address and port)</String> - <String Name="SourceTooOld">Source client does not support TTH</String> + <String Name="SourceTooOld">Remote client does not fully support TTH - cannot download</String> <String Name="SourceTooSlow">Source too slow</String> <String Name="SourceType">Source Type</String> <String Name="SpecifySearchString">Specify a search string</String> Modified: dcplusplus/trunk/Extensions.txt =================================================================== --- dcplusplus/trunk/Extensions.txt 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/Extensions.txt 2006-09-19 09:42:13 UTC (rev 651) @@ -74,6 +74,7 @@ Feature: GetZBlock Since: 0.307 +Deprecated - replaced by ADCGet Usage: Instead of $Get and $Send, use "$GetZBlock <start> <numbytes> <filename>|" where <start> is the 0-based Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/changelog.txt 2006-09-19 09:42:13 UTC (rev 651) @@ -9,6 +9,9 @@ * [ADC] Fixed support for uncompressed files.xml as well as proper files.xml.bz2 support * Some socket code cleanup * Removed broken nick save code +* Upgraded yaSSL to 1.4.0 +* Fixed some SSL connection issues +* Fixed on-the-fly compression of file lists -- 0.695 2006-09-10 -- * PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo Modified: dcplusplus/trunk/client/DownloadManager.cpp =================================================================== --- dcplusplus/trunk/client/DownloadManager.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/DownloadManager.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -248,6 +248,7 @@ void DownloadManager::addConnection(UserConnection::Ptr conn) { if(!conn->isSet(UserConnection::FLAG_SUPPORTS_TTHF) || !conn->isSet(UserConnection::FLAG_SUPPORTS_ADCGET)) { // Can't download from these... + conn->getUser()->setFlag(User::OLD_CLIENT); QueueManager::getInstance()->removeSource(conn->getUser(), QueueItem::Source::FLAG_NO_TTHF); removeConnection(conn); } Modified: dcplusplus/trunk/client/SearchManager.cpp =================================================================== --- dcplusplus/trunk/client/SearchManager.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/SearchManager.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -29,7 +29,7 @@ SearchResult::SearchResult(Types aType, int64_t aSize, const string& aFile, const TTHValue& aTTH) : file(aFile), user(ClientManager::getInstance()->getMe()), size(aSize), type(aType), slots(SETTING(SLOTS)), freeSlots(UploadManager::getInstance()->getFreeSlots()), - tth(aTTH), utf8(true), ref(1) { } + tth(aTTH), ref(1) { } string SearchResult::toSR(const Client& c) const { // File: "$SR %s %s%c%s %d/%d%c%s (%s)|" @@ -39,7 +39,7 @@ tmp.append("$SR ", 4); tmp.append(Text::utf8ToAcp(c.getMyNick())); tmp.append(1, ' '); - string acpFile = utf8 ? Text::utf8ToAcp(file) : file; + string acpFile = Text::utf8ToAcp(file); if(type == TYPE_FILE) { tmp.append(acpFile); tmp.append(1, '\x05'); @@ -63,7 +63,7 @@ AdcCommand cmd(AdcCommand::CMD_RES, type); cmd.addParam("SI", Util::toString(size)); cmd.addParam("SL", Util::toString(freeSlots)); - cmd.addParam("FN", Util::toAdcFile(utf8 ? file : Text::acpToUtf8(file))); + cmd.addParam("FN", Util::toAdcFile(file)); cmd.addParam("TR", getTTH().toBase32()); return cmd; } @@ -211,12 +211,12 @@ if(j < i + 1) { return; } - file = x.substr(i, j-i) + '\\'; + file = Text::acpToUtf8(x.substr(i, j-i)) + '\\'; } else if(cnt == 2) { if( (j = x.find((char)5, i)) == string::npos) { return; } - file = x.substr(i, j-i); + file = Text::acpToUtf8(x.substr(i, j-i)); i = j + 1; if( (j = x.find(' ', i)) == string::npos) { return; @@ -264,7 +264,7 @@ return; SearchResult* sr = new SearchResult(user, type, slots, freeSlots, size, - file, hubName, url, remoteIp, TTHValue(tth), false, Util::emptyString); + file, hubName, url, remoteIp, TTHValue(tth), Util::emptyString); fire(SearchManagerListener::SR(), sr); sr->decRef(); } else if(x.compare(1, 4, "RES ") == 0 && x[x.length() - 1] == 0x0a) { @@ -326,7 +326,7 @@ return; /// @todo Something about the slots SearchResult* sr = new SearchResult(from, type, 0, freeSlots, size, - file, hubName, hub, remoteIp, TTHValue(tth), true, token); + file, hubName, hub, remoteIp, TTHValue(tth), token); fire(SearchManagerListener::SR(), sr); sr->decRef(); } Modified: dcplusplus/trunk/client/SearchManager.h =================================================================== --- dcplusplus/trunk/client/SearchManager.h 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/SearchManager.h 2006-09-19 09:42:13 UTC (rev 651) @@ -55,10 +55,10 @@ SearchResult(const User::Ptr& aUser, Types aType, int aSlots, int aFreeSlots, int64_t aSize, const string& aFile, const string& aHubName, - const string& aHubURL, const string& ip, TTHValue aTTH, bool aUtf8, const string& aToken) : + const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken) : file(aFile), hubName(aHubName), hubURL(aHubURL), user(aUser), size(aSize), type(aType), slots(aSlots), freeSlots(aFreeSlots), IP(ip), - tth(aTTH), token(aToken), utf8(aUtf8), ref(1) { } + tth(aTTH), token(aToken), ref(1) { } string getFileName() const; string toSR(const Client& client) const; @@ -75,7 +75,6 @@ int getSlots() const { return slots; } int getFreeSlots() const { return freeSlots; } TTHValue getTTH() const { return tth; } - bool getUtf8() const { return utf8; } const string& getIP() const { return IP; } const string& getToken() const { return token; } @@ -105,7 +104,6 @@ TTHValue tth; string token; - bool utf8; volatile long ref; }; Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -552,7 +552,7 @@ "The socks server failed establish a connection", "The socks server requires authentication", "Failed to set up the socks server for UDP relay (check socks address and port)", -"Source client does not support TTH", +"Remote client does not fully support TTH - cannot download", "Source too slow", "Source Type", "Specify a search string", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/StringDefs.h 2006-09-19 09:42:13 UTC (rev 651) @@ -555,7 +555,7 @@ SOCKS_FAILED, // "The socks server failed establish a connection" SOCKS_NEEDS_AUTH, // "The socks server requires authentication" SOCKS_SETUP_ERROR, // "Failed to set up the socks server for UDP relay (check socks address and port)" - SOURCE_TOO_OLD, // "Source client does not support TTH" + SOURCE_TOO_OLD, // "Remote client does not fully support TTH - cannot download" SOURCE_TOO_SLOW, // "Source too slow" SOURCE_TYPE, // "Source Type" SPECIFY_SEARCH_STRING, // "Specify a search string" Modified: dcplusplus/trunk/client/UploadManager.cpp =================================================================== --- dcplusplus/trunk/client/UploadManager.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/UploadManager.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -259,31 +259,6 @@ } } -void UploadManager::onGetBlock(UserConnection* aSource, const string& aFile, int64_t aStartPos, int64_t aBytes, bool z) { - if(!z || BOOLSETTING(COMPRESS_TRANSFERS)) { - if(prepareFile(aSource, "file", Util::toAdcFile(aFile), aStartPos, aBytes)) { - Upload* u = aSource->getUpload(); - dcassert(u != NULL); - if(aBytes == -1) - aBytes = u->getSize() - aStartPos; - - dcassert(aBytes >= 0); - - u->setStart(GET_TICK()); - - if(z) { - u->setFile(new FilteredInputStream<ZFilter, true>(u->getFile())); - u->setFlag(Upload::FLAG_ZUPLOAD); - } - - aSource->sending(aBytes); - aSource->setState(UserConnection::STATE_DONE); - aSource->transmitFile(u->getFile()); - fire(UploadManagerListener::Starting(), u); - } - } -} - void UploadManager::on(UserConnectionListener::Send, UserConnection* aSource) throw() { if(aSource->getState() != UserConnection::STATE_SEND) { dcdebug("UM::onSend Bad state, ignoring\n"); Modified: dcplusplus/trunk/client/UploadManager.h =================================================================== --- dcplusplus/trunk/client/UploadManager.h 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/UploadManager.h 2006-09-19 09:42:13 UTC (rev 651) @@ -182,8 +182,6 @@ virtual void on(BytesSent, UserConnection*, size_t, size_t) throw(); virtual void on(Failed, UserConnection*, const string&) throw(); virtual void on(Get, UserConnection*, const string&, int64_t) throw(); - virtual void on(GetBlock, UserConnection* conn, const string& line, int64_t resume, int64_t bytes) throw() { onGetBlock(conn, line, resume, bytes, false); } - virtual void on(GetZBlock, UserConnection* conn, const string& line, int64_t resume, int64_t bytes) throw() { onGetBlock(conn, line, resume, bytes, true); } virtual void on(Send, UserConnection*) throw(); virtual void on(GetListLength, UserConnection* conn) throw(); virtual void on(TransmitDone, UserConnection*) throw(); @@ -191,7 +189,6 @@ virtual void on(AdcCommand::GET, UserConnection*, const AdcCommand&) throw(); virtual void on(AdcCommand::GFI, UserConnection*, const AdcCommand&) throw(); - void onGetBlock(UserConnection* aSource, const string& aFile, int64_t aResume, int64_t aBytes, bool z); bool prepareFile(UserConnection* aSource, const string& aType, const string& aFile, int64_t aResume, int64_t aBytes, bool listRecursive = false); }; Modified: dcplusplus/trunk/client/User.h =================================================================== --- dcplusplus/trunk/client/User.h 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/User.h 2006-09-19 09:42:13 UTC (rev 651) @@ -40,7 +40,8 @@ NMDC_BIT, BOT_BIT, TTH_GET_BIT, - TLS_BIT + TLS_BIT, + OLD_CLIENT_BIT }; /** Each flag is set if it's true in at least one hub */ @@ -51,7 +52,8 @@ NMDC = 1<<NMDC_BIT, BOT = 1<<BOT_BIT, TTH_GET = 1<<TTH_GET_BIT, //< User supports getting files by tth -> don't have path in queue... - TLS = 1<<TLS_BIT //< Client supports SSL + TLS = 1<<TLS_BIT, //< Client supports SSL + OLD_CLIENT = 1<<OLD_CLIENT_BIT //< Can't download - old client }; typedef Pointer<User> Ptr; Modified: dcplusplus/trunk/client/UserConnection.cpp =================================================================== --- dcplusplus/trunk/client/UserConnection.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/UserConnection.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -116,28 +116,6 @@ if(x != string::npos) { fire(UserConnectionListener::Get(), this, Text::acpToUtf8(param.substr(0, x)), Util::toInt64(param.substr(x+1)) - (int64_t)1); } - } else if(cmd == "$GetZBlock" || cmd == "$UGetZBlock" || cmd == "$UGetBlock") { - string::size_type i = param.find(' '); - if(i == string::npos) - return; - int64_t start = Util::toInt64(param.substr(0, i)); - if(start < 0) { - disconnect(); - return; - } - i++; - string::size_type j = param.find(' ', i); - if(j == string::npos) - return; - int64_t bytes = Util::toInt64(param.substr(i, j-i)); - string name = param.substr(j+1); - if(cmd == "$GetZBlock") - name = Text::acpToUtf8(name); - if(cmd == "$UGetBlock") { - fire(UserConnectionListener::GetBlock(), this, name, start, bytes); - } else { - fire(UserConnectionListener::GetZBlock(), this, name, start, bytes); - } } else if(cmd == "$Key") { if(!param.empty()) fire(UserConnectionListener::Key(), this, param); Modified: dcplusplus/trunk/client/UserConnection.h =================================================================== --- dcplusplus/trunk/client/UserConnection.h 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/client/UserConnection.h 2006-09-19 09:42:13 UTC (rev 651) @@ -46,8 +46,6 @@ typedef X<5> Key; typedef X<6> Direction; typedef X<7> Get; - typedef X<8> GetBlock; - typedef X<9> GetZBlock; typedef X<10> Sending; typedef X<11> FileLength; typedef X<12> Send; @@ -70,8 +68,6 @@ virtual void on(Key, UserConnection*, const string&) throw() { } virtual void on(Direction, UserConnection*, const string&, const string&) throw() { } virtual void on(Get, UserConnection*, const string&, int64_t) throw() { } - virtual void on(GetBlock, UserConnection*, const string&, int64_t, int64_t) throw() { } - virtual void on(GetZBlock, UserConnection*, const string&, int64_t, int64_t) throw() { } virtual void on(Sending, UserConnection*, int64_t) throw() { } virtual void on(FileLength, UserConnection*, int64_t) throw() { } virtual void on(Send, UserConnection*) throw() { } @@ -235,8 +231,6 @@ void key(const string& aKey) { send("$Key " + aKey + '|'); } void direction(const string& aDirection, int aNumber) { send("$Direction " + aDirection + " " + Util::toString(aNumber) + '|'); } void get(const string& aFile, int64_t aResume) { send("$Get " + aFile + "$" + Util::toString(aResume + 1) + '|'); } // No acp - utf conversion here... - void getZBlock(const string& aFile, int64_t aResume, int64_t aBytes, bool utf8) { send((utf8 ? "$UGetZBlock " : "$GetZBlock ") + Util::toString(aResume) + ' ' + Util::toString(aBytes) + ' ' + aFile + '|'); } - void uGetBlock(const string& aFile, int64_t aResume, int64_t aBytes) { send("$UGetBlock " + Util::toString(aResume) + ' ' + Util::toString(aBytes) + ' ' + aFile + '|'); } void fileLength(const string& aLength) { send("$FileLength " + aLength + '|'); } void startSend() { send("$Send|"); } void sending(int64_t bytes) { send(bytes == -1 ? string("$Sending|") : "$Sending " + Util::toString(bytes) + "|"); } Modified: dcplusplus/trunk/windows/SearchFrm.cpp =================================================================== --- dcplusplus/trunk/windows/SearchFrm.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/windows/SearchFrm.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -352,8 +352,8 @@ } else { // match all here for(TStringIter j = search.begin(); j != search.end(); ++j) { - if((*j->begin() != _T('-') && Util::findSubString(aResult->getUtf8() ? aResult->getFile() : Text::acpToUtf8(aResult->getFile()), Text::fromT(*j)) == -1) || - (*j->begin() == _T('-') && j->size() != 1 && Util::findSubString(aResult->getUtf8() ? aResult->getFile() : Text::acpToUtf8(aResult->getFile()), Text::fromT(j->substr(1))) != -1) + if((*j->begin() != _T('-') && Util::findSubString(aResult->getFile(), Text::fromT(*j)) == -1) || + (*j->begin() == _T('-') && j->size() != 1 && Util::findSubString(aResult->getFile(), Text::fromT(j->substr(1))) != -1) ) { droppedResults++; @@ -1109,10 +1109,10 @@ void SearchFrame::SearchInfo::update() { if(sr->getType() == SearchResult::TYPE_FILE) { if(sr->getFile().rfind(_T('\\')) == tstring::npos) { - columns[COLUMN_FILENAME] = Text::toT(sr->getUtf8() ? sr->getFile() : Text::acpToUtf8(sr->getFile())); + columns[COLUMN_FILENAME] = Text::toT(sr->getFile()); } else { - 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()))); + columns[COLUMN_FILENAME] = Text::toT(Util::getFileName(sr->getFile())); + columns[COLUMN_PATH] = Text::toT(Util::getFilePath(sr->getFile())); } columns[COLUMN_TYPE] = Text::toT(Util::getFileExt(Text::fromT(columns[COLUMN_FILENAME]))); @@ -1121,8 +1121,8 @@ columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(sr->getSize())); columns[COLUMN_EXACT_SIZE] = Text::toT(Util::formatExactSize(sr->getSize())); } else { - 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_FILENAME] = Text::toT(sr->getFileName()); + columns[COLUMN_PATH] = Text::toT(sr->getFile()); columns[COLUMN_TYPE] = TSTRING(DIRECTORY); if(sr->getSize() > 0) { columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(sr->getSize())); Modified: dcplusplus/trunk/windows/TransferView.cpp =================================================================== --- dcplusplus/trunk/windows/TransferView.cpp 2006-09-18 21:40:58 UTC (rev 650) +++ dcplusplus/trunk/windows/TransferView.cpp 2006-09-19 09:42:13 UTC (rev 651) @@ -439,7 +439,11 @@ void TransferView::on(ConnectionManagerListener::Failed, ConnectionQueueItem* aCqi, const string& aReason) { UpdateInfo* ui = new UpdateInfo(aCqi->getUser(), aCqi->getDownload()); - ui->setStatusString(Text::toT(aReason)); + if(aCqi->getUser()->isSet(User::OLD_CLIENT)) { + ui->setStatusString(TSTRING(SOURCE_TOO_OLD)); + } else { + ui->setStatusString(Text::toT(aReason)); + } speak(UPDATE_ITEM, ui); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-09-18 21:43:01
|
Revision: 650 http://svn.sourceforge.net/dcplusplus/?rev=650&view=rev Author: arnetheduck Date: 2006-09-18 14:40:58 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Connection fixes, other small stuff Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/ClientManager.cpp dcplusplus/trunk/client/ClientManager.h dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/ConnectionManager.h dcplusplus/trunk/client/DownloadManager.cpp dcplusplus/trunk/client/DownloadManager.h dcplusplus/trunk/client/FavoriteManager.cpp dcplusplus/trunk/client/FavoriteManager.h dcplusplus/trunk/client/QueueItem.h dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/SSLSocket.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/SettingsManager.h dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/client/ShareManager.h dcplusplus/trunk/client/Socket.cpp dcplusplus/trunk/client/Socket.h dcplusplus/trunk/client/Speaker.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/UploadManager.cpp dcplusplus/trunk/client/User.h dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/windows/MainFrm.cpp dcplusplus/trunk/yassl/README dcplusplus/trunk/yassl/include/buffer.hpp dcplusplus/trunk/yassl/include/cert_wrapper.hpp dcplusplus/trunk/yassl/include/crypto_wrapper.hpp dcplusplus/trunk/yassl/include/factory.hpp dcplusplus/trunk/yassl/include/handshake.hpp dcplusplus/trunk/yassl/include/lock.hpp dcplusplus/trunk/yassl/include/log.hpp dcplusplus/trunk/yassl/include/openssl/ssl.h dcplusplus/trunk/yassl/include/socket_wrapper.hpp dcplusplus/trunk/yassl/include/timer.hpp dcplusplus/trunk/yassl/include/yassl_error.hpp dcplusplus/trunk/yassl/include/yassl_imp.hpp dcplusplus/trunk/yassl/include/yassl_int.hpp dcplusplus/trunk/yassl/include/yassl_types.hpp dcplusplus/trunk/yassl/mySTL/algorithm.hpp dcplusplus/trunk/yassl/mySTL/helpers.hpp dcplusplus/trunk/yassl/mySTL/list.hpp dcplusplus/trunk/yassl/mySTL/memory.hpp dcplusplus/trunk/yassl/mySTL/pair.hpp dcplusplus/trunk/yassl/mySTL/stdexcept.hpp dcplusplus/trunk/yassl/mySTL/vector.hpp dcplusplus/trunk/yassl/src/buffer.cpp dcplusplus/trunk/yassl/src/cert_wrapper.cpp dcplusplus/trunk/yassl/src/crypto_wrapper.cpp dcplusplus/trunk/yassl/src/handshake.cpp dcplusplus/trunk/yassl/src/lock.cpp dcplusplus/trunk/yassl/src/log.cpp dcplusplus/trunk/yassl/src/socket_wrapper.cpp dcplusplus/trunk/yassl/src/ssl.cpp dcplusplus/trunk/yassl/src/template_instnt.cpp dcplusplus/trunk/yassl/src/timer.cpp dcplusplus/trunk/yassl/src/yassl.cpp dcplusplus/trunk/yassl/src/yassl_error.cpp dcplusplus/trunk/yassl/src/yassl_imp.cpp dcplusplus/trunk/yassl/src/yassl_int.cpp dcplusplus/trunk/yassl/taocrypt/include/aes.hpp dcplusplus/trunk/yassl/taocrypt/include/algebra.hpp dcplusplus/trunk/yassl/taocrypt/include/arc4.hpp dcplusplus/trunk/yassl/taocrypt/include/asn.hpp dcplusplus/trunk/yassl/taocrypt/include/block.hpp dcplusplus/trunk/yassl/taocrypt/include/blowfish.hpp dcplusplus/trunk/yassl/taocrypt/include/coding.hpp dcplusplus/trunk/yassl/taocrypt/include/des.hpp dcplusplus/trunk/yassl/taocrypt/include/dh.hpp dcplusplus/trunk/yassl/taocrypt/include/dsa.hpp dcplusplus/trunk/yassl/taocrypt/include/error.hpp dcplusplus/trunk/yassl/taocrypt/include/file.hpp dcplusplus/trunk/yassl/taocrypt/include/hash.hpp dcplusplus/trunk/yassl/taocrypt/include/hmac.hpp dcplusplus/trunk/yassl/taocrypt/include/integer.hpp dcplusplus/trunk/yassl/taocrypt/include/kernelc.hpp dcplusplus/trunk/yassl/taocrypt/include/md2.hpp dcplusplus/trunk/yassl/taocrypt/include/md4.hpp dcplusplus/trunk/yassl/taocrypt/include/md5.hpp dcplusplus/trunk/yassl/taocrypt/include/misc.hpp dcplusplus/trunk/yassl/taocrypt/include/modarith.hpp dcplusplus/trunk/yassl/taocrypt/include/modes.hpp dcplusplus/trunk/yassl/taocrypt/include/pwdbased.hpp dcplusplus/trunk/yassl/taocrypt/include/random.hpp dcplusplus/trunk/yassl/taocrypt/include/ripemd.hpp dcplusplus/trunk/yassl/taocrypt/include/rsa.hpp dcplusplus/trunk/yassl/taocrypt/include/runtime.hpp dcplusplus/trunk/yassl/taocrypt/include/sha.hpp dcplusplus/trunk/yassl/taocrypt/include/twofish.hpp dcplusplus/trunk/yassl/taocrypt/include/type_traits.hpp dcplusplus/trunk/yassl/taocrypt/include/types.hpp dcplusplus/trunk/yassl/taocrypt/src/aes.cpp dcplusplus/trunk/yassl/taocrypt/src/aestables.cpp dcplusplus/trunk/yassl/taocrypt/src/algebra.cpp dcplusplus/trunk/yassl/taocrypt/src/arc4.cpp dcplusplus/trunk/yassl/taocrypt/src/asn.cpp dcplusplus/trunk/yassl/taocrypt/src/bftables.cpp dcplusplus/trunk/yassl/taocrypt/src/blowfish.cpp dcplusplus/trunk/yassl/taocrypt/src/coding.cpp dcplusplus/trunk/yassl/taocrypt/src/des.cpp dcplusplus/trunk/yassl/taocrypt/src/dh.cpp dcplusplus/trunk/yassl/taocrypt/src/dsa.cpp dcplusplus/trunk/yassl/taocrypt/src/file.cpp dcplusplus/trunk/yassl/taocrypt/src/hash.cpp dcplusplus/trunk/yassl/taocrypt/src/integer.cpp dcplusplus/trunk/yassl/taocrypt/src/md2.cpp dcplusplus/trunk/yassl/taocrypt/src/md4.cpp dcplusplus/trunk/yassl/taocrypt/src/md5.cpp dcplusplus/trunk/yassl/taocrypt/src/misc.cpp dcplusplus/trunk/yassl/taocrypt/src/random.cpp dcplusplus/trunk/yassl/taocrypt/src/ripemd.cpp dcplusplus/trunk/yassl/taocrypt/src/rsa.cpp dcplusplus/trunk/yassl/taocrypt/src/sha.cpp dcplusplus/trunk/yassl/taocrypt/src/template_instnt.cpp dcplusplus/trunk/yassl/taocrypt/src/tftables.cpp dcplusplus/trunk/yassl/taocrypt/src/twofish.cpp Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/Example.xml 2006-09-18 21:40:58 UTC (rev 650) @@ -563,7 +563,7 @@ <String Name="SystemLog">System Log</String> <String Name="Tag">Tag</String> <String Name="TargetFilenameTooLong">Target filename too long</String> - <String Name="TcpPortBusy">Unable to open TCP port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP port</String> + <String Name="TcpPortBusy">Unable to open TCP/TLS port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP/TLS port</String> <String Name="Tib">TiB</String> <String Name="Time">Time</String> <String Name="TimeLeft">Time left</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/changelog.txt 2006-09-18 21:40:58 UTC (rev 650) @@ -4,7 +4,11 @@ * Removed the possibility to download files without TTH * Removed the possibility to read *.DcLst files (no TTH, no i18n support) * Files with no TTH no longer show up in search and directory listings -* Fixed support for uncompressed files.xml +* Sources in the queue with no TTH support will no longer appear +* Files without TTH in the queue will be removed (finish downloads with an older version) +* [ADC] Fixed support for uncompressed files.xml as well as proper files.xml.bz2 support +* Some socket code cleanup +* Removed broken nick save code -- 0.695 2006-09-10 -- * PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -431,6 +431,10 @@ } } +void ClientManager::on(Load, SimpleXML&) throw() { + users.insert(make_pair(getMe()->getCID(), getMe())); +} + void ClientManager::on(TimerManagerListener::Minute, u_int32_t /* aTick */) throw() { Lock l(cs); @@ -449,43 +453,6 @@ } } -void ClientManager::save() { - Lock l(cs); - - try { - string tmp; - - File ff(getUsersFile() + ".tmp", File::WRITE, File::CREATE | File::TRUNCATE); - BufferedOutputStream<false> f(&ff); - - f.write(SimpleXML::utf8Header); - f.write(LIT("<Users Version=\"1\">\r\n")); - for(UserIter i = users.begin(); i != users.end(); ++i) { - User::Ptr& p = i->second; - if(p->isSet(User::SAVE_NICK) && !p->getCID().isZero() && !p->getFirstNick().empty()) { - f.write(LIT("\t<User CID=\"")); - f.write(p->getCID().toBase32()); - f.write(LIT("\" Nick=\"")); - f.write(SimpleXML::escape(p->getFirstNick(), tmp, true)); - f.write(LIT("\"/>\r\n")); - } - } - - f.write("</Users>\r\n"); - f.flush(); - ff.close(); - File::deleteFile(getUsersFile()); - File::renameFile(getUsersFile() + ".tmp", getUsersFile()); - - } catch(const FileException&) { - // ... - } -} - -void ClientManager::on(Save, SimpleXML*) throw() { - save(); -} - User::Ptr& ClientManager::getMe() { if(!me) { Lock l(cs); @@ -509,29 +476,6 @@ return CID(tiger.finalize()); } -void ClientManager::on(Load, SimpleXML*) throw() { - users.insert(make_pair(getMe()->getCID(), getMe())); - - try { - SimpleXML xml; - xml.fromXML(File(getUsersFile(), File::READ, File::OPEN).read()); - if(xml.findChild("Users") && xml.getChildAttrib("Version") == "1") { - xml.stepIn(); - while(xml.findChild("User")) { - const string& cid = xml.getChildAttrib("CID"); - const string& nick = xml.getChildAttrib("Nick"); - if(cid.length() != 39 || nick.empty()) - continue; - User::Ptr p(new User(CID(cid))); - p->setFirstNick(xml.getChildData()); - users.insert(make_pair(p->getCID(), p)); - } - } - } catch(const Exception& e) { - dcdebug("Error loading Users.xml: %s\n", e.getError().c_str()); - } -} - void ClientManager::on(Failed, Client* client, const string&) throw() { FavoriteManager::getInstance()->removeUserCommand(client->getHubUrl()); fire(ClientManagerListener::ClientDisconnected(), client); Modified: dcplusplus/trunk/client/ClientManager.h =================================================================== --- dcplusplus/trunk/client/ClientManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ClientManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -96,7 +96,6 @@ CID getMyCID(); const CID& getMyPID(); - void save(); private: typedef HASH_MAP<string, User::Ptr> LegacyMap; typedef LegacyMap::iterator LegacyIter; @@ -133,13 +132,10 @@ TimerManager::getInstance()->removeListener(this); } - string getUsersFile() { return Util::getConfigPath() + "Users.xml"; } - void updateCachedIp(); // SettingsManagerListener - virtual void on(Load, SimpleXML*) throw(); - virtual void on(Save, SimpleXML*) throw(); + virtual void on(Load, SimpleXML&); // ClientListener virtual void on(Connected, Client* c) throw() { fire(ClientManagerListener::ClientConnected(), c); } Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -31,7 +31,7 @@ #include "UserConnection.h" -ConnectionManager::ConnectionManager() : port(0), securePort(0), floodCounter(0), server(0), secureServer(0), shuttingDown(false) { +ConnectionManager::ConnectionManager() : floodCounter(0), server(0), secureServer(0), shuttingDown(false) { TimerManager::getInstance()->addListener(this); features.push_back(UserConnection::FEATURE_MINISLOTS); @@ -44,50 +44,19 @@ adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BZIP); } -// @todo clean this up -void ConnectionManager::listen() throw(Exception){ - unsigned short lastPort = (unsigned short)SETTING(TCP_PORT); - - if(lastPort == 0) - lastPort = (unsigned short)Util::rand(1025, 32000); - - unsigned short firstPort = lastPort; - +void ConnectionManager::listen() throw(SocketException){ disconnect(); + unsigned short port = static_cast<unsigned short>(SETTING(TCP_PORT)); - while(true) { - try { - server = new Server(false, lastPort, SETTING(BIND_ADDRESS)); - port = lastPort; - break; - } catch(const Exception&) { - short newPort = (short)((lastPort == 32000) ? 1025 : lastPort + 1); - if(!SettingsManager::getInstance()->isDefault(SettingsManager::TCP_PORT) || (firstPort == newPort)) { - throw Exception("Could not find a suitable free port"); - } - lastPort = newPort; - } - } + server = new Server(false, port, SETTING(BIND_ADDRESS)); if(!CryptoManager::getInstance()->TLSOk()) { return; } - lastPort = (unsigned short)SETTING(TLS_PORT); - firstPort = lastPort; - while(true) { - try { - secureServer = new Server(true, lastPort, SETTING(BIND_ADDRESS)); - securePort = lastPort; - break; - } catch(const Exception&) { - short newPort = (short)((lastPort == 32000) ? 1025 : lastPort + 1); - if(!SettingsManager::getInstance()->isDefault(SettingsManager::TCP_PORT) || (firstPort == newPort)) { - throw Exception("Could not find a suitable free port"); - } - lastPort = newPort; - } - } + port = static_cast<unsigned short>(SETTING(TLS_PORT)); + + secureServer = new Server(true, port, SETTING(BIND_ADDRESS)); } /** @@ -252,9 +221,9 @@ static const u_int32_t FLOOD_TRIGGER = 20000; static const u_int32_t FLOOD_ADD = 2000; -ConnectionManager::Server::Server(bool secure_, short port, const string& ip /* = "0.0.0.0" */) : secure(secure_), die(false) { +ConnectionManager::Server::Server(bool secure_, short aPort, const string& ip /* = "0.0.0.0" */) : port(0), secure(secure_), die(false) { sock.create(); - sock.bind(port, ip); + port = sock.bind(aPort, ip); sock.listen(); start(); @@ -345,6 +314,14 @@ } } +void ConnectionManager::disconnect() throw() { + delete server; + delete secureServer; + + server = secureServer = 0; +} + + void ConnectionManager::on(AdcCommand::SUP, UserConnection* aSource, const AdcCommand& cmd) throw() { if(aSource->getState() != UserConnection::STATE_SUPNICK) { // Already got this once, ignore...@todo fix support updates @@ -359,6 +336,11 @@ string feat = i->substr(2); if(feat == UserConnection::FEATURE_ADC_BASE) { baseOk = true; + // ADC clients must support all these... + aSource->setFlag(UserConnection::FLAG_SUPPORTS_ADCGET); + aSource->setFlag(UserConnection::FLAG_SUPPORTS_MINISLOTS); + aSource->setFlag(UserConnection::FLAG_SUPPORTS_TTHF); + aSource->setFlag(UserConnection::FLAG_SUPPORTS_TTHL); // For compatibility with older clients... aSource->setFlag(UserConnection::FLAG_SUPPORTS_XML_BZLIST); } else if(feat == UserConnection::FEATURE_ZLIB_GET) { Modified: dcplusplus/trunk/client/ConnectionManager.h =================================================================== --- dcplusplus/trunk/client/ConnectionManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ConnectionManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -33,6 +33,8 @@ #include "ConnectionManagerListener.h" +class SocketException; + class ConnectionQueueItem { public: typedef ConnectionQueueItem* Ptr; @@ -110,27 +112,23 @@ void shutdown(); /** Find a suitable port to listen on, and start doing it */ - void listen() throw(Exception); - void disconnect() throw() { - delete server; - delete secureServer; + void listen() throw(SocketException); + void disconnect() throw(); - server = secureServer = 0; - port = securePort = 0; - } - - unsigned short getPort() { return port; } - unsigned short getSecurePort() { return securePort; } + unsigned short getPort() { return static_cast<unsigned short>(server->getPort()); } + unsigned short getSecurePort() { return static_cast<unsigned short>(secureServer->getPort()); } private: class Server : public Thread { public: Server(bool secure_, short port, const string& ip = "0.0.0.0"); + short getPort() { return port; } virtual ~Server() { die = true; join(); } private: virtual int run() throw(); Socket sock; + short port; bool secure; bool die; }; @@ -138,8 +136,6 @@ friend class Server; CriticalSection cs; - unsigned short port; - unsigned short securePort; /** All ConnectionQueueItems */ ConnectionQueueItem::List downloads; Modified: dcplusplus/trunk/client/DownloadManager.cpp =================================================================== --- dcplusplus/trunk/client/DownloadManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/DownloadManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -49,7 +49,7 @@ const string DownloadManager::USER_LIST_NAME_BZ = "files.xml.bz2"; Download::Download() throw() : file(NULL), -crcCalc(NULL), tth(NULL), treeValid(false) { +crcCalc(NULL), treeValid(false) { } Download::Download(QueueItem* qi) throw() : @@ -63,7 +63,7 @@ setFlag(Download::FLAG_RESUME); } -AdcCommand Download::getCommand(bool zlib, bool tthf) { +AdcCommand Download::getCommand(bool zlib) { AdcCommand cmd(AdcCommand::CMD_GET); if(isSet(FLAG_TREE_DOWNLOAD)) { cmd.addParam("tthl"); @@ -72,15 +72,15 @@ } else { cmd.addParam("file"); } - if(tthf) { + if(isSet(FLAG_PARTIAL_LIST) || isSet(FLAG_USER_LIST)) { + cmd.addParam(Util::toAdcFile(getSource())); + } else { cmd.addParam("TTH/" + getTTH().toBase32()); - } else { - cmd.addParam(Util::toAdcFile(getSource())); } cmd.addParam(Util::toString(getPos())); cmd.addParam(Util::toString(getSize() - getPos())); - if(zlib && getSize() != -1 && BOOLSETTING(COMPRESS_TRANSFERS)) { + if(zlib && BOOLSETTING(COMPRESS_TRANSFERS)) { cmd.addParam("ZL1"); } @@ -91,7 +91,7 @@ TimerManager::getInstance()->addListener(this); } -~DownloadManager::DownloadManager() throw() { +DownloadManager::~DownloadManager() throw() { TimerManager::getInstance()->removeListener(this); while(true) { { @@ -246,7 +246,7 @@ } void DownloadManager::addConnection(UserConnection::Ptr conn) { - if(!conn->isSet(UserConnection::FLAG_SUPPORTS_TTHF)) { + if(!conn->isSet(UserConnection::FLAG_SUPPORTS_TTHF) || !conn->isSet(UserConnection::FLAG_SUPPORTS_ADCGET)) { // Can't download from these... QueueManager::getInstance()->removeSource(conn->getUser(), QueueItem::Source::FLAG_NO_TTHF); removeConnection(conn); @@ -333,7 +333,7 @@ downloads.push_back(d); } - aConn->send(d->getCommand(aConn->isSet(UserConnection::FLAG_SUPPORTS_ZLIB_GET), !d->isSet(Download::FLAG_USER_LIST))); + aConn->send(d->getCommand(aConn->isSet(UserConnection::FLAG_SUPPORTS_ZLIB_GET))); } class DummyOutputStream : public OutputStream { @@ -498,10 +498,10 @@ string target = d->getDownloadTarget(); File::ensureDirectory(target); if(d->isSet(Download::FLAG_USER_LIST)) { - if(!aSource->isSet(UserConnection::FLAG_NMDC) || aSource->isSet(UserConnection::FLAG_SUPPORTS_XML_BZLIST)) { + if(aSource->isSet(UserConnection::FLAG_SUPPORTS_XML_BZLIST)) { target += ".xml.bz2"; } else { - target += ".DcLst"; + target += ".xml"; } } Modified: dcplusplus/trunk/client/DownloadManager.h =================================================================== --- dcplusplus/trunk/client/DownloadManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/DownloadManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -90,7 +90,7 @@ TigerTree& getTigerTree() { return tt; } string& getPFS() { return pfs; } /** @internal */ - AdcCommand getCommand(bool zlib, bool tthf); + AdcCommand getCommand(bool zlib); typedef CalcOutputStream<CRC32Filter, true> CrcOS; GETSET(string, source, Source); Modified: dcplusplus/trunk/client/FavoriteManager.cpp =================================================================== --- dcplusplus/trunk/client/FavoriteManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/FavoriteManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -125,7 +125,6 @@ void FavoriteManager::addFavoriteUser(User::Ptr& aUser) { Lock l(cs); if(users.find(aUser->getCID()) == users.end()) { - aUser->setFlag(User::SAVE_NICK); StringList urls = ClientManager::getInstance()->getHubs(aUser->getCID()); StringList nicks = ClientManager::getInstance()->getNicks(aUser->getCID()); @@ -345,7 +344,6 @@ xml.addTag("Users"); xml.stepIn(); for(FavoriteMap::iterator j = users.begin(); j != users.end(); ++j) { - j->second.getUser()->setFlag(User::SAVE_NICK); xml.addTag("User"); xml.addChildAttrib("LastSeen", j->second.getLastSeen()); xml.addChildAttrib("GrantSlot", j->second.isSet(FavoriteUser::FLAG_GRANTSLOT)); @@ -418,7 +416,7 @@ if(xml.findChild("Favorites")) { xml.stepIn(); - load(&xml); + load(xml); xml.stepOut(); } } catch(const Exception& e) { @@ -426,37 +424,37 @@ } } -void FavoriteManager::load(SimpleXML* aXml) { +void FavoriteManager::load(SimpleXML& aXml) { dontSave = true; - aXml->resetCurrentChild(); - if(aXml->findChild("Hubs")) { - aXml->stepIn(); - while(aXml->findChild("Hub")) { + aXml.resetCurrentChild(); + if(aXml.findChild("Hubs")) { + aXml.stepIn(); + while(aXml.findChild("Hub")) { FavoriteHubEntry* e = new FavoriteHubEntry(); - e->setName(aXml->getChildAttrib("Name")); - e->setConnect(aXml->getBoolChildAttrib("Connect")); - e->setDescription(aXml->getChildAttrib("Description")); - e->setNick(aXml->getChildAttrib("Nick")); - e->setPassword(aXml->getChildAttrib("Password")); - e->setServer(aXml->getChildAttrib("Server")); - e->setUserDescription(aXml->getChildAttrib("UserDescription")); - e->setBottom((u_int16_t)aXml->getIntChildAttrib("Bottom") ); - e->setTop((u_int16_t)aXml->getIntChildAttrib("Top")); - e->setRight((u_int16_t)aXml->getIntChildAttrib("Right")); - e->setLeft((u_int16_t)aXml->getIntChildAttrib("Left")); + e->setName(aXml.getChildAttrib("Name")); + e->setConnect(aXml.getBoolChildAttrib("Connect")); + e->setDescription(aXml.getChildAttrib("Description")); + e->setNick(aXml.getChildAttrib("Nick")); + e->setPassword(aXml.getChildAttrib("Password")); + e->setServer(aXml.getChildAttrib("Server")); + e->setUserDescription(aXml.getChildAttrib("UserDescription")); + e->setBottom((u_int16_t)aXml.getIntChildAttrib("Bottom") ); + e->setTop((u_int16_t)aXml.getIntChildAttrib("Top")); + e->setRight((u_int16_t)aXml.getIntChildAttrib("Right")); + e->setLeft((u_int16_t)aXml.getIntChildAttrib("Left")); favoriteHubs.push_back(e); } - aXml->stepOut(); + aXml.stepOut(); } - aXml->resetCurrentChild(); - if(aXml->findChild("Users")) { - aXml->stepIn(); - while(aXml->findChild("User")) { + aXml.resetCurrentChild(); + if(aXml.findChild("Users")) { + aXml.stepIn(); + while(aXml.findChild("User")) { User::Ptr u; - const string& cid = aXml->getChildAttrib("CID"); - const string& nick = aXml->getChildAttrib("Nick"); - const string& hubUrl = aXml->getChildAttrib("URL"); + const string& cid = aXml.getChildAttrib("CID"); + const string& nick = aXml.getChildAttrib("Nick"); + const string& hubUrl = aXml.getChildAttrib("URL"); if(cid.length() != 39) { if(nick.empty() || hubUrl.empty()) @@ -469,35 +467,34 @@ } FavoriteMap::iterator i = users.insert(make_pair(u->getCID(), FavoriteUser(u, nick, hubUrl))).first; - if(aXml->getBoolChildAttrib("GrantSlot")) + if(aXml.getBoolChildAttrib("GrantSlot")) i->second.setFlag(FavoriteUser::FLAG_GRANTSLOT); - i->second.setLastSeen((u_int32_t)aXml->getIntChildAttrib("LastSeen")); - i->second.setDescription(aXml->getChildAttrib("UserDescription")); + i->second.setLastSeen((u_int32_t)aXml.getIntChildAttrib("LastSeen")); + i->second.setDescription(aXml.getChildAttrib("UserDescription")); - i->second.getUser()->setFlag(User::SAVE_NICK); } - aXml->stepOut(); + aXml.stepOut(); } - aXml->resetCurrentChild(); - if(aXml->findChild("UserCommands")) { - aXml->stepIn(); - while(aXml->findChild("UserCommand")) { - addUserCommand(aXml->getIntChildAttrib("Type"), aXml->getIntChildAttrib("Context"), - 0, aXml->getChildAttrib("Name"), aXml->getChildAttrib("Command"), aXml->getChildAttrib("Hub")); + aXml.resetCurrentChild(); + if(aXml.findChild("UserCommands")) { + aXml.stepIn(); + while(aXml.findChild("UserCommand")) { + addUserCommand(aXml.getIntChildAttrib("Type"), aXml.getIntChildAttrib("Context"), + 0, aXml.getChildAttrib("Name"), aXml.getChildAttrib("Command"), aXml.getChildAttrib("Hub")); } - aXml->stepOut(); + aXml.stepOut(); } //Favorite download to dirs - aXml->resetCurrentChild(); - if(aXml->findChild("FavoriteDirs")) { - aXml->stepIn(); - while(aXml->findChild("Directory")) { - string virt = aXml->getChildAttrib("Name"); - string d(aXml->getChildData()); + aXml.resetCurrentChild(); + if(aXml.findChild("FavoriteDirs")) { + aXml.stepIn(); + while(aXml.findChild("Directory")) { + string virt = aXml.getChildAttrib("Name"); + string d(aXml.getChildData()); FavoriteManager::getInstance()->addFavoriteDir(d, virt); } - aXml->stepOut(); + aXml.stepOut(); } dontSave = false; Modified: dcplusplus/trunk/client/FavoriteManager.h =================================================================== --- dcplusplus/trunk/client/FavoriteManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/FavoriteManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -269,11 +269,11 @@ void onHttpFinished() throw(); // SettingsManagerListener - virtual void on(SettingsManagerListener::Load, SimpleXML* xml) throw() { + virtual void on(SettingsManagerListener::Load, SimpleXML& xml) throw() { load(xml); } - void load(SimpleXML* aXml); + void load(SimpleXML& aXml); string getConfigFile() { return Util::getConfigPath() + "Favorites.xml"; } }; Modified: dcplusplus/trunk/client/QueueItem.h =================================================================== --- dcplusplus/trunk/client/QueueItem.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/QueueItem.h 2006-09-18 21:40:58 UTC (rev 650) @@ -188,7 +188,7 @@ if(isSet(QueueItem::FLAG_XML_BZLIST)) { return getTarget() + ".xml.bz2"; } else { - return getTarget() + ".DcLst"; + return getTarget() + ".xml"; } } Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -561,7 +561,6 @@ wantConnection = false; } else { userQueue.add(qi, aUser); - aUser->setFlag(User::SAVE_NICK); } fire(QueueManagerListener::SourcesUpdated(), qi); @@ -1143,8 +1142,6 @@ File::deleteFile(getQueueFile()); File::renameFile(getQueueFile() + ".tmp", getQueueFile()); - ClientManager::getInstance()->save(); - dirty = false; } catch(const FileException&) { // ... Modified: dcplusplus/trunk/client/SSLSocket.cpp =================================================================== --- dcplusplus/trunk/client/SSLSocket.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/SSLSocket.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -30,9 +30,9 @@ } void SSLSocket::connect(const string& aIp, short aPort) throw(SocketException) { + Socket::setBlocking(true); Socket::connect(aIp, aPort); - setBlocking(true); if(ssl) SSL_free(ssl); @@ -43,12 +43,12 @@ checkSSL(SSL_set_fd(ssl, sock)); checkSSL(SSL_connect(ssl)); dcdebug("Connected to SSL server using %s\n", SSL_get_cipher(ssl)); + Socket::setBlocking(false); } void SSLSocket::accept(const Socket& listeningSocket) throw(SocketException) { Socket::accept(listeningSocket); - setBlocking(true); if(ssl) SSL_free(ssl); Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -371,7 +371,7 @@ File::ensureDirectory(SETTING(TLS_TRUSTED_CERTIFICATES_PATH)); - fire(SettingsManagerListener::Load(), &xml); + fire(SettingsManagerListener::Load(), xml); xml.stepOut(); @@ -422,7 +422,7 @@ } xml.stepOut(); - fire(SettingsManagerListener::Save(), &xml); + fire(SettingsManagerListener::Save(), xml); try { File out(aFileName + ".tmp", File::WRITE, File::CREATE | File::TRUNCATE); Modified: dcplusplus/trunk/client/SettingsManager.h =================================================================== --- dcplusplus/trunk/client/SettingsManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/SettingsManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -37,8 +37,8 @@ typedef X<0> Load; typedef X<1> Save; - virtual void on(Load, SimpleXML*) throw() { } - virtual void on(Save, SimpleXML*) throw() { } + virtual void on(Load, SimpleXML&) throw() { } + virtual void on(Save, SimpleXML&) throw() { } }; class SettingsManager : public Singleton<SettingsManager>, public Speaker<SettingsManagerListener> Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -248,14 +248,14 @@ return tmp; } -void ShareManager::load(SimpleXML* aXml) { +void ShareManager::load(SimpleXML& aXml) { WLock<> l(cs); - if(aXml->findChild("Share")) { - aXml->stepIn(); - while(aXml->findChild("Directory")) { - const string& virt = aXml->getChildAttrib("Virtual"); - string d(aXml->getChildData()), newVirt; + if(aXml.findChild("Share")) { + aXml.stepIn(); + while(aXml.findChild("Directory")) { + const string& virt = aXml.getChildAttrib("Virtual"); + string d(aXml.getChildData()), newVirt; if(d[d.length() - 1] != PATH_SEPARATOR) d += PATH_SEPARATOR; @@ -278,7 +278,7 @@ virtualMap.push_back(make_pair(newVirt, d)); } } - aXml->stepOut(); + aXml.stepOut(); } } @@ -362,16 +362,16 @@ return false; } -void ShareManager::save(SimpleXML* aXml) { +void ShareManager::save(SimpleXML& aXml) { RLock<> l(cs); - aXml->addTag("Share"); - aXml->stepIn(); + aXml.addTag("Share"); + aXml.stepIn(); for(StringPairIter i = virtualMap.begin(); i != virtualMap.end(); ++i) { - aXml->addTag("Directory", i->second); - aXml->addChildAttrib("Virtual", i->first); + aXml.addTag("Directory", i->second); + aXml.addChildAttrib("Virtual", i->first); } - aXml->stepOut(); + aXml.stepOut(); } void ShareManager::addDirectory(const string& aDirectory, const string& aName) throw(ShareException) { Modified: dcplusplus/trunk/client/ShareManager.h =================================================================== --- dcplusplus/trunk/client/ShareManager.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/ShareManager.h 2006-09-18 21:40:58 UTC (rev 650) @@ -308,17 +308,17 @@ virtual void on(HashManagerListener::TTHDone, const string& fname, const TTHValue& root) throw(); // SettingsManagerListener - virtual void on(SettingsManagerListener::Save, SimpleXML* xml) throw() { + virtual void on(SettingsManagerListener::Save, SimpleXML& xml) throw() { save(xml); } - virtual void on(SettingsManagerListener::Load, SimpleXML* xml) throw() { + virtual void on(SettingsManagerListener::Load, SimpleXML& xml) throw() { load(xml); } // TimerManagerListener virtual void on(TimerManagerListener::Minute, u_int32_t tick) throw(); - void load(SimpleXML* aXml); - void save(SimpleXML* aXml); + void load(SimpleXML& aXml); + void save(SimpleXML& aXml); }; Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/Socket.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -97,7 +97,7 @@ } -void Socket::bind(short aPort, const string& aIp /* = 0.0.0.0 */) throw (SocketException){ +short Socket::bind(short aPort, const string& aIp /* = 0.0.0.0 */) throw (SocketException){ sockaddr_in sock_addr; sock_addr.sin_family = AF_INET; @@ -108,6 +108,9 @@ sock_addr.sin_addr.s_addr = htonl(INADDR_ANY); check(::bind(sock, (sockaddr *)&sock_addr, sizeof(sock_addr))); } + int size = sizeof(sock_addr); + getsockname(sock, (sockaddr*)&sock_addr, &size); + return ntohs(sock_addr.sin_port); } void Socket::listen() throw(SocketException) { Modified: dcplusplus/trunk/client/Socket.h =================================================================== --- dcplusplus/trunk/client/Socket.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/Socket.h 2006-09-18 21:40:58 UTC (rev 650) @@ -169,7 +169,7 @@ virtual void create(int aType = TYPE_TCP) throw(SocketException); /** Binds a socket to a certain local port and possibly IP. */ - virtual void bind(short aPort = 0, const string& aIp = "0.0.0.0") throw(SocketException); + virtual short bind(short aPort = 0, const string& aIp = "0.0.0.0") throw(SocketException); virtual void listen() throw(SocketException); virtual void accept(const Socket& listeningSocket) throw(SocketException); Modified: dcplusplus/trunk/client/Speaker.h =================================================================== --- dcplusplus/trunk/client/Speaker.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/Speaker.h 2006-09-18 21:40:58 UTC (rev 650) @@ -51,6 +51,14 @@ (*i)->on(type, p1); } } + template<typename T0, class T1> + void fire(T0 type, T1& p1) throw() { + Lock l(listenerCS); + tmp = listeners; + for(ListenerIter i=tmp.begin(); i != tmp.end(); ++i ) { + (*i)->on(type, p1); + } + } template<typename T0, class T1, class T2> void fire(T0 type, const T1& p1, const T2& p2) throw() { Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -564,7 +564,7 @@ "System Log", "Tag", "Target filename too long", -"Unable to open TCP port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP port", +"Unable to open TCP/TLS port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP/TLS port", "TiB", "Time", "Time left", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/StringDefs.h 2006-09-18 21:40:58 UTC (rev 650) @@ -567,7 +567,7 @@ SYSTEM_LOG, // "System Log" TAG, // "Tag" TARGET_FILENAME_TOO_LONG, // "Target filename too long" - TCP_PORT_BUSY, // "Unable to open TCP port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP port" + TCP_PORT_BUSY, // "Unable to open TCP/TLS port. File transfers will not work correctly until you change settings or turn off any application that might be using the TCP/TLS port" TiB, // "TiB" TIME, // "Time" TIME_LEFT, // "Time left" Modified: dcplusplus/trunk/client/UploadManager.cpp =================================================================== --- dcplusplus/trunk/client/UploadManager.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/UploadManager.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -166,7 +166,7 @@ bool isFavorite = FavoriteManager::getInstance()->hasSlot(aSource->getUser()); if(!(hasReserved || isFavorite || getFreeSlots() > 0 || getAutoSlot())) { - bool supportsFree = aSource->isSet(UserConnection::FLAG_SUPPORTS_MINISLOTS) || !aSource->isSet(UserConnection::FLAG_NMDC); + bool supportsFree = aSource->isSet(UserConnection::FLAG_SUPPORTS_MINISLOTS); bool allowedFree = aSource->isSet(UserConnection::FLAG_HASEXTRASLOT) || aSource->isSet(UserConnection::FLAG_OP) || getFreeExtraSlots() > 0; if(free && supportsFree && allowedFree) { extraSlot = true; Modified: dcplusplus/trunk/client/User.h =================================================================== --- dcplusplus/trunk/client/User.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/User.h 2006-09-18 21:40:58 UTC (rev 650) @@ -40,7 +40,6 @@ NMDC_BIT, BOT_BIT, TTH_GET_BIT, - SAVE_NICK_BIT, TLS_BIT }; @@ -52,7 +51,6 @@ NMDC = 1<<NMDC_BIT, BOT = 1<<BOT_BIT, TTH_GET = 1<<TTH_GET_BIT, //< User supports getting files by tth -> don't have path in queue... - SAVE_NICK = 1<<SAVE_NICK_BIT, //< Save cid->nick association TLS = 1<<TLS_BIT //< Client supports SSL }; Modified: dcplusplus/trunk/client/Util.cpp =================================================================== --- dcplusplus/trunk/client/Util.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/client/Util.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -941,7 +941,7 @@ } string Util::toAdcFile(const string& file) { - if(file == "files.xml.bz2" || file == "MyList.DcLst") + if(file == "files.xml.bz2" || file == "files.xml") return file; string ret; Modified: dcplusplus/trunk/windows/MainFrm.cpp =================================================================== --- dcplusplus/trunk/windows/MainFrm.cpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/windows/MainFrm.cpp 2006-09-18 21:40:58 UTC (rev 650) @@ -1083,7 +1083,6 @@ if(qi->isSet(QueueItem::FLAG_CLIENT_VIEW)) { if(qi->isSet(QueueItem::FLAG_USER_LIST)) { // This is a file listing, show it... - DirectoryListInfo* i = new DirectoryListInfo(qi->getCurrent()->getUser(), Text::toT(qi->getListName()), speed); PostMessage(WM_SPEAKER, DOWNLOAD_LISTING, (LPARAM)i); Modified: dcplusplus/trunk/yassl/README =================================================================== --- dcplusplus/trunk/yassl/README 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/README 2006-09-18 21:40:58 UTC (rev 650) @@ -1,7 +1,18 @@ -yaSSL Release notes, version 1.3.7 (06/26/06) +yaSSL Release notes, version 1.4.0 (08/13/06) This release of yaSSL contains bug fixes, portability enhancements, + nonblocking connect and accept, better OpenSSL error mapping, and + certificate caching for session resumption. + +See normal build instructions below under 1.0.6. +See libcurl build instructions below under 1.3.0. + + +********************yaSSL Release notes, version 1.3.7 (06/26/06) + + + This release of yaSSL contains bug fixes, portability enhancements, and libcurl 7.15.4 support (any newer versions may not build). See normal build instructions below under 1.0.6. Modified: dcplusplus/trunk/yassl/include/buffer.hpp =================================================================== --- dcplusplus/trunk/yassl/include/buffer.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/buffer.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/cert_wrapper.hpp =================================================================== --- dcplusplus/trunk/yassl/include/cert_wrapper.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/cert_wrapper.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -116,6 +120,7 @@ void setVerifyNone(); void setFailNoCert(); void setSendVerify(); + void setPeerX509(X509*); private: CertManager(const CertManager&); // hide copy CertManager& operator=(const CertManager&); // and assign Modified: dcplusplus/trunk/yassl/include/crypto_wrapper.hpp =================================================================== --- dcplusplus/trunk/yassl/include/crypto_wrapper.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/crypto_wrapper.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,6 +40,7 @@ #define yaSSL_CRYPTO_WRAPPER_HPP #include "yassl_types.hpp" +#include <stdio.h> // FILE namespace yaSSL { @@ -410,9 +415,10 @@ class x509; -x509* PemToDer(const char*, CertType); +x509* PemToDer(FILE*, CertType); + } // naemspace #endif // yaSSL_CRYPTO_WRAPPER_HPP Modified: dcplusplus/trunk/yassl/include/factory.hpp =================================================================== --- dcplusplus/trunk/yassl/include/factory.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/factory.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/handshake.hpp =================================================================== --- dcplusplus/trunk/yassl/include/handshake.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/handshake.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/lock.hpp =================================================================== --- dcplusplus/trunk/yassl/include/lock.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/lock.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/log.hpp =================================================================== --- dcplusplus/trunk/yassl/include/log.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/log.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/openssl/ssl.h =================================================================== --- dcplusplus/trunk/yassl/include/openssl/ssl.h 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/openssl/ssl.h 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,6 +40,10 @@ #include "opensslv.h" /* for version number */ #include "rsa.h" + +#define YASSL_VERSION "1.4.0" + + #if defined(__cplusplus) extern "C" { #endif @@ -497,7 +505,9 @@ #define V_ASN1_UTF8STRING 12 #define GEN_DNS 2 +#define CERTFICATE_ERROR 0x14090086 /* SSLv3 error */ + typedef struct MD4_CTX { int buffer[32]; /* big enough to hold, check size in Init */ } MD4_CTX; Modified: dcplusplus/trunk/yassl/include/socket_wrapper.hpp =================================================================== --- dcplusplus/trunk/yassl/include/socket_wrapper.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/socket_wrapper.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -67,6 +71,7 @@ class Socket { socket_t socket_; // underlying socket descriptor bool wouldBlock_; // for non-blocking data + bool blocking_; // is option set public: explicit Socket(socket_t s = INVALID_SOCKET); ~Socket(); @@ -80,6 +85,7 @@ bool wait(); bool WouldBlock() const; + bool IsBlocking() const; void closeSocket(); void shutDown(int how = SD_SEND); Modified: dcplusplus/trunk/yassl/include/timer.hpp =================================================================== --- dcplusplus/trunk/yassl/include/timer.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/timer.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/yassl_error.hpp =================================================================== --- dcplusplus/trunk/yassl/include/yassl_error.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/yassl_error.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/include/yassl_imp.hpp =================================================================== --- dcplusplus/trunk/yassl/include/yassl_imp.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/yassl_imp.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -622,6 +626,7 @@ bool send_server_key_; // server key exchange? bool master_clean_; // master secret clean? bool TLS_; // TLSv1 or greater + bool sessionID_Set_; // do we have a session ProtocolVersion version_; RandomPool& random_; @@ -664,9 +669,9 @@ char cipher_name_[MAX_SUITE_NAME]; char cipher_list_[MAX_CIPHERS][MAX_SUITE_NAME]; - Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion); + Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion, bool haveDH); - void SetSuites(ProtocolVersion pv); + void SetSuites(ProtocolVersion pv, bool removeDH = false); void SetCipherNames(); private: Parameters(const Parameters&); // hide copy Modified: dcplusplus/trunk/yassl/include/yassl_int.hpp =================================================================== --- dcplusplus/trunk/yassl/include/yassl_int.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/yassl_int.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,7 +40,11 @@ #include "lock.hpp" #include "openssl/ssl.h" // ASN1_STRING and DH +#ifdef _POSIX_THREADS + #include <pthread.h> +#endif + namespace yaSSL { @@ -76,12 +84,35 @@ }; +// client connect state for nonblocking restart +enum ConnectState { + CONNECT_BEGIN = 0, + CLIENT_HELLO_SENT, + FIRST_REPLY_DONE, + FINISHED_DONE, + SECOND_REPLY_DONE +}; + + +// server accpet state for nonblocking restart +enum AcceptState { + ACCEPT_BEGIN = 0, + ACCEPT_FIRST_REPLY_DONE, + SERVER_HELLO_DONE, + ACCEPT_SECOND_REPLY_DONE, + ACCEPT_FINISHED_DONE, + ACCEPT_THIRD_REPLY_DONE +}; + + // combines all states class States { RecordLayerState recordLayer_; HandShakeState handshakeLayer_; ClientState clientState_; ServerState serverState_; + ConnectState connectState_; + AcceptState acceptState_; char errorString_[MAX_ERROR_SZ]; YasslError what_; public: @@ -91,6 +122,8 @@ const HandShakeState& getHandShake() const; const ClientState& getClient() const; const ServerState& getServer() const; + const ConnectState& GetConnect() const; + const AcceptState& GetAccept() const; const char* getString() const; YasslError What() const; @@ -98,6 +131,8 @@ HandShakeState& useHandShake(); ClientState& useClient(); ServerState& useServer(); + ConnectState& UseConnect(); + AcceptState& UseAccept(); char* useString(); void SetError(YasslError); private: @@ -138,8 +173,9 @@ X509_NAME(const char*, size_t sz); ~X509_NAME(); - char* GetName(); + const char* GetName() const; ASN1_STRING* GetEntry(int i); + size_t GetLength() const; private: X509_NAME(const X509_NAME&); // hide copy X509_NAME& operator=(const X509_NAME&); // and assign @@ -153,6 +189,9 @@ ~StringHolder(); ASN1_STRING* GetString(); +private: + StringHolder(const StringHolder&); // hide copy + StringHolder& operator=(const StringHolder&); // and assign }; @@ -172,6 +211,7 @@ ASN1_STRING* GetBefore(); ASN1_STRING* GetAfter(); + private: X509(const X509&); // hide copy X509& operator=(const X509&); // and assign @@ -198,21 +238,25 @@ uint bornOn_; // create time in seconds uint timeout_; // timeout in seconds RandomPool& random_; // will clean master secret + X509* peerX509_; public: explicit SSL_SESSION(RandomPool&); SSL_SESSION(const SSL&, RandomPool&); ~SSL_SESSION(); - const opaque* GetID() const; - const opaque* GetSecret() const; - const Cipher* GetSuite() const; - uint GetBornOn() const; - uint GetTimeOut() const; + const opaque* GetID() const; + const opaque* GetSecret() const; + const Cipher* GetSuite() const; + uint GetBornOn() const; + uint GetTimeOut() const; + X509* GetPeerX509() const; void SetTimeOut(uint); SSL_SESSION& operator=(const SSL_SESSION&); // allow assign for resumption private: SSL_SESSION(const SSL_SESSION&); // hide copy + + void CopyX509(X509*); }; @@ -237,8 +281,42 @@ }; +#ifdef _POSIX_THREADS + typedef pthread_t THREAD_ID_T; +#else + typedef DWORD THREAD_ID_T; +#endif + +// thread error data +struct ThreadError { + THREAD_ID_T threadID_; + int errorID_; +}; + + +// holds all errors +class Errors { + mySTL::list<ThreadError> list_; + Mutex mutex_; + + Errors() {} // only GetErrors can create +public: + int Lookup(bool peek); // self lookup + void Add(int); + void Remove(); // remove self + + ~Errors() {} + + friend Errors& GetErrors(); // singleton creator +private: + Errors(const Errors&); // hide copy + Errors& operator=(const Errors); // and assign +}; + + Sessions& GetSessions(); // forward singletons sslFactory& GetSSL_Factory(); +Errors& GetErrors(); // openSSL method and context types @@ -429,24 +507,28 @@ // holds input and output buffers class Buffers { +public: + typedef mySTL::list<input_buffer*> inputList; + typedef mySTL::list<output_buffer*> outputList; +private: + inputList dataList_; // list of users app data / handshake + outputList handShakeList_; // buffered handshake msgs + input_buffer* rawInput_; // buffered raw input yet to process public: - Buffers() {} + Buffers(); ~Buffers(); - typedef mySTL::list<input_buffer*> inputList; - typedef mySTL::list<output_buffer*> outputList; - - const inputList& getData() const; + const inputList& getData() const; const outputList& getHandShake() const; inputList& useData(); outputList& useHandShake(); + + void SetRawInput(input_buffer*); // takes ownership + input_buffer* TakeRawInput(); // takes ownership private: Buffers(const Buffers&); // hide copy - Buffers& operator=(const Buffers&); // and assign - - inputList dataList_; // list of users app data / handshake - outputList handShakeList_; // buffered handshake msgs + Buffers& operator=(const Buffers&); // and assign }; @@ -459,7 +541,7 @@ bool resuming_; // trying to resume public: Security(ProtocolVersion, RandomPool&, ConnectionEnd, const Ciphers&, - SSL_CTX*); + SSL_CTX*, bool); const SSL_CTX* GetContext() const; const Connection& get_connection() const; @@ -505,6 +587,7 @@ sslHashes& useHashes(); Socket& useSocket(); Log& useLog(); + Buffers& useBuffers(); // sets void set_pending(Cipher suite); Modified: dcplusplus/trunk/yassl/include/yassl_types.hpp =================================================================== --- dcplusplus/trunk/yassl/include/yassl_types.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/include/yassl_types.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -9,6 +9,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. + * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: dcplusplus/trunk/yassl/mySTL/algorithm.hpp =================================================================== --- dcplusplus/trunk/yassl/mySTL/algorithm.hpp 2006-09-18 18:13:50 UTC (rev 649) +++ dcplusplus/trunk/yassl/mySTL/algorithm.hpp 2006-09-18 21:40:58 UTC (rev 650) @@ -8,6 +8,10 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. + * + * There are special exceptions to the terms and conditions of the GPL as it + * is applied to yaSSL. View the full text of the exception in the file + * FLOSS-EXCEPTIONS in the directory of this software distribution. * * yaSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: dcplusplus/trunk/yassl/mySTL/helpers.hpp =================================================================== --- dcplusplus/trunk/yassl/mySTL/helpers.hpp 2006-09-18 18:13:... [truncated message content] |
From: <arn...@us...> - 2006-09-18 18:16:57
|
Revision: 649 http://svn.sourceforge.net/dcplusplus/?rev=649&view=rev Author: arnetheduck Date: 2006-09-18 11:13:50 -0700 (Mon, 18 Sep 2006) Log Message: ----------- Removed non-hashing support Modified Paths: -------------- dcplusplus/trunk/Example.xml 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/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/Exception.h dcplusplus/trunk/client/FastAlloc.h dcplusplus/trunk/client/FavoriteManager.cpp dcplusplus/trunk/client/FavoriteManager.h dcplusplus/trunk/client/File.h dcplusplus/trunk/client/FinishedManager.cpp dcplusplus/trunk/client/FinishedManager.h dcplusplus/trunk/client/HashManager.cpp dcplusplus/trunk/client/HashManager.h dcplusplus/trunk/client/HttpConnection.cpp dcplusplus/trunk/client/HttpConnection.h dcplusplus/trunk/client/LogManager.h dcplusplus/trunk/client/MerkleCheckOutputStream.h dcplusplus/trunk/client/MerkleTree.h dcplusplus/trunk/client/NmdcHub.cpp 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/SearchManager.cpp dcplusplus/trunk/client/SearchManager.h dcplusplus/trunk/client/SearchManagerListener.h dcplusplus/trunk/client/Semaphore.h 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/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/StringSearch.h dcplusplus/trunk/client/Text.cpp dcplusplus/trunk/client/Thread.h dcplusplus/trunk/client/TigerHash.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/stdinc.h 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.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.h dcplusplus/trunk/windows/CommandDlg.cpp 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/ExtendedTrace.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/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/MemDC.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/PublicHubsFrm.cpp dcplusplus/trunk/windows/PublicHubsFrm.h dcplusplus/trunk/windows/QueueFrame.cpp dcplusplus/trunk/windows/QueueFrame.h dcplusplus/trunk/windows/QueuePage.h dcplusplus/trunk/windows/SearchFrm.cpp dcplusplus/trunk/windows/SearchFrm.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/UCPage.cpp dcplusplus/trunk/windows/UCPage.h dcplusplus/trunk/windows/UPnP.cpp 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.h dcplusplus/trunk/windows/main.cpp dcplusplus/trunk/windows/stdafx.h Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/Example.xml 2006-09-18 18:13:50 UTC (rev 649) @@ -551,6 +551,7 @@ <String Name="SocksFailed">The socks server failed establish a connection</String> <String Name="SocksNeedsAuth">The socks server requires authentication</String> <String Name="SocksSetupError">Failed to set up the socks server for UDP relay (check socks address and port)</String> + <String Name="SourceTooOld">Source client does not support TTH</String> <String Name="SourceTooSlow">Source too slow</String> <String Name="SourceType">Source Type</String> <String Name="SpecifySearchString">Specify a search string</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/changelog.txt 2006-09-18 18:13:50 UTC (rev 649) @@ -1,4 +1,12 @@ --- 0.695 2006-09-10 -- +-- -- +* Fixed a possible deadlock +* [bug 1058] Removed some whitespace (big thanks to pothead) +* Removed the possibility to download files without TTH +* Removed the possibility to read *.DcLst files (no TTH, no i18n support) +* Files with no TTH no longer show up in search and directory listings +* Fixed support for uncompressed files.xml + +-- 0.695 2006-09-10 -- * PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo without connection type * [bug 125] Fixed out-of-order PM/quit Modified: dcplusplus/trunk/client/ADLSearch.cpp =================================================================== --- dcplusplus/trunk/client/ADLSearch.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ADLSearch.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -72,7 +72,7 @@ } if(xml.findChild("IsActive")) { search.isActive = (Util::toInt(xml.getChildData()) != 0); - } + } if(xml.findChild("MaxSize")) { search.maxFileSize = Util::toInt64(xml.getChildData()); } @@ -163,7 +163,7 @@ xml.stepOut(); - // Save string to file + // Save string to file try { File fout(getConfigFile(), File::WRITE, File::CREATE | File::TRUNCATE); fout.write(SimpleXML::utf8Header); @@ -183,7 +183,7 @@ if(id->subdir != NULL) { DirectoryListing::File *copyFile = new DirectoryListing::File(*currentFile, true); dcassert(id->subdir->getAdls()); - + id->subdir->files.push_back(copyFile); } id->fileAdded = false; // Prepare for next stage @@ -207,7 +207,7 @@ if(is->isAutoQueue){ QueueManager::getInstance()->add(SETTING(DOWNLOAD_DIRECTORY) + currentFile->getName(), - currentFile->getSize(), currentFile->getTTH(), getUser(), currentFile->getName()); + currentFile->getSize(), currentFile->getTTH(), getUser()); } if(breakOnFirst) { @@ -222,7 +222,7 @@ // Add to any substructure being stored for(DestDirList::iterator id = destDirVector.begin(); id != destDirVector.end(); ++id) { if(id->subdir != NULL) { - DirectoryListing::Directory* newDir = + DirectoryListing::Directory* newDir = new DirectoryListing::AdlDirectory(fullPath, id->subdir, currentDir->getName()); id->subdir->directories.push_back(newDir); id->subdir = newDir; @@ -240,7 +240,7 @@ continue; } if(is->MatchesDirectory(currentDir->getName())) { - destDirVector[is->ddIndex].subdir = + destDirVector[is->ddIndex].subdir = new DirectoryListing::AdlDirectory(fullPath, destDirVector[is->ddIndex].dir, currentDir->getName()); destDirVector[is->ddIndex].dir->directories.push_back(destDirVector[is->ddIndex].subdir); if(breakOnFirst) { Modified: dcplusplus/trunk/client/ADLSearch.h =================================================================== --- dcplusplus/trunk/client/ADLSearch.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ADLSearch.h 2006-09-18 18:13:50 UTC (rev 649) @@ -47,7 +47,7 @@ public: // Constructor - ADLSearch() : searchString("<Enter string>"), isActive(true), isAutoQueue(false), sourceType(OnlyFile), + ADLSearch() : searchString("<Enter string>"), isActive(true), isAutoQueue(false), sourceType(OnlyFile), minFileSize(-1), maxFileSize(-1), typeFileSize(SizeBytes), destDir("ADLSearch"), ddIndex(0) {} // Prepare search @@ -69,7 +69,7 @@ } // The search string - string searchString; + string searchString; // Active search bool isActive; @@ -116,12 +116,12 @@ } } - // Maximum & minimum file sizes (in bytes). + // Maximum & minimum file sizes (in bytes). // Negative values means do not check. int64_t minFileSize; int64_t maxFileSize; enum SizeType { - SizeBytes = TypeFirst, + SizeBytes = TypeFirst, SizeKibiBytes, SizeMebiBytes, SizeGibiBytes @@ -172,7 +172,7 @@ string destDir; unsigned long ddIndex; - // Search for file match + // Search for file match bool MatchesFile(const string& f, const string& fp, int64_t size) { // Check status if(!isActive) { @@ -200,7 +200,7 @@ } } - // Search for directory match + // Search for directory match bool MatchesDirectory(const string& d) { // Check status if(!isActive) { Modified: dcplusplus/trunk/client/AdcCommand.cpp =================================================================== --- dcplusplus/trunk/client/AdcCommand.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/AdcCommand.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -84,7 +84,7 @@ else throw ParseException("Unknown escape"); break; - case ' ': + case ' ': // New parameter... { if((type == TYPE_BROADCAST || type == TYPE_DIRECT || type == TYPE_FEATURE) && !fromSet) { @@ -179,7 +179,7 @@ string AdcCommand::getHeaderString(const CID& cid) const { dcassert(type == TYPE_UDP); string tmp; - + tmp += getType(); tmp += cmdChar; tmp += ' '; @@ -213,7 +213,7 @@ bool AdcCommand::hasFlag(const char* name, size_t start) const { for(string::size_type i = start; i < getParameters().size(); ++i) { - if(toCode(name) == toCode(getParameters()[i].c_str()) && + if(toCode(name) == toCode(getParameters()[i].c_str()) && getParameters()[i][2] == '1' && getParameters()[i].size() == 3) { Modified: dcplusplus/trunk/client/AdcCommand.h =================================================================== --- dcplusplus/trunk/client/AdcCommand.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/AdcCommand.h 2006-09-18 18:13:50 UTC (rev 649) @@ -116,7 +116,7 @@ u_int32_t getCommand() const { return cmdInt; } char getType() const { return type; } void setType(char t) { type = t; } - + AdcCommand& setFeatures(const string& feat) { features = feat; return *this; } StringList& getParameters() { return parameters; } @@ -194,7 +194,7 @@ C(SND); C(SID); C(CMD); - default: + default: dcdebug("Unknown ADC command: %.50s\n", aLine.c_str()); break; #undef C Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -98,7 +98,7 @@ return; string cid; - + OnlineUser* u = 0; if(c.getParam("ID", 0, cid)) u = &getUser(c.getFrom(), CID(cid)); @@ -115,7 +115,7 @@ for(StringIterC i = c.getParameters().begin(); i != c.getParameters().end(); ++i) { if(i->length() < 2) continue; - + u->getIdentity().set(i->c_str(), i->substr(2)); } @@ -195,7 +195,7 @@ fire(ClientListener::PrivateMessage(), this, *from, *to, *replyTo, c.getParam(0)); } else { fire(ClientListener::Message(), this, *from, c.getParam(0)); - } + } } void AdcHub::handle(AdcCommand::GPA, AdcCommand& c) throw() { @@ -272,7 +272,7 @@ AdcCommand cmd(AdcCommand::SEV_FATAL, AdcCommand::ERROR_PROTOCOL_UNSUPPORTED, "Protocol unknown"); cmd.setTo(c.getFrom()); cmd.addParam("PR", protocol); - + if(hasToken) cmd.addParam("TO", token); @@ -394,16 +394,16 @@ void AdcHub::hubMessage(const string& aMessage) { if(state != STATE_NORMAL) return; - send(AdcCommand(AdcCommand::CMD_MSG, AdcCommand::TYPE_BROADCAST).addParam(aMessage)); + send(AdcCommand(AdcCommand::CMD_MSG, AdcCommand::TYPE_BROADCAST).addParam(aMessage)); } -void AdcHub::privateMessage(const OnlineUser& user, const string& aMessage) { +void AdcHub::privateMessage(const OnlineUser& user, const string& aMessage) { if(state != STATE_NORMAL) return; - send(AdcCommand(AdcCommand::CMD_MSG, user.getIdentity().getSID()).addParam(aMessage).addParam("PM", getMySID())); + send(AdcCommand(AdcCommand::CMD_MSG, user.getIdentity().getSID()).addParam(aMessage).addParam("PM", getMySID())); } -void AdcHub::search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken) { +void AdcHub::search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken) { if(state != STATE_NORMAL) return; @@ -438,7 +438,7 @@ } } -void AdcHub::password(const string& pwd) { +void AdcHub::password(const string& pwd) { if(state != STATE_VERIFY) return; if(!salt.empty()) { @@ -511,8 +511,8 @@ string su; if(CryptoManager::getInstance()->TLSOk()) { su += ADCS_FEATURE + ","; - } - + } + if(ClientManager::getInstance()->isActive()) { if(BOOLSETTING(NO_IP_OVERRIDE) && !SETTING(EXTERNAL_IP).empty()) { ADDPARAM("I4", Socket::resolve(SETTING(EXTERNAL_IP))); @@ -558,23 +558,23 @@ return tmp; } -void AdcHub::on(Connected) throw() { +void AdcHub::on(Connected) throw() { dcassert(state == STATE_PROTOCOL); lastInfoMap.clear(); reconnect = true; send(AdcCommand(AdcCommand::CMD_SUP, AdcCommand::TYPE_HUB).addParam("ADBAS0")); - + fire(ClientListener::Connected(), this); } -void AdcHub::on(Line, const string& aLine) throw() { +void AdcHub::on(Line, const string& aLine) throw() { if(BOOLSETTING(ADC_DEBUG)) { fire(ClientListener::StatusMessage(), this, "<ADC>" + aLine + "</ADC>"); } - dispatch(aLine); + dispatch(aLine); } -void AdcHub::on(Failed, const string& aLine) throw() { +void AdcHub::on(Failed, const string& aLine) throw() { clearUsers(); socket->removeListener(this); state = STATE_PROTOCOL; Modified: dcplusplus/trunk/client/AdcHub.h =================================================================== --- dcplusplus/trunk/client/AdcHub.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/AdcHub.h 2006-09-18 18:13:50 UTC (rev 649) @@ -37,7 +37,7 @@ virtual void connect(const OnlineUser& user); void connect(const OnlineUser& user, string const& token, bool secure); - + virtual void hubMessage(const string& aMessage); virtual void privateMessage(const OnlineUser& user, const string& aMessage); virtual void sendUserCmd(const string& aUserCmd) { send(aUserCmd); } @@ -87,9 +87,9 @@ static const string ADCS_FEATURE; static const string TCP4_FEATURE; static const string UDP4_FEATURE; - + virtual string checkNick(const string& nick); - + OnlineUser& getUser(const u_int32_t aSID, const CID& aCID); OnlineUser* findUser(const u_int32_t sid) const; void putUser(const u_int32_t sid); @@ -109,7 +109,7 @@ void handle(AdcCommand::CMD, AdcCommand& c) throw(); void handle(AdcCommand::RES, AdcCommand& c) throw(); - template<typename T> void handle(T, AdcCommand&) { + template<typename T> void handle(T, AdcCommand&) { //Speaker<AdcHubListener>::fire(t, this, c); } Modified: dcplusplus/trunk/client/BZUtils.cpp =================================================================== --- dcplusplus/trunk/client/BZUtils.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BZUtils.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -32,7 +32,7 @@ } BZFilter::~BZFilter() { - dcdebug("BZFilter end, %u/%u = %.04f\n", zs.total_out_lo32, zs.total_in_lo32, (float)zs.total_out_lo32 / max((float)zs.total_in_lo32, (float)1)); + dcdebug("BZFilter end, %u/%u = %.04f\n", zs.total_out_lo32, zs.total_in_lo32, (float)zs.total_out_lo32 / max((float)zs.total_in_lo32, (float)1)); BZ2_bzCompressEnd(&zs); } @@ -67,13 +67,13 @@ UnBZFilter::UnBZFilter() { memset(&zs, 0, sizeof(zs)); - if(BZ2_bzDecompressInit(&zs, 0, 0) != BZ_OK) + if(BZ2_bzDecompressInit(&zs, 0, 0) != BZ_OK) throw Exception(STRING(DECOMPRESSION_ERROR)); } UnBZFilter::~UnBZFilter() { - dcdebug("UnBZFilter end, %u/%u = %.04f\n", zs.total_out_lo32, zs.total_in_lo32, (float)zs.total_out_lo32 / max((float)zs.total_in_lo32, (float)1)); + dcdebug("UnBZFilter end, %u/%u = %.04f\n", zs.total_out_lo32, zs.total_in_lo32, (float)zs.total_out_lo32 / max((float)zs.total_in_lo32, (float)1)); BZ2_bzDecompressEnd(&zs); } Modified: dcplusplus/trunk/client/BitInputStream.h =================================================================== --- dcplusplus/trunk/client/BitInputStream.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BitInputStream.h 2006-09-18 18:13:50 UTC (rev 649) @@ -37,7 +37,7 @@ public: BitInputStream(const u_int8_t* aStream, size_t aStart, size_t aEnd) : bitPos(aStart*8), endPos(aEnd*8), is(aStream) { } ~BitInputStream() { } - + bool get() throw(BitStreamException) { if(bitPos > endPos) { throw BitStreamException(STRING(SEEK_BEYOND_END)); @@ -46,12 +46,12 @@ bitPos++; return ret; } - + void skipToByte() { if(bitPos%8 != 0) bitPos = (bitPos & (~7)) + 8; } - + void skip(int n) { bitPos += n * 8; return ; @@ -59,7 +59,7 @@ private: BitInputStream(const BitInputStream&); BitInputStream& operator=(const BitInputStream&); - + size_t bitPos; size_t endPos; const u_int8_t* is; Modified: dcplusplus/trunk/client/BitOutputStream.h =================================================================== --- dcplusplus/trunk/client/BitOutputStream.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BitOutputStream.h 2006-09-18 18:13:50 UTC (rev 649) @@ -28,20 +28,20 @@ public: BitOutputStream(string& aStream) : is(aStream), bitPos(0), next(0) { } ~BitOutputStream() { } - + void put(vector<u_int8_t>& b) { for(vector<u_int8_t>::iterator i = b.begin(); i != b.end(); ++i) { - next |= (*i) << bitPos++; - + next |= (*i) << bitPos++; + if(bitPos > 7) { bitPos-=8; is += next; next = 0; } - + } } - + void skipToByte() { if(bitPos > 0) { bitPos = 0; @@ -49,7 +49,7 @@ next = 0; } } - + private: BitOutputStream& operator=(const BitOutputStream&); string& is; Modified: dcplusplus/trunk/client/BloomFilter.h =================================================================== --- dcplusplus/trunk/client/BloomFilter.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BloomFilter.h 2006-09-18 18:13:50 UTC (rev 649) @@ -38,14 +38,14 @@ ~BloomFilter() { } void add(const string& s) { xadd(s, N); } - bool match(const StringList& s) { + bool match(const StringList& s) { for(StringList::const_iterator i = s.begin(); i != s.end(); ++i) { if(!match(*i)) return false; } return true; } - bool match(const string& s) { + bool match(const string& s) { if(s.length() >= N) { string::size_type l = s.length() - N; for(string::size_type i = 0; i <= l; ++i) { @@ -78,7 +78,7 @@ for(string::size_type i = 0; i <= l; ++i) { table[getPos(s, i, n)] = true; } - } + } } /* Same functionality, but the old one did not want to compile for some reason. */ @@ -86,7 +86,7 @@ HashFunc hf; return (hf(&s[i], l) % table.size()); } - + vector<bool> table; }; Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -32,7 +32,7 @@ // Polling is used for tasks...should be fixed... #define POLL_TIMEOUT 250 -BufferedSocket::BufferedSocket(char aSeparator) throw() : +BufferedSocket::BufferedSocket(char aSeparator) throw() : separator(aSeparator), mode(MODE_LINE), filterIn(NULL), dataBytes(0), rollback(0), failed(false), sock(0), disconnecting(false) { @@ -167,9 +167,9 @@ // This socket has been closed... throw SocketException(STRING(CONNECTION_CLOSED)); } - size_t used; + size_t used; string::size_type pos = 0; - // always uncompressed data + // always uncompressed data string l; int bufpos = 0, total = left; @@ -177,7 +177,7 @@ switch (mode) { case MODE_ZPIPE: if (filterIn != NULL){ - const int BufSize = 1024; + const int BufSize = 1024; // Special to autodetect nmdc connections... string::size_type pos = 0; AutoArray<u_int8_t> buffer (BufSize); @@ -228,7 +228,7 @@ break; } } - if (pos == string::npos) + if (pos == string::npos) left = 0; line = l; break; @@ -268,7 +268,7 @@ dcassert(file != NULL); size_t sockSize = (size_t)sock->getSocketOptInt(SO_SNDBUF); size_t bufSize = max(sockSize, (size_t)64*1024); - + vector<u_int8_t> readBuf(bufSize); vector<u_int8_t> writeBuf(bufSize); @@ -411,19 +411,19 @@ switch(p.first) { case SEND_DATA: threadSendData(); break; - case SEND_FILE: + case SEND_FILE: threadSendFile(((SendFileInfo*)p.second)->stream); break; - case CONNECT: + case CONNECT: { ConnectInfo* ci = (ConnectInfo*)p.second; - threadConnect(ci->addr, ci->port, ci->proxy); + threadConnect(ci->addr, ci->port, ci->proxy); break; } - case DISCONNECT: - if(isConnected()) - fail(STRING(DISCONNECTED)); + case DISCONNECT: + if(isConnected()) + fail(STRING(DISCONNECTED)); break; - case SHUTDOWN: + case SHUTDOWN: return false; case ACCEPTED: break; @@ -476,11 +476,11 @@ } } -void BufferedSocket::shutdown() { +void BufferedSocket::shutdown() { if(sock) { - Lock l(cs); - disconnecting = true; - addTask(SHUTDOWN, 0); + Lock l(cs); + disconnecting = true; + addTask(SHUTDOWN, 0); } else { // Socket thread not running yet, disconnect... delete this; Modified: dcplusplus/trunk/client/BufferedSocket.h =================================================================== --- dcplusplus/trunk/client/BufferedSocket.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/BufferedSocket.h 2006-09-18 18:13:50 UTC (rev 649) @@ -37,7 +37,7 @@ class BufferedSocketListener { public: virtual ~BufferedSocketListener() { } - template<int I> struct X { enum { TYPE = I }; }; + template<int I> struct X { enum { TYPE = I }; }; typedef X<0> Connecting; typedef X<1> Connected; @@ -72,12 +72,12 @@ * @param sep Line separator * @return An unconnected socket */ - static BufferedSocket* getSocket(char sep) throw() { - return new BufferedSocket(sep); + static BufferedSocket* getSocket(char sep) throw() { + return new BufferedSocket(sep); } - static void putSocket(BufferedSocket* aSock) { - aSock->removeListeners(); + static void putSocket(BufferedSocket* aSock) { + aSock->removeListeners(); aSock->shutdown(); } @@ -91,10 +91,10 @@ /** Sets data mode for aBytes bytes. Must be called within onLine. */ void setDataMode(int64_t aBytes = -1) { mode = MODE_DATA; dataBytes = aBytes; } - /** + /** * Rollback is an ugly hack to solve problems with compressed transfers where not all data received * should be treated as data. - * Must be called from within onData. + * Must be called from within onData. */ void setLineMode(size_t aRollback) { setMode (MODE_LINE, aRollback);} void setMode(Modes mode, size_t aRollback = 0); @@ -104,7 +104,7 @@ bool isSecure() const { return sock && sock->isSecure(); } bool isTrusted() const { return sock && sock->isTrusted(); } - + void write(const string& aData) throw() { write(aData.data(), aData.length()); } void write(const char* aBuf, size_t aLen) throw(); /** Send the file f over this socket. */ @@ -125,7 +125,7 @@ ACCEPTED }; - struct TaskData { + struct TaskData { virtual ~TaskData() { } }; struct ConnectInfo : public TaskData { @@ -172,8 +172,8 @@ void threadSendFile(InputStream* is) throw(Exception); void threadSendData(); void threadDisconnect(); - - void fail(const string& aError); + + void fail(const string& aError); static volatile long sockets; bool checkEvents(); Modified: dcplusplus/trunk/client/CID.h =================================================================== --- dcplusplus/trunk/client/CID.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/CID.h 2006-09-18 18:13:50 UTC (rev 649) @@ -42,7 +42,7 @@ string toBase32() const { return Encoder::toBase32(cid, sizeof(cid)); } string& toBase32(string& tmp) const { return Encoder::toBase32(cid, sizeof(cid), tmp); } - + size_t toHash() const { return *reinterpret_cast<const size_t*>(cid); } const u_int8_t* data() const { return cid; } Modified: dcplusplus/trunk/client/Client.cpp =================================================================== --- dcplusplus/trunk/client/Client.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/Client.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -29,9 +29,9 @@ Client::Counts Client::counts; -Client::Client(const string& hubURL, char separator_, bool secure_) : +Client::Client(const string& hubURL, char separator_, bool secure_) : myIdentity(ClientManager::getInstance()->getMe(), 0), - reconnDelay(120), lastActivity(GET_TICK()), registered(false), autoReconnect(true), reconnecting(false), socket(0), + reconnDelay(120), lastActivity(GET_TICK()), registered(false), autoReconnect(true), reconnecting(false), socket(0), hubUrl(hubURL), port(0), separator(separator_), secure(secure_), countType(COUNT_UNCOUNTED) { @@ -110,8 +110,8 @@ } void Client::on(Connected) throw() { - updateActivity(); - ip = socket->getIp(); + updateActivity(); + ip = socket->getIp(); fire(ClientListener::Connected(), this); } Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/Client.h 2006-09-18 18:13:50 UTC (rev 649) @@ -31,11 +31,11 @@ class Client; class AdcCommand; class ClientManager; -class ClientListener +class ClientListener { public: virtual ~ClientListener() { } - template<int I> struct X { enum { TYPE = I }; }; + template<int I> struct X { enum { TYPE = I }; }; typedef X<0> Connecting; typedef X<1> Connected; @@ -93,7 +93,7 @@ virtual void search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken) = 0; virtual void password(const string& pwd) = 0; virtual void info(bool force) = 0; - + virtual size_t getUserCount() const = 0; virtual int64_t getAvailable() const = 0; Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -59,7 +59,7 @@ fire(ClientManagerListener::ClientDisconnected(), aClient); aClient->removeListeners(); - + { Lock l(cs); clients.remove(aClient); @@ -166,7 +166,7 @@ url = c->getHubUrl(); } } - + return url; } @@ -189,7 +189,7 @@ UserIter ui = users.find(cid); if(ui != users.end()) { if(ui->second->getFirstNick().empty()) // Could happen on bad queue loads etc... - ui->second->setFirstNick(aNick); + ui->second->setFirstNick(aNick); ui->second->setFlag(User::NMDC); return ui->second; } @@ -326,8 +326,8 @@ } } -void ClientManager::on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, - int aFileType, const string& aString) throw() +void ClientManager::on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, + int aFileType, const string& aString) throw() { Speaker<ClientManagerListener>::fire(ClientManagerListener::IncomingSearch(), aString); @@ -337,7 +337,7 @@ if(isPassive && !ClientManager::getInstance()->isActive()) { return; } - + SearchResult::List l; ShareManager::getInstance()->search(l, aString, aSearchType, aSize, aFileType, aClient, isPassive ? 5 : 10); // dcdebug("Found %d items (%s)\n", l.size(), aString.c_str()); @@ -355,24 +355,24 @@ sr->decRef(); } - + if(str.size() > 0) aClient->send(str); - + } else { try { string ip, file; u_int16_t port = 0; Util::decodeUrl(aSeeker, ip, port, file); ip = Socket::resolve(ip); - + // Temporary fix to avoid spamming hublist.org and dcpp.net if(ip == "70.85.55.252" || ip == "207.44.220.108") { LogManager::getInstance()->message("Someone is trying to use your client to spam " + ip + ", please urge hub owner to fix this"); return; } - - if(port == 0) + + if(port == 0) port = 412; for(SearchResult::Iter i = l.begin(); i != l.end(); ++i) { SearchResult* sr = *i; @@ -405,7 +405,7 @@ void ClientManager::search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken) { Lock l(cs); - + updateCachedIp(); // no point in doing a resolve for every single hub we're searching on for(Client::Iter i = clients.begin(); i != clients.end(); ++i) { @@ -520,7 +520,7 @@ while(xml.findChild("User")) { const string& cid = xml.getChildAttrib("CID"); const string& nick = xml.getChildAttrib("Nick"); - if(cid.length() != 39 || nick.empty()) + if(cid.length() != 39 || nick.empty()) continue; User::Ptr p(new User(CID(cid))); p->setFirstNick(xml.getChildData()); @@ -532,12 +532,12 @@ } } -void ClientManager::on(Failed, Client* client, const string&) throw() { +void ClientManager::on(Failed, Client* client, const string&) throw() { FavoriteManager::getInstance()->removeUserCommand(client->getHubUrl()); fire(ClientManagerListener::ClientDisconnected(), client); } -void ClientManager::on(UserCommand, Client* client, int aType, int ctx, const string& name, const string& command) throw() { +void ClientManager::on(UserCommand, Client* client, int aType, int ctx, const string& name, const string& command) throw() { if(BOOLSETTING(HUB_USER_COMMANDS)) { if(aType == ::UserCommand::TYPE_CLEAR) { FavoriteManager::getInstance()->removeHubUserCommands(ctx, client->getHubUrl()); Modified: dcplusplus/trunk/client/ClientManager.h =================================================================== --- dcplusplus/trunk/client/ClientManager.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ClientManager.h 2006-09-18 18:13:50 UTC (rev 649) @@ -33,8 +33,8 @@ class UserCommand; -class ClientManager : public Speaker<ClientManagerListener>, - private ClientListener, public Singleton<ClientManager>, +class ClientManager : public Speaker<ClientManagerListener>, + private ClientListener, public Singleton<ClientManager>, private TimerManagerListener, private SettingsManagerListener { public: @@ -49,7 +49,7 @@ string getConnection(const CID& cid); bool isConnected(const string& aUrl); - + void search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken); void search(StringList& who, int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken); void infoUpdated(); @@ -77,7 +77,7 @@ void putOffline(OnlineUser& ou) throw(); User::Ptr& getMe(); - + void connect(const User::Ptr& p); void send(AdcCommand& c, const CID& to); void privateMessage(const User::Ptr& p, const string& msg); @@ -85,7 +85,7 @@ void userCommand(const User::Ptr& p, const ::UserCommand& uc, StringMap& params, bool compatibility); bool isActive() { return SETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_FIREWALL_PASSIVE; } - + void lock() throw() { cs.enter(); } void unlock() throw() { cs.leave(); } @@ -110,12 +110,12 @@ Client::List clients; mutable CriticalSection cs; - + UserMap users; OnlineMap onlineUsers; User::Ptr me; - + Socket s; string cachedIp; @@ -123,14 +123,14 @@ friend class Singleton<ClientManager>; - ClientManager() { - TimerManager::getInstance()->addListener(this); + ClientManager() { + TimerManager::getInstance()->addListener(this); SettingsManager::getInstance()->addListener(this); } - virtual ~ClientManager() throw() { + virtual ~ClientManager() throw() { SettingsManager::getInstance()->removeListener(this); - TimerManager::getInstance()->removeListener(this); + TimerManager::getInstance()->removeListener(this); } string getUsersFile() { return Util::getConfigPath() + "Users.xml"; } @@ -148,7 +148,7 @@ virtual void on(Failed, Client*, const string&) throw(); virtual void on(HubUpdated, Client* c) throw() { fire(ClientManagerListener::ClientUpdated(), c); } virtual void on(UserCommand, Client*, int, int, const string&, const string&) throw(); - virtual void on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, + virtual void on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, int aFileType, const string& aString) throw(); virtual void on(AdcSearch, Client* c, const AdcCommand& adc, const CID& from) throw(); // TimerManagerListener Modified: dcplusplus/trunk/client/ClientManagerListener.h =================================================================== --- dcplusplus/trunk/client/ClientManagerListener.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ClientManagerListener.h 2006-09-18 18:13:50 UTC (rev 649) @@ -26,7 +26,7 @@ class ClientManagerListener { public: virtual ~ClientManagerListener() { } - template<int I> struct X { enum { TYPE = I }; }; + template<int I> struct X { enum { TYPE = I }; }; typedef X<0> UserConnected; typedef X<1> UserUpdated; Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -41,11 +41,13 @@ features.push_back(UserConnection::FEATURE_TTHF); adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BASE); + adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BZIP); } + // @todo clean this up void ConnectionManager::listen() throw(Exception){ unsigned short lastPort = (unsigned short)SETTING(TCP_PORT); - + if(lastPort == 0) lastPort = (unsigned short)Util::rand(1025, 32000); @@ -178,8 +180,8 @@ // Not online anymore...remove it from the pending... removed.push_back(cqi); continue; - } - + } + if(cqi->getUser()->isSet(User::PASSIVE) && !ClientManager::getInstance()->isActive()) { passiveUsers.push_back(cqi->getUser()); removed.push_back(cqi); @@ -237,7 +239,7 @@ } } -void ConnectionManager::on(TimerManagerListener::Minute, u_int32_t aTick) throw() { +void ConnectionManager::on(TimerManagerListener::Minute, u_int32_t aTick) throw() { Lock l(cs); for(UserConnection::Iter j = userConnections.begin(); j != userConnections.end(); ++j) { @@ -258,7 +260,6 @@ start(); } - static const u_int32_t POLL_TIMEOUT = 250; int ConnectionManager::Server::run() throw() { @@ -301,7 +302,7 @@ uc->setFlag(UserConnection::FLAG_INCOMING); uc->setState(UserConnection::STATE_SUPNICK); uc->setLastActivity(GET_TICK()); - try { + try { uc->accept(sock); } catch(const Exception&) { putConnection(uc); @@ -356,10 +357,15 @@ for(StringIterC i = cmd.getParameters().begin(); i != cmd.getParameters().end(); ++i) { if(i->compare(0, 2, "AD") == 0) { string feat = i->substr(2); - if(feat == UserConnection::FEATURE_ADC_BASE) + if(feat == UserConnection::FEATURE_ADC_BASE) { baseOk = true; - else if(feat == UserConnection::FEATURE_ZLIB_GET) + // For compatibility with older clients... + aSource->setFlag(UserConnection::FLAG_SUPPORTS_XML_BZLIST); + } else if(feat == UserConnection::FEATURE_ZLIB_GET) { aSource->setFlag(UserConnection::FLAG_SUPPORTS_ZLIB_GET); + } else if(feat == UserConnection::FEATURE_ADC_BZIP) { + aSource->setFlag(UserConnection::FLAG_SUPPORTS_XML_BZLIST); + } } } @@ -427,7 +433,7 @@ putConnection(aSource); return; } - aSource->setToken(i.first); + aSource->setToken(i.first); aSource->setHubUrl(i.second); } CID cid = ClientManager::getInstance()->makeCid(aNick, aSource->getHubUrl()); @@ -463,7 +469,7 @@ aSource->setFlag(UserConnection::FLAG_OP); if( aSource->isSet(UserConnection::FLAG_INCOMING) ) { - aSource->myNick(aSource->getToken()); + aSource->myNick(aSource->getToken()); aSource->lock(CryptoManager::getInstance()->getLock(), CryptoManager::getInstance()->getPk()); } @@ -475,7 +481,7 @@ dcdebug("CM::onLock %p received lock twice, ignoring\n", (void*)aSource); return; } - + if( CryptoManager::getInstance()->isExtended(aLock) ) { // Alright, we have an extended protocol, set a user flag for this user and refresh his info... if( (aPk.find("DCPLUSPLUS") != string::npos) && aSource->getUser() && !aSource->getUser()->isSet(User::DCPLUSPLUS)) { @@ -543,7 +549,7 @@ uc->setFlag(UserConnection::FLAG_ASSOCIATED); fire(ConnectionManagerListener::Connected(), cqi); - + dcdebug("ConnectionManager::addDownloadConnection, leaving to downloadmanager\n"); addConn = true; } @@ -693,7 +699,7 @@ void ConnectionManager::on(UserConnectionListener::Supports, UserConnection* conn, const StringList& feat) throw() { for(StringList::const_iterator i = feat.begin(); i != feat.end(); ++i) { if(*i == UserConnection::FEATURE_GET_ZBLOCK) { - conn->setFlag(UserConnection::FLAG_SUPPORTS_GETZBLOCK); + conn->setFlag(UserConnection::FLAG_SUPPORTS_GETZBLOCK); } else if(*i == UserConnection::FEATURE_MINISLOTS) { conn->setFlag(UserConnection::FLAG_SUPPORTS_MINISLOTS); } else if(*i == UserConnection::FEATURE_XML_BZLIST) { Modified: dcplusplus/trunk/client/ConnectionManager.h =================================================================== --- dcplusplus/trunk/client/ConnectionManager.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ConnectionManager.h 2006-09-18 18:13:50 UTC (rev 649) @@ -38,7 +38,7 @@ typedef ConnectionQueueItem* Ptr; typedef vector<Ptr> List; typedef List::iterator Iter; - + enum State { CONNECTING, // Recently sent request to connect WAITING, // Waiting to send request to connect @@ -47,17 +47,17 @@ }; ConnectionQueueItem(const User::Ptr& aUser, bool aDownload) : state(WAITING), lastAttempt(0), download(aDownload), user(aUser) { } - + User::Ptr& getUser() { return user; } const User::Ptr& getUser() const { return user; } - + GETSET(State, state, State); GETSET(u_int32_t, lastAttempt, LastAttempt); GETSET(bool, download, Download); private: ConnectionQueueItem(const ConnectionQueueItem&); ConnectionQueueItem& operator=(const ConnectionQueueItem&); - + User::Ptr user; }; @@ -71,12 +71,12 @@ pair<string, string> remove(const string& aNick) { Lock l(cs); ExpectMap::iterator i = expectedConnections.find(aNick); - + if(i == expectedConnections.end()) return make_pair(Util::emptyString, Util::emptyString); pair<string, string> tmp = make_pair(i->second.first, i->second.second); expectedConnections.erase(i); - + return tmp; } @@ -91,8 +91,8 @@ // Comparing with a user... inline bool operator==(ConnectionQueueItem::Ptr ptr, const User::Ptr& aUser) { return ptr->getUser() == aUser; } -class ConnectionManager : public Speaker<ConnectionManagerListener>, - public UserConnectionListener, TimerManagerListener, +class ConnectionManager : public Speaker<ConnectionManagerListener>, + public UserConnectionListener, TimerManagerListener, public Singleton<ConnectionManager> { public: @@ -102,7 +102,7 @@ void nmdcConnect(const string& aServer, short aPort, const string& aMyNick, const string& hubUrl); void adcConnect(const OnlineUser& aUser, short aPort, const string& aToken, bool secure); - + void getDownloadConnection(const User::Ptr& aUser); void disconnect(const User::Ptr& aUser, int isDownload); @@ -166,7 +166,7 @@ ConnectionManager(); virtual ~ConnectionManager() throw() { shutdown(); } - + UserConnection* getConnection(bool aNmdc, bool secure) throw(); void putConnection(UserConnection* aConn); @@ -192,8 +192,8 @@ virtual void on(AdcCommand::STA, UserConnection*, const AdcCommand&) throw(); // TimerManagerListener - virtual void on(TimerManagerListener::Second, u_int32_t aTick) throw(); - virtual void on(TimerManagerListener::Minute, u_int32_t aTick) throw(); + virtual void on(TimerManagerListener::Second, u_int32_t aTick) throw(); + virtual void on(TimerManagerListener::Minute, u_int32_t aTick) throw(); }; Modified: dcplusplus/trunk/client/ConnectionManagerListener.h =================================================================== --- dcplusplus/trunk/client/ConnectionManagerListener.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/ConnectionManagerListener.h 2006-09-18 18:13:50 UTC (rev 649) @@ -28,7 +28,7 @@ class ConnectionManagerListener { public: virtual ~ConnectionManagerListener() { } - template<int I> struct X { enum { TYPE = I }; }; + template<int I> struct X { enum { TYPE = I }; }; typedef X<0> Added; typedef X<1> Connected; Modified: dcplusplus/trunk/client/CriticalSection.h =================================================================== --- dcplusplus/trunk/client/CriticalSection.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/CriticalSection.h 2006-09-18 18:13:50 UTC (rev 649) @@ -25,13 +25,13 @@ #include "Thread.h" -class CriticalSection +class CriticalSection { #ifdef _WIN32 public: void enter() throw() { EnterCriticalSection(&cs); - dcdrun(counter++); + dcdrun(counter++); } void leave() throw() { dcassert(--counter >= 0); @@ -72,8 +72,8 @@ /** * A fast, non-recursive and unfair implementation of the Critical Section. - * It is meant to be used in situations where the risk for lock conflict is very low, - * i e locks that are held for a very short time. The lock is _not_ recursive, i e if + * It is meant to be used in situations where the risk for lock conflict is very low, + * i e locks that are held for a very short time. The lock is _not_ recursive, i e if * the same thread will try to grab the lock it'll hang in a never-ending loop. The lock * is not fair, i e the first to try to enter a locked lock is not guaranteed to be the * first to get it when it's freed... @@ -96,7 +96,7 @@ #else // We have to use a pthread (nonrecursive) mutex, didn't find any test_and_set on linux... - FastCriticalSection() { + FastCriticalSection() { static pthread_mutex_t fastmtx = PTHREAD_MUTEX_INITIALIZER; mtx = fastmtx; } @@ -104,14 +104,14 @@ void enter() { pthread_mutex_lock(&mtx); } void leave() { pthread_mutex_unlock(&mtx); } private: - pthread_mutex_t mtx; + pthread_mutex_t mtx; #endif }; template<class T> class LockBase { public: - LockBase(T& aCs) throw() : cs(aCs) { cs.enter(); } + LockBase(T& aCs) throw() : cs(aCs) { cs.enter(); } ~LockBase() throw() { cs.leave(); } private: LockBase& operator=(const LockBase&); @@ -154,7 +154,7 @@ template<class T = CriticalSection> class RLock { public: - RLock(RWLock<T>& aRwl) throw() : rwl(aRwl) { rwl.enterRead(); } + RLock(RWLock<T>& aRwl) throw() : rwl(aRwl) { rwl.enterRead(); } ~RLock() throw() { rwl.leaveRead(); } private: RLock& operator=(const RLock&); @@ -164,7 +164,7 @@ template<class T = CriticalSection> class WLock { public: - WLock(RWLock<T>& aRwl) throw() : rwl(aRwl) { rwl.enterWrite(); } + WLock(RWLock<T>& aRwl) throw() : rwl(aRwl) { rwl.enterWrite(); } ~WLock() throw() { rwl.leaveWrite(); } private: WLock& operator=(const WLock&); Modified: dcplusplus/trunk/client/CryptoManager.cpp =================================================================== --- dcplusplus/trunk/client/CryptoManager.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/CryptoManager.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -35,15 +35,15 @@ #include <bzlib.h> #endif -CryptoManager::CryptoManager() -: - clientContext(SSL_CTX_new(TLSv1_client_method())), - serverContext(SSL_CTX_new(TLSv1_server_method())), - clientVerContext(SSL_CTX_new(TLSv1_client_method())), - serverVerContext(SSL_CTX_new(TLSv1_server_method())), - dh(DH_new()), - certsLoaded(false), - lock("EXTENDEDPROTOCOLABCABCABCABCABCABC"), +CryptoManager::CryptoManager() +: + clientContext(SSL_CTX_new(TLSv1_client_method())), + serverContext(SSL_CTX_new(TLSv1_server_method())), + clientVerContext(SSL_CTX_new(TLSv1_client_method())), + serverVerContext(SSL_CTX_new(TLSv1_server_method())), + dh(DH_new()), + certsLoaded(false), + lock("EXTENDEDPROTOCOLABCABCABCABCABCABC"), pk("DCPLUSPLUS" VERSIONSTRING "ABCABC") { static unsigned char dh512_p[] = @@ -88,8 +88,8 @@ DH_free(dh); } -bool CryptoManager::TLSOk() const throw() { - return BOOLSETTING(USE_TLS) && certsLoaded; +bool CryptoManager::TLSOk() const throw() { + return BOOLSETTING(USE_TLS) && certsLoaded; } void CryptoManager::generateCertificate() throw(CryptoException) { @@ -113,7 +113,7 @@ CloseHandle(pi.hThread); CloseHandle(pi.hProcess); - cmd = L"openssl.exe req -x509 -new -batch -days 3650 -key \"" + Text::utf8ToWide(SETTING(TLS_PRIVATE_KEY_FILE)) + + cmd = L"openssl.exe req -x509 -new -batch -days 3650 -key \"" + Text::utf8ToWide(SETTING(TLS_PRIVATE_KEY_FILE)) + L"\" -out \"" + Text::utf8ToWide(SETTING(TLS_CERTIFICATE_FILE)) + L"\" -subj \"/CN=" + Text::utf8ToWide(ClientManager::getInstance()->getMyCID().toBase32()) + L"\""; @@ -248,7 +248,7 @@ // but we'll have to do multiple passes... size_t bufsize = 2*sz; AutoArray<char> buf(bufsize); - + bs.avail_in = sz; bs.avail_out = bufsize; bs.next_in = (char*)(const_cast<u_int8_t*>(is)); @@ -257,33 +257,33 @@ int err; os.clear(); - - while((err = BZ2_bzDecompress(&bs)) == BZ_OK) { - if (bs.avail_in == 0 && bs.avail_out > 0) { // error: BZ_UNEXPECTED_EOF - BZ2_bzDecompressEnd(&bs); - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - } - os.append(buf, bufsize-bs.avail_out); - bs.avail_out = bufsize; - bs.next_out = buf; - } + while((err = BZ2_bzDecompress(&bs)) == BZ_OK) { + if (bs.avail_in == 0 && bs.avail_out > 0) { // error: BZ_UNEXPECTED_EOF + BZ2_bzDecompressEnd(&bs); + throw CryptoException(STRING(DECOMPRESSION_ERROR)); + } + os.append(buf, bufsize-bs.avail_out); + bs.avail_out = bufsize; + bs.next_out = buf; + } + if(err == BZ_STREAM_END) os.append(buf, bufsize-bs.avail_out); - + BZ2_bzDecompressEnd(&bs); if(err < 0) { // This was a real error - throw CryptoException(STRING(DECOMPRESSION_ERROR)); + throw CryptoException(STRING(DECOMPRESSION_ERROR)); } } string CryptoManager::keySubst(const u_int8_t* aKey, size_t len, size_t n) { AutoArray<u_int8_t> temp(len + n * 10); - + size_t j=0; - + for(size_t i = 0; i<len; i++) { if(isExtra(aKey[i])) { temp[j++] = '/'; temp[j++] = '%'; temp[j++] = 'D'; @@ -308,14 +308,14 @@ if(aLock.size() < 3) return Util::emptyString; - AutoArray<u_int8_t> temp(aLock.length()); + AutoArray<u_int8_t> temp(aLock.length()); u_int8_t v1; size_t extra=0; - + v1 = (u_int8_t)(aLock[0]^5); v1 = (u_int8_t)(((v1 >> 4) | (v1 << 4)) & 0xff); temp[0] = v1; - + string::size_type i; for(i = 1; i<aLock.length(); i++) { @@ -325,114 +325,13 @@ if(isExtra(temp[i])) extra++; } - + temp[0] = (u_int8_t)(temp[0] ^ temp[aLock.length()-1]); - + if(isExtra(temp[0])) { extra++; } - + return keySubst(temp, aLock.length(), extra); } -void CryptoManager::decodeHuffman(const u_int8_t* is, string& os, const size_t len) throw(CryptoException) { -// BitInputStream bis; - int pos = 0; - - if(len < 11 || is[pos] != 'H' || is[pos+1] != 'E' || !((is[pos+2] == '3') || (is[pos+2] == '0'))) { - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - } - pos+=5; - - int size; - size = *(int*)&is[pos]; - - pos+=4; - - dcdebug("Size: %d\n", size); - - unsigned short treeSize; - treeSize = *(unsigned short*)&is[pos]; - - pos+=2; - - if(len < (size_t)(11 + treeSize * 2)) - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - Leaf** leaves = new Leaf*[treeSize]; - - int i; - for(i=0; i<treeSize; i++) { - int chr = is[pos++]; - int bits = is[pos++]; - leaves[i] = new Leaf(chr, bits); - } - - BitInputStream bis(is, pos, len); - - DecNode* root = new DecNode(); - - for(i=0; i<treeSize; i++) { - DecNode* node = root; - for(int j=0; j<leaves[i]->len; j++) { - try { - if(bis.get()) { - if(node->right == NULL) - node->right = new DecNode(); - - node = node->right; - } else { - if(node->left == NULL) - node->left = new DecNode(); - - node = node->left; - } - } catch(const BitStreamException&) { - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - } - } - node->chr = leaves[i]->chr; - } - - bis.skipToByte(); - - // We know the size, so no need to use strange STL stuff... - AutoArray<char> buf(size+1); - - pos = 0; - for(i=0; i<size; i++) { - DecNode* node = root; - while(node->chr == -1) { - try { - if(bis.get()) { - node = node->right; - } else { - node = node->left; - } - } catch(const BitStreamException&) { - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - } - - if(node == NULL) { - for(i=0; i<treeSize; i++) { - delete leaves[i]; - } - - delete[] leaves; - delete root; - - dcdebug("Bad node found!!!\n"); - throw CryptoException(STRING(DECOMPRESSION_ERROR)); - } - } - buf[pos++] = (u_int8_t)node->chr; - } - buf[pos] = 0; - os.assign(buf, size); - - for(i=0; i<treeSize; i++) { - delete leaves[i]; - } - - delete[] leaves; - delete root; -} Modified: dcplusplus/trunk/client/CryptoManager.h =================================================================== --- dcplusplus/trunk/client/CryptoManager.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/CryptoManager.h 2006-09-18 18:13:50 UTC (rev 649) @@ -43,12 +43,12 @@ // typedef List::iterator Iter; int chr; int weight; - + Node* left; Node* right; - + Node(int aChr, int aWeight) : chr(aChr), weight(aWeight), left(NULL), right(NULL) { } - Node(Node* aLeft, Node* aRight) : chr(-1), weight(aLeft->weight + aRight->weight), left(aLeft), right(aRight) { } + Node(Node* aLeft, Node* aRight) : chr(-1), weight(aLeft->weight + aRight->weight), left(aLeft), right(aRight) { } ~Node() { delete left; delete right; @@ -78,7 +78,6 @@ const string& getPk() { return pk; } bool isExtended(const string& aLock) { return strncmp(aLock.c_str(), "EXTENDEDPROTOCOL", 16) == 0; } - void decodeHuffman(const u_int8_t* /*is*/, string& /*os*/, const size_t /*len*/) throw(CryptoException); void decodeBZ2(const u_int8_t* is, size_t sz, string& os) throw(CryptoException); SSLSocket* getClientSocket(bool allowUntrusted) throw(SocketException); @@ -91,32 +90,10 @@ private: friend class Singleton<CryptoManager>; - + CryptoManager(); virtual ~CryptoManager(); - class Leaf : public FastAlloc<Leaf> { - public: - int chr; - int len; - Leaf(int aChr, int aLen) : chr(aChr), len(aLen) { } - Leaf() : chr(-1), len(-1) { } - }; - - class DecNode : public FastAlloc<DecNode> { - public: - int chr; - DecNode* left; - DecNode* right; - DecNode(int aChr) : chr(aChr), left(NULL), right(NULL) { } - DecNode(DecNode* aLeft, DecNode* aRight) : chr(-1), left(aLeft), right(aRight) { } - DecNode() : chr(-1), left(NULL), right(NULL) { } - ~DecNode() { - delete left; - delete right; - } - }; - SSL_CTX* clientContext; SSL_CTX* clientVerContext; SSL_CTX* serverContext; @@ -132,7 +109,7 @@ void walkTree(list<Node*>& aTree); void recurseLookup(vector<u_int8_t>* b, Node* node, vector<u_int8_t>& bytes); void buildLookup(vector<u_int8_t>* b, Node* root); - + string keySubst(const u_int8_t* aKey, size_t len, size_t n); bool isExtra(u_int8_t b) { return (b == 0 || b==5 || b==124 || b==96 || b==126 || b==36); Modified: dcplusplus/trunk/client/DCPlusPlus.cpp =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/DCPlusPlus.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -97,7 +97,7 @@ BufferedSocket::waitShutdown(); SettingsManager::getInstance()->save(); - + ADLSearchManager::deleteInstance(); FinishedManager::deleteInstance(); ShareManager::deleteInstance(); Modified: dcplusplus/trunk/client/DCPlusPlus.h =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.h 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/DCPlusPlus.h 2006-09-18 18:13:50 UTC (rev 649) @@ -33,10 +33,10 @@ { va_list args; va_start(args, format); - + #ifdef _WIN32 char buf[512]; - + _vsnprintf(buf, sizeof(buf), format, args); OutputDebugStringA(buf); #else // _WIN32 Modified: dcplusplus/trunk/client/DirectoryListing.cpp =================================================================== --- dcplusplus/trunk/client/DirectoryListing.cpp 2006-09-11 13:46:56 UTC (rev 648) +++ dcplusplus/trunk/client/DirectoryListing.cpp 2006-09-18 18:13:50 UTC (rev 649) @@ -80,17 +80,7 @@ // For now, we detect type by ending... string ext = Util::getFileExt(name); - if(Util::stricmp(ext, ".DcLst") == 0) { - size_t len = (size_t)::File::getSize(name); - if(len == (size_t)-1) - return; - AutoArray<u_int8_t> buf(len); - ::File(name, ::File::READ, ::File::OPEN).read(buf, len); - CryptoManager::getInstance()->decodeHuffman(buf, txt, len); - load(txt); - return; - } - + if(Util::stricmp(ext, ".bz2") == 0) { ::File ff(name, ::File::READ, ::File::OPEN); FilteredInputStream<UnBZFilter, false> f(&ff); @@ -120,62 +110,9 @@ loadXML(txt, false); } -void DirectoryListing::load(const string& in) { - StringTokenizer<string> t(in, '\n'); - - StringList& tokens = t.getTokens(); - string::size_type indent = 0; - - root->setComplete(true); - - Directory* cur = root; - string fullPath; - - for(StringIter i = tokens.begin(); i != tokens.end(); ++i) - { - string& tok = *i; - string::size_type j = tok.find_first_not_of('\t'); - if(j == string::npos) { - break; - } - - while(j < indent) { - // Wind up directory structure - cur = cur->getParent(); - dcassert(cur != NULL); - indent--; - string::size_type l = fullPath.find_last_of('\\'); - if(l != string::npos) { - fullPath.erase(fullPath.begin() + l, fullPath.end()); - } - } - - string::size_type k = tok.find('|', j); - if(k != string::npos) { - // this must be a file... - cur->files.push_back(new File(cur, tok.substr(j, k-j), Util::toInt64(tok.substr(k+1)))); - } else { - // A directory - string name = tok.substr(j, tok.length()-j-1); - fullPath += '\\'; - fullPath += name; - - Directory::Iter di = ::find(cur->directories.begin(), cur->directories.end(), name); - if(di != cur->directories.end()) { - cur = *di; - } else { - Directory* d = new Directory(cur, name, false, true); - cur->directories.push_back(d); - cur = d; - } - indent++; - } - } -} - class ListLoader : public SimpleXMLReader::CallBack { public: - ListLoader(DirectoryListing::Directory* root, bool aUpdating) : cur(root), base("/"), inListing(false), updating(aUpdating) { + ListLoader(DirectoryListing::Directory* root, bool aUpdating) : cur(root), base("/"), inListing(false), updating(aUpdating) { } virtual ~ListLoader() { } @@ -220,7 +157,10 @@ if(s.empty()) return; const string& h = getAttrib(attribs, sTTH, 2); - DirectoryListing::File* f = h.empty() ? new DirectoryListing::File(cur, n, Util::toInt64(s)) : new DirectoryListing::File(cur, n, Util::toInt64(s), h); + if(h.empty()) { + return; + } + DirectoryListing::File* f = new DirectoryListing::File(cur, n, Util::toInt64(s), h); cur->files.push_back(f); } else if(name == sDirectory) { const string& n = getAttrib(attribs, sName, 0); @@ -230,7 +1... [truncated message content] |
From: <arn...@us...> - 2006-09-11 13:41:53
|
Revision: 647 http://svn.sourceforge.net/dcplusplus/?rev=647&view=rev Author: arnetheduck Date: 2006-09-11 06:41:15 -0700 (Mon, 11 Sep 2006) Log Message: ----------- Last fixes before release Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/client/SettingsManager.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-09-10 19:03:10 UTC (rev 646) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-09-11 13:41:15 UTC (rev 647) @@ -942,8 +942,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,4 - PRODUCTVERSION 0,6,9,4 + FILEVERSION 0,6,9,5 + PRODUCTVERSION 0,6,9,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -960,12 +960,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 4" + VALUE "FileVersion", "0, 6, 9, 5" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 4" + VALUE "ProductVersion", "0, 6, 9, 5" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-09-10 19:03:10 UTC (rev 646) +++ dcplusplus/trunk/Example.xml 2006-09-11 13:41:15 UTC (rev 647) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.694" Revision="1" RightToLeft="0"> +<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.695" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-09-10 19:03:10 UTC (rev 646) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-09-11 13:41:15 UTC (rev 647) @@ -135,7 +135,7 @@ setDefault(IGNORE_BOT_PMS, false); setDefault(LIST_DUPES, true); setDefault(BUFFER_SIZE, 64); - setDefault(HUBLIST_SERVERS, "http://hubs.bandicoot.nl/;http://www.hublist.org/PublicHubList.xml.bz2"); + setDefault(HUBLIST_SERVERS, "http://home.bandicoot.nl/adchublist.xml.bz2;http://www.hublist.org/PublicHubList.xml.bz2"); setDefault(DOWNLOAD_SLOTS, 3); setDefault(MAX_DOWNLOAD_SPEED, 0); setDefault(LOG_DIRECTORY, Util::getConfigPath() + "Logs" PATH_SEPARATOR_STR); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-09-10 19:04:52
|
Revision: 646 http://svn.sourceforge.net/dcplusplus/?rev=646&view=rev Author: arnetheduck Date: 2006-09-10 12:03:10 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Patches and small fixes Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/DCPlusPlus.vcproj dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/DCPlusPlus.h dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/User.cpp dcplusplus/trunk/client/User.h dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/client/version.h dcplusplus/trunk/help/changelog.html dcplusplus/trunk/windows/AboutDlg.h dcplusplus/trunk/windows/DirectoryListingFrm.cpp dcplusplus/trunk/windows/FlatTabCtrl.h dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/MainFrm.h dcplusplus/trunk/windows/NetworkPage.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-09-10 19:03:10 UTC (rev 646) @@ -97,6 +97,9 @@ DEFPUSHBUTTON "OK",IDOK,96,266,50,14 ICON IDR_MAINFRAME,IDC_STATIC,110,15,21,20 GROUPBOX "",IDC_STATIC,7,7,229,102 + EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_BORDER + LTEXT "TTH:",IDC_STATIC,13,93,18,12 GROUPBOX "Greetz && Contributors",IDC_STATIC,7,112,229,82, BS_CENTER GROUPBOX "Latest version",IDC_STATIC,7,239,229,24,BS_CENTER @@ -108,9 +111,6 @@ EDITTEXT IDC_THANKS,13,122,218,66,ES_MULTILINE | ES_READONLY | WS_VSCROLL CTEXT "Static",IDC_VERSION,13,37,218,54 - EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT - WS_BORDER - LTEXT "TTH:",IDC_STATIC,13,93,18,12 END IDD_LINE DIALOGEX 0, 0, 239, 46 @@ -526,6 +526,9 @@ LTEXT "MiB",IDC_SETTINGS_MB,117,78,14,8 LTEXT "PID",IDC_STATIC,52,95,12,8 EDITTEXT IDC_PRIVATE_ID,69,92,45,14,ES_AUTOHSCROLL + LTEXT "Auto refresh time",IDC_SETTINGS_AUTO_REFRESH_TIME,7,113, + 57,8 + EDITTEXT IDC_AUTO_REFRESH_TIME,69,110,45,14,ES_AUTOHSCROLL RTEXT "File write buffer",IDC_SETTINGS_WRITE_BUFFER,139,10,65, 8 EDITTEXT IDC_BUFFERSIZE,208,7,41,14,ES_AUTOHSCROLL @@ -547,9 +550,6 @@ 96,76,8 EDITTEXT IDC_SOCKET_OUT_BUFFER,208,93,41,14,ES_AUTOHSCROLL LTEXT "B",IDC_STATIC,252,96,8,8 - LTEXT "Auto refresh time",IDC_SETTINGS_AUTO_REFRESH_TIME,7,113, - 57,8 - EDITTEXT IDC_AUTO_REFRESH_TIME,69,110,45,14,ES_AUTOHSCROLL EDITTEXT IDC_AUTO_SEARCH_LIMIT,208,111,41,14,ES_AUTOHSCROLL LTEXT "Auto-search limit",IDC_SETTINGS_AUTO_SEARCH_LIMIT,148, 113,56,13 Modified: dcplusplus/trunk/DCPlusPlus.vcproj =================================================================== --- dcplusplus/trunk/DCPlusPlus.vcproj 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/DCPlusPlus.vcproj 2006-09-10 19:03:10 UTC (rev 646) @@ -48,7 +48,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/FIXED:NO /SAFESEH:NO" - AdditionalDependencies="libunicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib htmlhelp.lib ws2_32.lib" + AdditionalDependencies="libunicows.lib SHFolder.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib htmlhelp.lib ws2_32.lib" OutputFile="$(SolutionDir)App/$(ProjectName).exe" LinkIncremental="2" SuppressStartupBanner="TRUE" @@ -127,7 +127,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/FIXED:NO /SAFESEH:NO" - AdditionalDependencies="libunicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib htmlhelp.lib ws2_32.lib" + AdditionalDependencies="libunicows.lib SHFolder.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib htmlhelp.lib ws2_32.lib" OutputFile="$(SolutionDir)App/$(ProjectName).exe" Version="" LinkIncremental="1" Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/changelog.txt 2006-09-10 19:03:10 UTC (rev 646) @@ -1,4 +1,4 @@ --- -- +-- 0.695 2006-09-10 -- * PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo without connection type * [bug 125] Fixed out-of-order PM/quit @@ -17,6 +17,15 @@ * [bug 1032] Fixed certificates help (thanks pothead) * Added possibility to store configuration files in separate directory * Switched back to unicows for w9x users, opencow was missing too many functions +* [bug 876] Fixed lost tooltips (thanks poy and bigmuscle) +* [bug 1041] Fixed about tab order (thanks pothead) +* [bug 1042] Fixed experts tab order (thanks pothead) +* [bug 1047] Fixed possible nmdc crash (thanks guitarm) +* [bug 1049] Added tooltip to tab bar (thanks poy) +* [bug 1053] Fixed vista detection (thanks ullner) +* [bug 988] Fixed duplicate nicks +* [bug 1015] Fixed chevron text +* Default hub lists updated -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/DCPlusPlus.h =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/DCPlusPlus.h 2006-09-10 19:03:10 UTC (rev 646) @@ -23,6 +23,10 @@ #pragma once #endif // _MSC_VER > 1000 +#ifdef _WIN32 +#define snprintf _snprintf +#endif + #ifdef _DEBUG inline void CDECL debugTrace(const char* format, ...) @@ -41,10 +45,6 @@ va_end(args); } -#ifdef _WIN32 -#define snprintf _snprintf -#endif - #define dcdebug debugTrace #ifdef _WIN32 #define dcassert(exp) \ Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -202,7 +202,13 @@ return; } string nick = line.substr(1, i-1); - string message = line.substr(i+2); + string message; + if((line.length()-1) > i) { + message = line.substr(i+2); + } else { + fire(ClientListener::StatusMessage(), this, unescape(line)); + return; + } OnlineUser* ou = findUser(nick); if(ou) { @@ -689,7 +695,7 @@ } if(from == 0) { // Assume it's from the hub - from = &getUser(rtNick); + from = &getUser(fromNick); from->getIdentity().setHub(true); from->getIdentity().setHidden(true); fire(ClientListener::UserUpdated(), this, *from); @@ -698,8 +704,8 @@ // Update pointers just in case they've been invalidated replyTo = findUser(rtNick); from = findUser(fromNick); - - } + } + OnlineUser& to = getUser(getMyNick()); fire(ClientListener::PrivateMessage(), this, *from, to, *replyTo, unescape(msg)); } else if(cmd == "$GetPass") { Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -135,7 +135,7 @@ setDefault(IGNORE_BOT_PMS, false); setDefault(LIST_DUPES, true); setDefault(BUFFER_SIZE, 64); - setDefault(HUBLIST_SERVERS, "http://www.hublist.org/PublicHubList.xml.bz2;http://dc.selwerd.nl/hublist.xml.bz2"); + setDefault(HUBLIST_SERVERS, "http://hubs.bandicoot.nl/;http://www.hublist.org/PublicHubList.xml.bz2"); setDefault(DOWNLOAD_SLOTS, 3); setDefault(MAX_DOWNLOAD_SPEED, 0); setDefault(LOG_DIRECTORY, Util::getConfigPath() + "Logs" PATH_SEPARATOR_STR); Modified: dcplusplus/trunk/client/User.cpp =================================================================== --- dcplusplus/trunk/client/User.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/User.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -28,7 +28,10 @@ } +RWLock<> Identity::rw; + void Identity::getParams(StringMap& sm, const string& prefix, bool compatibility) const { + RLock<> l(rw); for(InfMap::const_iterator i = info.begin(); i != info.end(); ++i) { sm[prefix + string((char*)(&i->first), 2)] = i->second; } Modified: dcplusplus/trunk/client/User.h =================================================================== --- dcplusplus/trunk/client/User.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/User.h 2006-09-10 19:03:10 UTC (rev 646) @@ -27,6 +27,7 @@ #include "Pointer.h" #include "CID.h" #include "FastAlloc.h" +#include "CriticalSection.h" /** A user connected to one or more hubs. */ class User : public FastAlloc<User>, public PointerBase, public Flags @@ -136,11 +137,13 @@ bool isUdpActive() const { return !getIp().empty() && !getUdpPort().empty(); } const string& get(const char* name) const { + RLock<> l(rw); InfMap::const_iterator i = info.find(*(short*)name); return i == info.end() ? Util::emptyString : i->second; } void set(const char* name, const string& val) { + WLock<> l(rw); if(val.empty()) info.erase(*(short*)name); else @@ -159,6 +162,8 @@ typedef map<short, string> InfMap; typedef InfMap::iterator InfIter; InfMap info; + /** @todo there are probably more threading issues here ...*/ + static RWLock<> rw; }; class Client; Modified: dcplusplus/trunk/client/Util.cpp =================================================================== --- dcplusplus/trunk/client/Util.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/Util.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -831,6 +831,8 @@ os += " Server"; else if(ver.wProductType & VER_NT_DOMAIN_CONTROLLER) os += " DC"; + } else if(ver.dwMajorVersion == 6) { + os = "WinVista"; } if(ver.wServicePackMajor != 0) { Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/client/version.h 2006-09-10 19:03:10 UTC (rev 646) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.694" -#define VERSIONFLOAT 0.694 +#define VERSIONSTRING "0.695" +#define VERSIONFLOAT 0.695 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/help/changelog.html 2006-09-10 19:03:10 UTC (rev 646) @@ -13,6 +13,36 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.695 <span style="color: gray;">(2006-09-10)</span></h2> +<ul> + <li>PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo without connection type</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=125">[bug 125]</a> Fixed out-of-order PM/quit</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=224">[bug 224]</a> Slots are no longer granted to disconnected users, instead disconnection is delayed a minute</li> + <li>[NMDC] Fixed extra space in chat</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=395">[bug 395]</a> Fixed password being blanked</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=419">[bug 419]</a> Allowed changing case only when moving file in queue</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=736">[bug 736]</a> Fixed escaping of menu items</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1013">[bug 1013]</a> Fixed gcc warnings (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1023">[bug 1023]</a> Fixed some large stack allocations (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1026">[bug 1026]</a> Fixed some potential buffer overflows (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1027">[bug 1027]</a> Improved unix socket support (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1028">[bug 1028]</a> Improved big endian support (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1029">[bug 1029]</a> Fixed BSD compile issue (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1031">[bug 1031]</a> Fixed a crash after closing hub window (thanks bigmuscle/pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1032">[bug 1032]</a> Fixed certificates help (thanks pothead)</li> + <li>Added possibility to store configuration files in separate directory</li> + <li>Switched back to unicows for w9x users, opencow was missing too many functions</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=876">[bug 876]</a> Fixed lost tooltips (thanks poy and bigmuscle)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1041">[bug 1041]</a> Fixed about tab order (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1042">[bug 1042]</a> Fixed experts tab order (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1047">[bug 1047]</a> Fixed possible nmdc crash (thanks guitarm)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1049">[bug 1049]</a> Added tooltip to tab bar (thanks poy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1053">[bug 1053]</a> Fixed vista detection (thanks ullner)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=988">[bug 988]</a> Fixed duplicate nicks</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1015">[bug 1015]</a> Fixed chevron text</li> + <li>Default hub lists updated</li> +</ul> + <h2>0.694 <span style="color: gray;">(2006-07-10)</span></h2> <ul> <li>Fixed crash in certificates page</li> Modified: dcplusplus/trunk/windows/AboutDlg.h =================================================================== --- dcplusplus/trunk/windows/AboutDlg.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/AboutDlg.h 2006-09-10 19:03:10 UTC (rev 646) @@ -42,7 +42,7 @@ _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, bart vullings, ") -_T("steven sheehy, tobias nygren. ") +_T("steven sheehy, tobias nygren, poy. ") _T("Keep it coming!"); class AboutDlg : public CDialogImpl<AboutDlg>, private HttpConnectionListener Modified: dcplusplus/trunk/windows/DirectoryListingFrm.cpp =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -212,6 +212,7 @@ updateTree(*i, ht); } } + void DirectoryListingFrame::refreshTree(const tstring& root) { ctrlTree.SetRedraw(FALSE); @@ -365,6 +366,7 @@ history = tmp; } } + void DirectoryListingFrame::forward() { if(history.size() > 1 && historyIndex < history.size()) { size_t n = min(historyIndex, history.size() - 1); Modified: dcplusplus/trunk/windows/FlatTabCtrl.h =================================================================== --- dcplusplus/trunk/windows/FlatTabCtrl.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/FlatTabCtrl.h 2006-09-10 19:03:10 UTC (rev 646) @@ -183,6 +183,7 @@ MESSAGE_HANDLER(WM_LBUTTONDOWN, onLButtonDown) MESSAGE_HANDLER(WM_LBUTTONUP, onLButtonUp) MESSAGE_HANDLER(WM_CONTEXTMENU, onContextMenu) + MESSAGE_HANDLER(WM_MOUSEMOVE, onMouseMove) COMMAND_ID_HANDLER(IDC_CLOSE_WINDOW, onCloseWindow) COMMAND_ID_HANDLER(IDC_CHEVRON, onChevron) COMMAND_RANGE_HANDLER(IDC_SELECT_WINDOW, IDC_SELECT_WINDOW+tabs.size(), onSelectWindow) @@ -268,6 +269,37 @@ return 0; } + LRESULT onMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) { + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; // location of mouse click + + int xPos = pt.x; + int row = rows - ((pt.y / height) + 1); + + for(TabInfo::ListIter i = tabs.begin(); i != tabs.end(); ++i) { + TabInfo* t = *i; + if((row == t->row) && (xPos >= t->xpos) && (xPos < (t->xpos + t->getWidth()))) { + // Bingo, the mouse was over this one + int len = ::GetWindowTextLength(t->hWnd) + 1; + if(len >= TabInfo::MAX_LENGTH) { + TCHAR* buf = new TCHAR[len]; + ::GetWindowText(t->hWnd, buf, len); + if(buf != current_tip) { + tab_tip.DelTool(m_hWnd); + CToolInfo ti(TTF_SUBCLASS, m_hWnd, 0, NULL, buf); + tab_tip.AddTool(&ti); + tab_tip.Activate(TRUE); + current_tip = buf; + } + delete[] buf; + return 1; + } + } + } + tab_tip.Activate(FALSE); + current_tip = _T(""); + return 1; + } + LRESULT onCloseWindow(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if(::IsWindow(closing)) ::SendMessage(closing, WM_CLOSE, 0, 0); @@ -323,10 +355,12 @@ LRESULT onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { chevron.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | BS_PUSHBUTTON , 0, IDC_CHEVRON); - chevron.SetWindowText(_T("�")); + chevron.SetWindowText(_T("\u00bb")); mnu.CreatePopupMenu(); + tab_tip.Create(m_hWnd, rcDefault, NULL, TTS_ALWAYSTIP | TTS_NOPREFIX); + CDC dc(::GetDC(m_hWnd)); HFONT oldfont = dc.SelectFont(WinUtil::font); height = WinUtil::getTextHeight(dc) + 2; @@ -542,10 +576,13 @@ HWND closing; CButton chevron; CMenu mnu; + CToolTipCtrl tab_tip; int rows; int height; + tstring current_tip; + TabInfo* active; TabInfo* moving; typename TabInfo::List tabs; Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -161,6 +161,13 @@ } } +LRESULT HubFrame::OnForwardMsg(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) { + LPMSG pMsg = (LPMSG)lParam; + if((pMsg->message >= WM_MOUSEFIRST) && (pMsg->message <= WM_MOUSELAST)) + ctrlLastLines.RelayEvent(pMsg); + return 0; +} + void HubFrame::onEnter() { if(ctrlMessage.GetWindowTextLength() > 0) { AutoArray<TCHAR> msg(ctrlMessage.GetWindowTextLength()+1); Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/HubFrame.h 2006-09-10 19:03:10 UTC (rev 646) @@ -62,6 +62,7 @@ MESSAGE_HANDLER(WM_CLOSE, onClose) MESSAGE_HANDLER(WM_SETFOCUS, onSetFocus) MESSAGE_HANDLER(WM_CREATE, OnCreate) + MESSAGE_HANDLER(WM_FORWARDMSG, OnForwardMsg) MESSAGE_HANDLER(WM_SPEAKER, onSpeaker) MESSAGE_HANDLER(WM_CONTEXTMENU, onContextMenu) MESSAGE_HANDLER(WM_CTLCOLORSTATIC, onCtlColor) @@ -91,6 +92,7 @@ COMMAND_CODE_HANDLER(CBN_SELCHANGE, onSelChange) END_MSG_MAP() + LRESULT OnForwardMsg(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/); LRESULT onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/); LRESULT onCopyNick(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT onCopyHub(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); Modified: dcplusplus/trunk/windows/MainFrm.h =================================================================== --- dcplusplus/trunk/windows/MainFrm.h 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/MainFrm.h 2006-09-10 19:03:10 UTC (rev 646) @@ -61,6 +61,9 @@ virtual BOOL PreTranslateMessage(MSG* pMsg) { + if((pMsg->message >= WM_MOUSEFIRST) && (pMsg->message <= WM_MOUSELAST)) + ctrlLastLines.RelayEvent(pMsg); + if(CMDIFrameWindowImpl<MainFrame>::PreTranslateMessage(pMsg)) return TRUE; Modified: dcplusplus/trunk/windows/NetworkPage.cpp =================================================================== --- dcplusplus/trunk/windows/NetworkPage.cpp 2006-09-04 15:16:01 UTC (rev 645) +++ dcplusplus/trunk/windows/NetworkPage.cpp 2006-09-10 19:03:10 UTC (rev 646) @@ -113,8 +113,8 @@ { PropPage::translate((HWND)(*this), texts); - if(!(WinUtil::getOsMajor() >= 5 && WinUtil::getOsMinor() >= 1 ) //WinXP & WinSvr2003 - || WinUtil::getOsMajor() >= 6 ) //Longhorn + if(!(WinUtil::getOsMajor() >= 5 && WinUtil::getOsMinor() >= 1 //WinXP & WinSvr2003 + || WinUtil::getOsMajor() >= 6 )) //Vista { ::EnableWindow(GetDlgItem(IDC_FIREWALL_UPNP), FALSE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-09-04 15:16:22
|
Revision: 645 http://svn.sourceforge.net/dcplusplus/?rev=645&view=rev Author: arnetheduck Date: 2006-09-04 08:16:01 -0700 (Mon, 04 Sep 2006) Log Message: ----------- no more opencow Modified Paths: -------------- dcplusplus/trunk/windows/MainFrm.cpp dcplusplus/trunk/windows/SingleInstance.h Modified: dcplusplus/trunk/windows/MainFrm.cpp =================================================================== --- dcplusplus/trunk/windows/MainFrm.cpp 2006-09-04 14:02:22 UTC (rev 644) +++ dcplusplus/trunk/windows/MainFrm.cpp 2006-09-04 15:16:01 UTC (rev 645) @@ -104,9 +104,7 @@ WinUtil::init(m_hWnd); - //trayMessage = RegisterWindowMessage(_T("TaskbarCreated")); - // Use ASCII version as opencow doesn't support the wide one... - trayMessage = RegisterWindowMessageA("TaskbarCreated"); + trayMessage = RegisterWindowMessage(_T("TaskbarCreated")); TimerManager::getInstance()->start(); Modified: dcplusplus/trunk/windows/SingleInstance.h =================================================================== --- dcplusplus/trunk/windows/SingleInstance.h 2006-09-04 14:02:22 UTC (rev 644) +++ dcplusplus/trunk/windows/SingleInstance.h 2006-09-04 15:16:01 UTC (rev 645) @@ -24,7 +24,7 @@ #endif // _MSC_VER > 1000 #define WMU_WHERE_ARE_YOU_MSG _T("WMU_WHERE_ARE_YOU-{885D4B75-6606-4add-A8DE-EEEDC04181F1}") -const UINT WMU_WHERE_ARE_YOU = ::RegisterWindowMessageA("WMU_WHERE_ARE_YOU_MSG"); +const UINT WMU_WHERE_ARE_YOU = ::RegisterWindowMessage(_T("WMU_WHERE_ARE_YOU_MSG")); class SingleInstance { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-09-04 14:04:11
|
Revision: 644 http://svn.sourceforge.net/dcplusplus/?rev=644&view=rev Author: arnetheduck Date: 2006-09-04 07:02:22 -0700 (Mon, 04 Sep 2006) Log Message: ----------- Configuration fixes, back to unicows Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.nsi dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/AdcHub.cpp dcplusplus/trunk/client/File.h dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/client/Util.h dcplusplus/trunk/client/config.h dcplusplus/trunk/windows/AppearancePage.cpp dcplusplus/trunk/windows/MainFrm.cpp dcplusplus/trunk/windows/WinUtil.cpp dcplusplus/trunk/windows/WinUtil.h dcplusplus/trunk/windows/main.cpp Added Paths: ----------- dcplusplus/trunk/dcppboot.xml dcplusplus/trunk/release.cmd dcplusplus/trunk/unicows.dll dcplusplus/trunk/unicows.pdb Removed Paths: ------------- dcplusplus/trunk/opencow.dll Modified: dcplusplus/trunk/DCPlusPlus.nsi =================================================================== --- dcplusplus/trunk/DCPlusPlus.nsi 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/DCPlusPlus.nsi 2006-09-04 14:02:22 UTC (rev 644) @@ -56,15 +56,15 @@ ; Put file there File "/oname=DCPlusPlus.exe" "App\DCPlusPlus.exe" File "/oname=DCPlusPlus.chm" "App\DCPlusPlus.chm" - File "/oname=opencow.dll" "app\opencow.dll" + File "unicows.dll" File "ChangeLog.txt" File "Example.xml" File "License.txt" File "License-GeoIP.txt" File "Magnet.exe" - ; Remove unicows so that opencow will be used instead - Delete "$INSTDIR\unicows.dll" - Delete "$INSTDIR\unicows.pdb" + File "dcppboot.xml" + ; Remove opencow just in case we're upgrading + Delete "$INSTDIR\opencow.dll" ; Get DCPlusplus version we just installed and store in $1 Push "DCPlusPlus.exe" @@ -97,6 +97,7 @@ Section "Debug Information (recommended, helps finding bugs)" SetOutPath $INSTDIR File "/oname=DCPlusPlus.pdb" "App\DCPlusPlus.pdb" + File "unicows.pdb" File "dbghelp.dll" SectionEnd @@ -127,7 +128,8 @@ Delete "$INSTDIR\License-GeoIP.txt" Delete "$INSTDIR\License.txt" Delete "$INSTDIR\ChangeLog.txt" - Delete "$INSTDIR\opencow.dll" + Delete "$INSTDIR\unicows.dll" + Delete "$INSTDIR\unicows.pdb" Delete "$INSTDIR\Example.xml" Delete "$INSTDIR\Magnet.exe" Delete "$INSTDIR\GeoIPCountryWhois.csv" Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/changelog.txt 2006-09-04 14:02:22 UTC (rev 644) @@ -15,6 +15,8 @@ * [bug 1029] Fixed BSD compile issue (thanks steven sheehy) * [bug 1031] Fixed a crash after closing hub window (thanks bigmuscle/pothead) * [bug 1032] Fixed certificates help (thanks pothead) +* Added possibility to store configuration files in separate directory +* Switched back to unicows for w9x users, opencow was missing too many functions -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -343,7 +343,7 @@ if(!u) return; - int severity = Util::toInt(c.getParam(0).substr(0, 1)); + //int severity = Util::toInt(c.getParam(0).substr(0, 1)); int code = Util::toInt(c.getParam(0).substr(1)); if(code == AdcCommand::ERROR_BAD_PASSWORD) { Modified: dcplusplus/trunk/client/File.h =================================================================== --- dcplusplus/trunk/client/File.h 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/File.h 2006-09-04 14:02:22 UTC (rev 644) @@ -222,6 +222,10 @@ } } + static bool isAbsolute(const string& path) { + return path.size() > 2 && (path[1] == ':' || path[0] == '/' || path[0] == '\\'); + } + #else // _WIN32 enum { @@ -395,6 +399,9 @@ } } + static bool isAbsolute(const string& path) { + return path.size() > 1 && path[0] = '/'; + } #endif // _WIN32 Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -84,6 +84,7 @@ SettingsManager::SettingsManager() { + connectionSpeeds.push_back("0.005"); connectionSpeeds.push_back("0.01"); connectionSpeeds.push_back("0.02"); @@ -111,8 +112,8 @@ int64Settings[k] = 0; } - setDefault(DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Downloads" PATH_SEPARATOR_STR); - setDefault(TEMP_DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Incomplete" PATH_SEPARATOR_STR); + setDefault(DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Downloads" PATH_SEPARATOR_STR); + setDefault(TEMP_DOWNLOAD_DIRECTORY, Util::getConfigPath() + "Incomplete" PATH_SEPARATOR_STR); setDefault(SLOTS, 1); setDefault(TCP_PORT, 0); setDefault(UDP_PORT, 0); @@ -137,7 +138,7 @@ setDefault(HUBLIST_SERVERS, "http://www.hublist.org/PublicHubList.xml.bz2;http://dc.selwerd.nl/hublist.xml.bz2"); setDefault(DOWNLOAD_SLOTS, 3); setDefault(MAX_DOWNLOAD_SPEED, 0); - setDefault(LOG_DIRECTORY, Util::getConfigPath() + "Logs" PATH_SEPARATOR_STR); + setDefault(LOG_DIRECTORY, Util::getConfigPath() + "Logs" PATH_SEPARATOR_STR); setDefault(LOG_UPLOADS, false); setDefault(LOG_DOWNLOADS, false); setDefault(LOG_PRIVATE_CHAT, false); @@ -248,8 +249,8 @@ setDefault(OPEN_WAITING_USERS, false); setDefault(OPEN_SYSTEM_LOG, true); setDefault(TLS_TRUSTED_CERTIFICATES_PATH, Util::getConfigPath() + "Certificates" PATH_SEPARATOR_STR); - setDefault(TLS_PRIVATE_KEY_FILE, Util::getConfigPath() + "Certificates" PATH_SEPARATOR_STR "client.key"); - setDefault(TLS_CERTIFICATE_FILE, Util::getConfigPath() + "Certificates" PATH_SEPARATOR_STR "client.crt"); + setDefault(TLS_PRIVATE_KEY_FILE, Util::getConfigPath() + "Certificates" PATH_SEPARATOR_STR "client.key"); + setDefault(TLS_CERTIFICATE_FILE, Util::getConfigPath() + "Certificates" PATH_SEPARATOR_STR "client.crt"); setDefault(BOLD_FINISHED_DOWNLOADS, true); setDefault(BOLD_FINISHED_UPLOADS, true); setDefault(BOLD_QUEUE, true); Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -74,14 +74,14 @@ if(hFind != INVALID_HANDLE_VALUE) { do { if(_tcslen(data.cFileName) > 13) // length of "files.xml.bz2" - File::deleteFile(Util::getAppPath() + Text::fromT(data.cFileName)); + File::deleteFile(Util::getConfigPath() + Text::fromT(data.cFileName)); } while(FindNextFile(hFind, &data)); FindClose(hFind); } #else - DIR* dir = opendir(Util::getAppName().c_str()); + DIR* dir = opendir(Util::getConfigPath().c_str()); if (dir) { while (struct dirent* ent = readdir(dir)) { if (fnmatch("files*.xml.bz2", ent->d_name, 0) == 0) { Modified: dcplusplus/trunk/client/Util.cpp =================================================================== --- dcplusplus/trunk/client/Util.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/Util.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -27,8 +27,12 @@ #include "StringTokenizer.h" #include "SettingsManager.h" #include "version.h" +#include "File.h" +#include "SimpleXML.h" -#ifndef _WIN32 +#ifdef _WIN32 +#include <ShlObj.h> +#else #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -56,7 +60,9 @@ time_t Util::awayTime; Util::CountryList Util::countries; -string Util::appPath; +string Util::configPath; +string Util::systemPath; +string Util::dataPath; static void sgenrand(unsigned long seed); @@ -79,22 +85,49 @@ #ifdef _WIN32 TCHAR buf[MAX_PATH+1]; - GetModuleFileName(NULL, buf, MAX_PATH); - appPath = Text::fromT(buf); - appPath.erase(appPath.rfind('\\') + 1); + ::GetModuleFileName(NULL, buf, MAX_PATH); + // System config path is DC++ executable path... + systemPath = Util::getFilePath(Text::fromT(buf)); + configPath = systemPath; + dataPath = systemPath; +#else + systemPath = "/etc/"; + char* home = getenv("HOME"); + configPath = home ? home + string("/.dc++/") : "/tmp/"; +#error dataPath = wherever linux should fetch data +#endif + + // Load boot settings + try { + SimpleXML boot; + boot.fromXML(File(systemPath + "dcppboot.xml", File::READ, File::OPEN).read()); + boot.stepIn(); + + if(boot.findChild("ConfigPath")) { + StringMap params; +#ifdef _WIN32 + TCHAR path[MAX_PATH]; + + params["APPDATA"] = Text::fromT((::SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, path), path)); + params["PERSONAL"] = Text::fromT((::SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, path), path)); + configPath = Util::formatParams(boot.getChildData(), params, false); +#else +#error TODO - make env vars available perhaps? +#endif + } + } catch(const Exception& ) { + // Unable to load boot settings... + } + + if(!File::isAbsolute(configPath)) { + configPath = systemPath + configPath; + } + #if _MSC_VER == 1400 _set_invalid_parameter_handler(reinterpret_cast<_invalid_parameter_handler>(invalidParameterHandler)); #endif -#else // _WIN32 - char* home = getenv("HOME"); - if (home) { - appPath = Text::fromT(home); - appPath += "/.dc++/"; - } -#endif // _WIN32 - try { // This product includes GeoIP data created by MaxMind, available from http://maxmind.com/ // Updates at http://www.maxmind.com/app/geoip_country @@ -138,42 +171,7 @@ } } -string Util::getConfigPath() { #ifdef _WIN32 - return getAppPath(); -#else - char* home = getenv("HOME"); - if (home) { -#ifdef __APPLE__ -/// @todo Verify this for apple? - return string(home) + "/Library/Application Support/Mac DC++/"; -#else - return string(home) + "/.dc++/"; -#endif // __APPLE__ - } - return emptyString; -#endif // _WIN32 -} - -string Util::getDataPath() { -#ifdef _WIN32 - return getAppPath(); -#else - // This probably ought to be /usr/share/*... - char* home = getenv("HOME"); - if (home) { -#ifdef __APPLE__ - /// @todo Verify this for apple? - return string(home) + "/Library/Application Support/Mac DC++/"; -#else - return string(home) + "/.dc++/"; -#endif // __APPLE__ - } - return emptyString; -#endif // _WIN32 -} - -#ifdef _WIN32 static const char badChars[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, @@ -925,4 +923,45 @@ i++; } return toDOS(tmp); -} \ No newline at end of file +} + +string Util::getTimeString() { + char buf[64]; + time_t _tt; + time(&_tt); + tm* _tm = localtime(&_tt); + if(_tm == NULL) { + strcpy(buf, "xx:xx:xx"); + } else { + strftime(buf, 64, "%X", _tm); + } + return buf; +} + +string Util::toAdcFile(const string& file) { + if(file == "files.xml.bz2" || file == "MyList.DcLst") + return file; + + string ret; + ret.reserve(file.length() + 1); + ret += '/'; + ret += file; + for(string::size_type i = 0; i < ret.length(); ++i) { + if(ret[i] == '\\') { + ret[i] = '/'; + } + } + return ret; +} +string Util::toNmdcFile(const string& file) { + if(file.empty()) + return Util::emptyString; + + string ret(file.substr(1)); + for(string::size_type i = 0; i < ret.length(); ++i) { + if(ret[i] == '/') { + ret[i] = '\\'; + } + } + return ret; +} Modified: dcplusplus/trunk/client/Util.h =================================================================== --- dcplusplus/trunk/client/Util.h 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/Util.h 2006-09-04 14:02:22 UTC (rev 644) @@ -144,56 +144,26 @@ static void initialize(); - /** - * Get the path to the application executable. - * This is mainly intended for use on Windows. - * - * @return Path to executable file. - */ - static string getAppPath() { return appPath; } - - static string getAppName() { -#ifdef _WIN32 - TCHAR buf[MAX_PATH+1]; - DWORD x = GetModuleFileName(NULL, buf, MAX_PATH); - return Text::wideToUtf8(wstring(buf, x)); -#else // _WIN32 - char buf[PATH_MAX + 1]; - int n; - n = readlink("/proc/self/exe", buf, PATH_MAX); - if (n == -1) { - return emptyString; - } - buf[n] = '\0'; - return string(buf); -#endif // _WIN32 - } - /** Path of temporary storage */ static string getTempPath() { #ifdef _WIN32 TCHAR buf[MAX_PATH + 1]; DWORD x = GetTempPath(MAX_PATH, buf); - return Text::wideToUtf8(wstring(buf, x)); + return Text::fromT(tstring(buf, x)); #else return "/tmp/"; #endif } - /** Path of resource directory */ - static string getDataPath(); - /** Path of configuration files */ - static string getConfigPath(); + static const string& getConfigPath() { return configPath; } + static const string& getDataPath() { return dataPath; } + static const string& getSystemPath() { return systemPath; } /** Path of file lists */ - static string getListPath() { - return getConfigPath() + "FileLists" PATH_SEPARATOR_STR; - } + static string getListPath() { return getConfigPath() + "FileLists" PATH_SEPARATOR_STR; } /** Notepad filename */ - static string getNotepadFile() { - return getConfigPath() + "Notepad.txt"; - } + static string getNotepadFile() { return getConfigPath() + "Notepad.txt"; } static string translateError(int aError) { #ifdef _WIN32 @@ -270,55 +240,15 @@ static string validateFileName(string aFile); static string cleanPathChars(string aNick); - static string formatBytes(const string& aString) { - return formatBytes(toInt64(aString)); - } - + static string formatBytes(const string& aString) { return formatBytes(toInt64(aString)); } static string formatMessage(const string& nick, const string& message); static string toDOS(const string& tmp); static string getShortTimeString(time_t t = time(NULL) ); - static string getTimeString() { - char buf[64]; - time_t _tt; - time(&_tt); - tm* _tm = localtime(&_tt); - if(_tm == NULL) { - strcpy(buf, "xx:xx:xx"); - } else { - strftime(buf, 64, "%X", _tm); - } - return buf; - } - - static string toAdcFile(const string& file) { - if(file == "files.xml.bz2" || file == "MyList.DcLst") - return file; - - string ret; - ret.reserve(file.length() + 1); - ret += '/'; - ret += file; - for(string::size_type i = 0; i < ret.length(); ++i) { - if(ret[i] == '\\') { - ret[i] = '/'; - } - } - return ret; - } - static string toNmdcFile(const string& file) { - if(file.empty()) - return Util::emptyString; - - string ret(file.substr(1)); - for(string::size_type i = 0; i < ret.length(); ++i) { - if(ret[i] == '/') { - ret[i] = '\\'; - } - } - return ret; - } + static string getTimeString(); + static string toAdcFile(const string& file); + static string toNmdcFile(const string& file); static string formatBytes(int64_t aBytes); @@ -399,20 +329,12 @@ } static string toString(long long val) { char buf[32]; -#ifdef _MSC_VER - snprintf(buf, sizeof(buf), "%I64d", val); -#else - snprintf(buf, sizeof(buf), "%lld", val); -#endif + snprintf(buf, sizeof(buf), I64_FMT, val); return buf; } static string toString(unsigned long long val) { char buf[32]; -#ifdef _MSC_VER - snprintf(buf, sizeof(buf), "%I64u", val); -#else - snprintf(buf, sizeof(buf), "%llu", val); -#endif + snprintf(buf, sizeof(buf), U64_FMT, val); return buf; } static string toString(double val) { @@ -511,8 +433,13 @@ static double randd() { return ((double)rand()) / ((double)0xffffffff); } private: - static string appPath; + /** Per-user configuration */ + static string configPath; + /** Global configuration */ + static string systemPath; + /** Various resources (help files etc) */ static string dataPath; + static bool away; static bool manualAway; static string awayMsg; Modified: dcplusplus/trunk/client/config.h =================================================================== --- dcplusplus/trunk/client/config.h 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/client/config.h 2006-09-04 14:02:22 UTC (rev 644) @@ -80,14 +80,18 @@ #define _LL(x) x##ll #define _ULL(x) x##ull #define I64_FMT "%I64d" +#define U64_FMT "%I64d" + #elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8 #define _LL(x) x##l #define _ULL(x) x##ul #define I64_FMT "%ld" +#define U64_FMT "%ld" #else #define _LL(x) x##ll #define _ULL(x) x##ull #define I64_FMT "%lld" +#define U64_FMT "%lld" #endif #ifdef _WIN32 Added: dcplusplus/trunk/dcppboot.xml =================================================================== --- dcplusplus/trunk/dcppboot.xml (rev 0) +++ dcplusplus/trunk/dcppboot.xml 2006-09-04 14:02:22 UTC (rev 644) @@ -0,0 +1,16 @@ +<Boot> + <!-- + ConfigPath specifies where settings, queue and other runtime data should be saved. + Relative paths are relative to the DC++ executable. + You may use the following variables, which are interpreted on a per-user basis: + + %[APPDATA] - Application data, typically c:\documents and settings\<username>\Application Data\ + %[PERSONAL] - My documents + + All % variables from strftime with the current time: + http://msdn.microsoft.com/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp + + --> + + <ConfigPath>.\</ConfigPath> +</Boot> Deleted: dcplusplus/trunk/opencow.dll =================================================================== (Binary files differ) Added: dcplusplus/trunk/release.cmd =================================================================== --- dcplusplus/trunk/release.cmd (rev 0) +++ dcplusplus/trunk/release.cmd 2006-09-04 14:02:22 UTC (rev 644) @@ -0,0 +1,14 @@ +copy /b app\dcplusplus.exe . +copy /b app\dcplusplus.chm . +copy /b app\dcplusplus.pdb . +"c:\program files\WinRAR\WinRAR" a -ep -m5 DCPlusPlus-%1.zip dcppboot.xml unicows.dll unicows.pdb dcplusplus.chm dcplusplus.exe dcplusplus.pdb dbghelp.dll changelog.txt Example.xml License.txt GeoIPCountryWhois.csv +"c:\program files\WinRAR\WinRAR" a -m5 DCPlusPlus-%1-src.zip dcppboot.xml bootstrap makedefs.py Makefile.am configure.ac libunicows.lib unicows.dll unicows.pdb yassl\* yassl\certs\* yassl\include\openssl\* yassl\mySTL\* yassl\src\* yassl\include\* yassl\taocrypt\* yassl\taocrypt\src\* yassl\taocrypt\include\* stlport\.keep wtl\.keep help\* zlib\* bzip2\* client\* MakeDefs\* res\* windows\* changelog.txt Example.xml License.txt compile.txt GeoIPCountryWhois.csv *.dsp *.vcproj *.dsw *.sln *.rc extensions.txt doxyfile dcplusplus.nsi +del dcplusplus.exe +del dcplusplus.pdb +del dcplusplus.chm +makensis dcplusplus.nsi +move dcplusplus.exe DCPlusPlus-%1.exe + +svn status +pause +svn copy . https://svn.sourceforge.net/svnroot/dcplusplus/dcplusplus/tags/dcplusplus-%1 -m "%1" Added: dcplusplus/trunk/unicows.dll =================================================================== (Binary files differ) Property changes on: dcplusplus/trunk/unicows.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: dcplusplus/trunk/unicows.pdb =================================================================== (Binary files differ) Property changes on: dcplusplus/trunk/unicows.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: dcplusplus/trunk/windows/AppearancePage.cpp =================================================================== --- dcplusplus/trunk/windows/AppearancePage.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/windows/AppearancePage.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -82,7 +82,7 @@ GetDlgItemText(IDC_LANGUAGE, buf, MAX_PATH); tstring x = buf; - if(WinUtil::browseFile(x, m_hWnd, false, Text::toT(Util::getAppPath()), types) == IDOK) { + if(WinUtil::browseFile(x, m_hWnd, false, Text::toT(Util::getDataPath()), types) == IDOK) { SetDlgItemText(IDC_LANGUAGE, x.c_str()); } return 0; Modified: dcplusplus/trunk/windows/MainFrm.cpp =================================================================== --- dcplusplus/trunk/windows/MainFrm.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/windows/MainFrm.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -515,7 +515,7 @@ LRESULT MainFrame::onCopyData(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) { tstring cmdLine = (LPCTSTR) (((COPYDATASTRUCT *)lParam)->lpData); - parseCommandLine(Text::toT(Util::getAppName() + " ") + cmdLine); + parseCommandLine(Text::toT(WinUtil::getAppName() + " ") + cmdLine); return true; } Modified: dcplusplus/trunk/windows/WinUtil.cpp =================================================================== --- dcplusplus/trunk/windows/WinUtil.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/windows/WinUtil.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -693,7 +693,7 @@ void WinUtil::registerDchubHandler() { HKEY hk; TCHAR Buf[512]; - tstring app = _T("\"") + Text::toT(Util::getAppName()) + _T("\" %1"); + tstring app = _T("\"") + Text::toT(getAppName()) + _T("\" %1"); Buf[0] = 0; if(::RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("dchub\\Shell\\Open\\Command"), 0, KEY_WRITE | KEY_READ, &hk) == ERROR_SUCCESS) { @@ -719,7 +719,7 @@ ::RegCloseKey(hk); ::RegCreateKeyEx(HKEY_CLASSES_ROOT, _T("dchub\\DefaultIcon"), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hk, NULL); - app = Text::toT(Util::getAppName()); + app = Text::toT(getAppName()); ::RegSetValueEx(hk, _T(""), 0, REG_SZ, (LPBYTE)app.c_str(), sizeof(TCHAR) * (app.length() + 1)); ::RegCloseKey(hk); } @@ -732,7 +732,7 @@ void WinUtil::registerADChubHandler() { HKEY hk; TCHAR Buf[512]; - tstring app = _T("\"") + Text::toT(Util::getAppName()) + _T("\" %1"); + tstring app = _T("\"") + Text::toT(getAppName()) + _T("\" %1"); Buf[0] = 0; if(::RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("adc\\Shell\\Open\\Command"), 0, KEY_WRITE | KEY_READ, &hk) == ERROR_SUCCESS) { @@ -758,7 +758,7 @@ ::RegCloseKey(hk); ::RegCreateKeyEx(HKEY_CLASSES_ROOT, _T("adc\\DefaultIcon"), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hk, NULL); - app = Text::toT(Util::getAppName()); + app = Text::toT(getAppName()); ::RegSetValueEx(hk, _T(""), 0, REG_SZ, (LPBYTE)app.c_str(), sizeof(TCHAR) * (app.length() + 1)); ::RegCloseKey(hk); } @@ -796,10 +796,10 @@ } // check for the existence of magnet.exe if(File::getSize(Text::fromT(magnetExe)) == -1) { - magnetExe = Text::toT(Util::getAppPath() + "magnet.exe"); + magnetExe = Text::toT(Util::getDataPath() + "magnet.exe"); if(File::getSize(Text::fromT(magnetExe)) == -1) { // gracefully fall back to registering DC++ to handle magnets - magnetExe = Text::toT(Util::getAppName()); + magnetExe = Text::toT(getAppName()); haveMagnet = false; } else { // set Magnet\Location @@ -839,10 +839,10 @@ ::RegSetValueEx(hk, NULL, NULL, REG_SZ, (LPBYTE)CTSTRING(MAGNET_HANDLER_ROOT), sizeof(TCHAR) * (TSTRING(MAGNET_HANDLER_ROOT).size()+1)); ::RegSetValueEx(hk, _T("Description"), NULL, REG_SZ, (LPBYTE)CTSTRING(MAGNET_HANDLER_DESC), sizeof(TCHAR) * (STRING(MAGNET_HANDLER_DESC).size()+1)); // set ShellExecute - tstring app = Text::toT("\"" + Util::getAppName() + "\" %URL"); + tstring app = Text::toT("\"" + getAppName() + "\" %URL"); ::RegSetValueEx(hk, _T("ShellExecute"), NULL, REG_SZ, (LPBYTE)app.c_str(), sizeof(TCHAR) * (app.length()+1)); // set DefaultIcon - app = Text::toT('"' + Util::getAppName() + '"'); + app = Text::toT('"' + getAppName() + '"'); ::RegSetValueEx(hk, _T("DefaultIcon"), NULL, REG_SZ, (LPBYTE)app.c_str(), sizeof(TCHAR)*(app.length()+1)); ::RegCloseKey(hk); Modified: dcplusplus/trunk/windows/WinUtil.h =================================================================== --- dcplusplus/trunk/windows/WinUtil.h 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/windows/WinUtil.h 2006-09-04 14:02:22 UTC (rev 644) @@ -195,6 +195,12 @@ static void init(HWND hWnd); static void uninit(); + static string getAppName() { + TCHAR buf[MAX_PATH+1]; + DWORD x = GetModuleFileName(NULL, buf, MAX_PATH); + return Text::fromT(tstring(buf, x)); + } + static void decodeFont(const tstring& setting, LOGFONT &dest); static void addInitalDir(const User::Ptr& user, string dir) { @@ -277,7 +283,7 @@ static tstring encodeFont(LOGFONT const& font); static tstring getHelpFile() { - return Text::toT(Util::getAppPath() + "DCPlusPlus.chm"); + return Text::toT(Util::getDataPath() + "DCPlusPlus.chm"); } static bool browseFile(tstring& target, HWND owner = NULL, bool save = true, const tstring& initialDir = Util::emptyStringW, const TCHAR* types = NULL, const TCHAR* defExt = NULL); Modified: dcplusplus/trunk/windows/main.cpp =================================================================== --- dcplusplus/trunk/windows/main.cpp 2006-08-31 07:46:12 UTC (rev 643) +++ dcplusplus/trunk/windows/main.cpp 2006-09-04 14:02:22 UTC (rev 644) @@ -67,7 +67,7 @@ #endif // The release version loads the dll and pdb:s here... - EXTENDEDTRACEINITIALIZE( Util::getAppPath().c_str() ); + EXTENDEDTRACEINITIALIZE( Util::getDataPath().c_str() ); #endif @@ -76,7 +76,7 @@ firstException = false; } - if(File::getSize(Util::getAppPath() + "DCPlusPlus.pdb") == -1) { + if(File::getSize(Util::getDataPath() + "DCPlusPlus.pdb") == -1) { // No debug symbols, we're not interested... ::MessageBox(WinUtil::mainWnd, _T("DC++ has crashed and you don't have debug symbols installed. Hence, I can't find out why it crashed, so don't report this as a bug unless you find a solution..."), _T("DC++ has crashed"), MB_OK); #ifndef _DEBUG @@ -315,8 +315,8 @@ // For SHBrowseForFolder, UPnP HRESULT hRes = ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); #ifdef _DEBUG - EXTENDEDTRACEINITIALIZE( Util::getAppPath().c_str() ); - //File::deleteFile(Util::getAppPath() + "exceptioninfo.txt"); + EXTENDEDTRACEINITIALIZE( Util::getDataPath().c_str() ); + //File::deleteFile(Util::getDataPath() + "exceptioninfo.txt"); #endif SetUnhandledExceptionFilter(&DCUnhandledExceptionFilter); @@ -330,7 +330,7 @@ ATLASSERT(SUCCEEDED(hRes)); try { - File f(Util::getAppName(), File::READ, File::OPEN); + File f(WinUtil::getAppName(), File::READ, File::OPEN); TigerTree tth(TigerTree::calcBlockSize(f.getSize(), 1)); size_t n = 0; size_t n2 = DEBUG_BUFSIZE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-08-31 07:46:44
|
Revision: 643 http://svn.sourceforge.net/dcplusplus/?rev=643&view=rev Author: arnetheduck Date: 2006-08-31 00:46:12 -0700 (Thu, 31 Aug 2006) Log Message: ----------- Patches Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/AdcCommand.h dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/client/Client.h dcplusplus/trunk/client/ClientManager.cpp dcplusplus/trunk/client/DCPlusPlus.h dcplusplus/trunk/client/DirectoryListing.cpp dcplusplus/trunk/client/DownloadManager.cpp dcplusplus/trunk/client/FilteredFile.h dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/client/Socket.cpp dcplusplus/trunk/client/Socket.h dcplusplus/trunk/client/Util.cpp dcplusplus/trunk/client/Util.h dcplusplus/trunk/client/stdinc.h dcplusplus/trunk/windows/AboutDlg.h dcplusplus/trunk/windows/FlatTabCtrl.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/changelog.txt 2006-08-31 07:46:12 UTC (rev 643) @@ -7,6 +7,14 @@ * [bug 395] Fixed password being blanked * [bug 419] Allowed changing case only when moving file in queue * [bug 736] Fixed escaping of menu items +* [bug 1013] Fixed gcc warnings (thanks steven sheehy) +* [bug 1023] Fixed some large stack allocations (thanks steven sheehy) +* [bug 1026] Fixed some potential buffer overflows (thanks steven sheehy) +* [bug 1027] Improved unix socket support (thanks steven sheehy) +* [bug 1028] Improved big endian support (thanks steven sheehy) +* [bug 1029] Fixed BSD compile issue (thanks steven sheehy) +* [bug 1031] Fixed a crash after closing hub window (thanks bigmuscle/pothead) +* [bug 1032] Fixed certificates help (thanks pothead) -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/AdcCommand.h =================================================================== --- dcplusplus/trunk/client/AdcCommand.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/AdcCommand.h 2006-08-31 07:46:12 UTC (rev 643) @@ -79,7 +79,11 @@ static const char TYPE_HUB = 'H'; static const char TYPE_UDP = 'U'; +#if defined(_WIN32) || defined(__i386__) || defined(__x86_64__) || defined(__alpha) #define C(n, a, b, c) static const u_int32_t CMD_##n = (((u_int32_t)a) | (((u_int32_t)b)<<8) | (((u_int32_t)c)<<16)); typedef Type<CMD_##n> n +#else +#define C(n, a, b, c) static const u_int32_t CMD_##n = ((((u_int32_t)a)<<24) | (((u_int32_t)b)<<16) | (((u_int32_t)c)<<8)); typedef Type<CMD_##n> n +#endif // Base commands C(SUP, 'S','U','P'); C(STA, 'S','T','A'); Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -33,8 +33,8 @@ #define POLL_TIMEOUT 250 BufferedSocket::BufferedSocket(char aSeparator) throw() : -separator(aSeparator), mode(MODE_LINE), -dataBytes(0), rollback(0), failed(false), sock(0), disconnecting(false), filterIn(NULL) +separator(aSeparator), mode(MODE_LINE), filterIn(NULL), +dataBytes(0), rollback(0), failed(false), sock(0), disconnecting(false) { Thread::safeInc(sockets); } @@ -69,6 +69,8 @@ case MODE_ZPIPE: filterIn = new UnZFilter; break; + case MODE_DATA: + break; } } @@ -423,6 +425,8 @@ break; case SHUTDOWN: return false; + case ACCEPTED: + break; } delete p.second; Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/Client.h 2006-08-31 07:46:12 UTC (rev 643) @@ -34,6 +34,7 @@ class ClientListener { public: + virtual ~ClientListener() { } template<int I> struct X { enum { TYPE = I }; }; typedef X<0> Connecting; @@ -114,7 +115,7 @@ static string getCounts() { char buf[128]; - return string(buf, sprintf(buf, "%ld/%ld/%ld", counts.normal, counts.registered, counts.op)); + return string(buf, snprintf(buf, sizeof(buf), "%ld/%ld/%ld", counts.normal, counts.registered, counts.op)); } StringMap& escapeParams(StringMap& sm) { Modified: dcplusplus/trunk/client/ClientManager.cpp =================================================================== --- dcplusplus/trunk/client/ClientManager.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/ClientManager.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -62,7 +62,7 @@ { Lock l(cs); - clients.erase(remove(clients.begin(), clients.end(), aClient), clients.end()); + clients.remove(aClient); } delete aClient; } Modified: dcplusplus/trunk/client/DCPlusPlus.h =================================================================== --- dcplusplus/trunk/client/DCPlusPlus.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/DCPlusPlus.h 2006-08-31 07:46:12 UTC (rev 643) @@ -41,6 +41,10 @@ va_end(args); } +#ifdef _WIN32 +#define snprintf _snprintf +#endif + #define dcdebug debugTrace #ifdef _WIN32 #define dcassert(exp) \ Modified: dcplusplus/trunk/client/DirectoryListing.cpp =================================================================== --- dcplusplus/trunk/client/DirectoryListing.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/DirectoryListing.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -95,7 +95,7 @@ ::File ff(name, ::File::READ, ::File::OPEN); FilteredInputStream<UnBZFilter, false> f(&ff); const size_t BUF_SIZE = 64*1024; - char buf[BUF_SIZE]; + AutoArray<char> buf(BUF_SIZE); size_t len; size_t bytesRead = 0; for(;;) { @@ -110,7 +110,7 @@ } } else if(Util::stricmp(ext, ".xml") == 0) { int64_t sz = ::File::getSize(name); - if(sz == -1 || sz >= txt.max_size()) + if(sz == -1 || sz >= static_cast<int64_t>(txt.max_size())) throw(FileException(CSTRING(FILE_NOT_AVAILABLE))); txt.resize((size_t) sz); size_t n = txt.length(); Modified: dcplusplus/trunk/client/DownloadManager.cpp =================================================================== --- dcplusplus/trunk/client/DownloadManager.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/DownloadManager.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -117,7 +117,7 @@ bytesDownloaded / timeElapsed * 1000 < (u_int32_t)SETTING(AUTODROP_SPEED) : false; bool onlineSourcesOk = (*i)->isSet(Download::FLAG_USER_LIST) ? true : QueueManager::getInstance()->countOnlineSources((*i)->getTarget()) >= SETTING(AUTODROP_MINSOURCES); - bool filesizeOk = !((*i)->isSet(Download::FLAG_USER_LIST)) && (*i)->getSize() >= ((size_t)SETTING(AUTODROP_FILESIZE)) * 1024; + bool filesizeOk = !((*i)->isSet(Download::FLAG_USER_LIST)) && (*i)->getSize() >= ((int64_t)SETTING(AUTODROP_FILESIZE)) * 1024; bool dropIt = ((*i)->isSet(Download::FLAG_USER_LIST) && BOOLSETTING(AUTODROP_FILELISTS)) || (filesizeOk && BOOLSETTING(AUTODROP_ALL)); if(speedTooLow && onlineSourcesOk && dropIt) { Modified: dcplusplus/trunk/client/FilteredFile.h =================================================================== --- dcplusplus/trunk/client/FilteredFile.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/FilteredFile.h 2006-08-31 07:46:12 UTC (rev 643) @@ -24,6 +24,7 @@ #endif // _MSC_VER > 1000 #include "Streams.h" +#include "Util.h" template<class Filter, bool managed> class CalcOutputStream : public OutputStream { @@ -72,7 +73,7 @@ public: using OutputStream::write; - FilteredOutputStream(OutputStream* aFile) : f(aFile), flushed(false) { } + FilteredOutputStream(OutputStream* aFile) : f(aFile), buf(BUF_SIZE), flushed(false) { } ~FilteredOutputStream() throw() { if(manage) delete f; } size_t flush() throw(Exception) { @@ -123,19 +124,19 @@ } private: - enum { BUF_SIZE = 64*1024 }; + static const size_t BUF_SIZE = 64*1024; OutputStream* f; Filter filter; - u_int8_t buf[BUF_SIZE]; + AutoArray<u_int8_t> buf; bool flushed; }; template<class Filter, bool managed> class FilteredInputStream : public InputStream { public: - FilteredInputStream(InputStream* aFile) : f(aFile), pos(0), valid(0), more(true) { } + FilteredInputStream(InputStream* aFile) : f(aFile), buf(BUF_SIZE), pos(0), valid(0), more(true) { } virtual ~FilteredInputStream() throw() { if(managed) delete f; } /** @@ -173,11 +174,11 @@ } private: - enum { BUF_SIZE = 64*1024 }; + static const size_t BUF_SIZE = 64*1024; InputStream* f; Filter filter; - u_int8_t buf[BUF_SIZE]; + AutoArray<u_int8_t> buf; size_t pos; size_t valid; bool more; Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -800,13 +800,16 @@ tmp[i] = '$'; } int chars = 0; + size_t BUF_SIZE; if(ClientManager::getInstance()->isActive()) { string x = ClientManager::getInstance()->getCachedIp(); - buf = new char[x.length() + aString.length() + 64]; - chars = sprintf(buf, "$Search %s:%d %c?%c?%s?%d?%s|", x.c_str(), (int)SearchManager::getInstance()->getPort(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str()); + BUF_SIZE = x.length() + aString.length() + 64; + buf = new char[BUF_SIZE]; + chars = snprintf(buf, BUF_SIZE, "$Search %s:%d %c?%c?%s?%d?%s|", x.c_str(), (int)SearchManager::getInstance()->getPort(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str()); } else { - buf = new char[getMyNick().length() + aString.length() + 64]; - chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", toAcp(getMyNick()).c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str()); + BUF_SIZE = getMyNick().length() + aString.length() + 64; + buf = new char[BUF_SIZE]; + chars = snprintf(buf, BUF_SIZE, "$Search Hub:%s %c?%c?%s?%d?%s|", toAcp(getMyNick()).c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str()); } send(buf, chars); } Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -939,8 +939,9 @@ } } if(flags & QueueItem::FLAG_MATCH_QUEUE) { - AutoArray<char> tmp(STRING(MATCHED_FILES).size() + 16); - sprintf(tmp, CSTRING(MATCHED_FILES), matchListing(dirList)); + const size_t BUF_SIZE = STRING(MATCHED_FILES).size() + 16; + AutoArray<char> tmp(BUF_SIZE); + snprintf(tmp, BUF_SIZE, CSTRING(MATCHED_FILES), matchListing(dirList)); LogManager::getInstance()->message(Util::toString(ClientManager::getInstance()->getNicks(user->getCID())) + ": " + string(tmp)); } } Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -339,7 +339,7 @@ ::File ff(Util::getConfigPath() + "files.xml.bz2", ::File::READ, ::File::OPEN); FilteredInputStream<UnBZFilter, false> f(&ff); const size_t BUF_SIZE = 64*1024; - char buf[BUF_SIZE]; + AutoArray<char> buf(BUF_SIZE); size_t len; for(;;) { size_t n = BUF_SIZE; Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/Socket.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -52,7 +52,7 @@ if(msg.empty()) { char tmp[64]; - sprintf(tmp, CSTRING(UNKNOWN_ERROR), aError); + snprintf(tmp, sizeof(tmp), CSTRING(UNKNOWN_ERROR), aError); msg = tmp; } return msg; Modified: dcplusplus/trunk/client/Socket.h =================================================================== --- dcplusplus/trunk/client/Socket.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/Socket.h 2006-08-31 07:46:12 UTC (rev 643) @@ -236,7 +236,7 @@ static int check(int ret, bool blockOk = false) { if(ret == -1) { int error = getLastError(); - if(blockOk && (error == EWOULDBLOCK || error == ENOBUFS || error == EINPROGRESS) ) { + if(blockOk && (error == EWOULDBLOCK || error == ENOBUFS || error == EINPROGRESS || error == EAGAIN) ) { return -1; } else { throw SocketException(error); Modified: dcplusplus/trunk/client/Util.cpp =================================================================== --- dcplusplus/trunk/client/Util.cpp 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/Util.cpp 2006-08-31 07:46:12 UTC (rev 643) @@ -338,17 +338,17 @@ string Util::formatBytes(int64_t aBytes) { char buf[64]; if(aBytes < 1024) { - sprintf(buf, "%d %s", (int)(aBytes&0xffffffff), CSTRING(B)); + snprintf(buf, sizeof(buf), "%d %s", (int)(aBytes&0xffffffff), CSTRING(B)); } else if(aBytes < 1024*1024) { - sprintf(buf, "%.02f %s", (double)aBytes/(1024.0), CSTRING(KiB)); + snprintf(buf, sizeof(buf), "%.02f %s", (double)aBytes/(1024.0), CSTRING(KiB)); } else if(aBytes < 1024*1024*1024) { - sprintf(buf, "%.02f %s", (double)aBytes/(1024.0*1024.0), CSTRING(MiB)); + snprintf(buf, sizeof(buf), "%.02f %s", (double)aBytes/(1024.0*1024.0), CSTRING(MiB)); } else if(aBytes < (int64_t)1024*1024*1024*1024) { - sprintf(buf, "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0), CSTRING(GiB)); + snprintf(buf, sizeof(buf), "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0), CSTRING(GiB)); } else if(aBytes < (int64_t)1024*1024*1024*1024*1024) { - sprintf(buf, "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0*1024.0), CSTRING(TiB)); + snprintf(buf, sizeof(buf), "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0*1024.0), CSTRING(TiB)); } else { - sprintf(buf, "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0*1024.0*1024.0), CSTRING(PIB)); + snprintf(buf, sizeof(buf), "%.02f %s", (double)aBytes/(1024.0*1024.0*1024.0*1024.0*1024.0), CSTRING(PIB)); } return buf; @@ -380,9 +380,8 @@ return Text::fromT(buf); #else char buf[64]; - sprintf(buf, "%'lld", aBytes); - sprintf(buf, "%s %s", buf, CSTRING(B)); - return buf; + snprintf(buf, sizeof(buf), "%'lld", aBytes); + return string(buf) + STRING(B); #endif } Modified: dcplusplus/trunk/client/Util.h =================================================================== --- dcplusplus/trunk/client/Util.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/Util.h 2006-08-31 07:46:12 UTC (rev 643) @@ -326,7 +326,7 @@ static string formatSeconds(int64_t aSec) { char buf[64]; - sprintf(buf, "%01lu:%02d:%02d", (unsigned long)(aSec / (60*60)), (int)((aSec / 60) % 60), (int)(aSec % 60)); + snprintf(buf, sizeof(buf), "%01lu:%02d:%02d", (unsigned long)(aSec / (60*60)), (int)((aSec / 60) % 60), (int)(aSec % 60)); return buf; } @@ -369,55 +369,55 @@ static string toString(short val) { char buf[8]; - sprintf(buf, "%d", (int)val); + snprintf(buf, sizeof(buf), "%d", (int)val); return buf; } static string toString(unsigned short val) { char buf[8]; - sprintf(buf, "%u", (unsigned int)val); + snprintf(buf, sizeof(buf), "%u", (unsigned int)val); return buf; } static string toString(int val) { char buf[16]; - sprintf(buf, "%d", val); + snprintf(buf, sizeof(buf), "%d", val); return buf; } static string toString(unsigned int val) { char buf[16]; - sprintf(buf, "%u", val); + snprintf(buf, sizeof(buf), "%u", val); return buf; } static string toString(long val) { char buf[32]; - sprintf(buf, "%ld", val); + snprintf(buf, sizeof(buf), "%ld", val); return buf; } static string toString(unsigned long val) { char buf[32]; - sprintf(buf, "%lu", val); + snprintf(buf, sizeof(buf), "%lu", val); return buf; } static string toString(long long val) { char buf[32]; #ifdef _MSC_VER - sprintf(buf, "%I64d", val); + snprintf(buf, sizeof(buf), "%I64d", val); #else - sprintf(buf, "%lld", val); + snprintf(buf, sizeof(buf), "%lld", val); #endif return buf; } static string toString(unsigned long long val) { char buf[32]; #ifdef _MSC_VER - sprintf(buf, "%I64u", val); + snprintf(buf, sizeof(buf), "%I64u", val); #else - sprintf(buf, "%llu", val); + snprintf(buf, sizeof(buf), "%llu", val); #endif return buf; } static string toString(double val) { char buf[16]; - sprintf(buf, "%0.2f", val); + snprintf(buf, sizeof(buf), "%0.2f", val); return buf; } @@ -437,7 +437,7 @@ static string toHexEscape(char val) { char buf[sizeof(int)*2+1+1]; - sprintf(buf, "%%%X", val&0x0FF); + snprintf(buf, sizeof(buf), "%%%X", val&0x0FF); return buf; } static char fromHexEscape(const string aString) { Modified: dcplusplus/trunk/client/stdinc.h =================================================================== --- dcplusplus/trunk/client/stdinc.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/client/stdinc.h 2006-08-31 07:46:12 UTC (rev 643) @@ -47,6 +47,7 @@ #else #include <unistd.h> +#include <stdint.h> #endif #include <stdio.h> Modified: dcplusplus/trunk/windows/AboutDlg.h =================================================================== --- dcplusplus/trunk/windows/AboutDlg.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/windows/AboutDlg.h 2006-08-31 07:46:12 UTC (rev 643) @@ -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, bart vullings, steven, ") +_T("krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin, jove, bart vullings, ") _T("steven sheehy, tobias nygren. ") _T("Keep it coming!"); Modified: dcplusplus/trunk/windows/FlatTabCtrl.h =================================================================== --- dcplusplus/trunk/windows/FlatTabCtrl.h 2006-07-23 12:21:17 UTC (rev 642) +++ dcplusplus/trunk/windows/FlatTabCtrl.h 2006-08-31 07:46:12 UTC (rev 643) @@ -82,8 +82,7 @@ active = NULL; delete ti; tabs.erase(i); - dcassert(find(viewOrder.begin(), viewOrder.end(), aWnd) != viewOrder.end()); - viewOrder.erase(remove(viewOrder.begin(), viewOrder.end(), aWnd), viewOrder.end()); + viewOrder.remove(aWnd); nextTab = viewOrder.end(); if(!viewOrder.empty()) --nextTab; @@ -136,8 +135,7 @@ } void setTop(HWND aWnd) { - dcassert(find(viewOrder.begin(), viewOrder.end(), aWnd) != viewOrder.end()); - viewOrder.erase(remove(viewOrder.begin(), viewOrder.end(), aWnd), viewOrder.end()); + viewOrder.remove(aWnd); viewOrder.push_back(aWnd); nextTab = --viewOrder.end(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-23 12:21:26
|
Revision: 642 Author: arnetheduck Date: 2006-07-23 05:21:17 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=642&view=rev Log Message: ----------- wait fix Modified Paths: -------------- dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/Socket.cpp Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-23 09:31:25 UTC (rev 641) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-23 12:21:17 UTC (rev 642) @@ -264,7 +264,7 @@ int ConnectionManager::Server::run() throw() { try { while(!die) { - if(sock.wait(POLL_TIMEOUT, Socket::WAIT_CONNECT) == Socket::WAIT_CONNECT) { + if(sock.wait(POLL_TIMEOUT, Socket::WAIT_READ) == Socket::WAIT_READ) { ConnectionManager::getInstance()->accept(sock, secure); } } Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-07-23 09:31:25 UTC (rev 641) +++ dcplusplus/trunk/client/Socket.cpp 2006-07-23 12:21:17 UTC (rev 642) @@ -437,14 +437,14 @@ if(waitFor & WAIT_CONNECT) { dcassert(!(waitFor & WAIT_READ) && !(waitFor & WAIT_WRITE)); - FD_ZERO(&rfd); + FD_ZERO(&wfd); FD_ZERO(&efd); - FD_SET(sock, &rfd); + FD_SET(sock, &wfd); FD_SET(sock, &efd); - check(select((int)(sock+1), &rfd, 0, &efd, &tv)); + check(select((int)(sock+1), 0, &wfd, &efd, &tv)); - if(FD_ISSET(sock, &rfd)) { + if(FD_ISSET(sock, &wfd)) { return WAIT_CONNECT; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-23 09:31:48
|
Revision: 641 Author: arnetheduck Date: 2006-07-23 02:31:25 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=641&view=rev Log Message: ----------- Bug fixes Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/HashManager.cpp dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/SSLSocket.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/SettingsManager.h dcplusplus/trunk/client/Socket.cpp dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/windows/QueueFrame.cpp dcplusplus/trunk/windows/WinUtil.h Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/Example.xml 2006-07-23 09:31:25 UTC (rev 641) @@ -203,6 +203,7 @@ <String Name="LastHub">Hub (last seen on if offline)</String> <String Name="LastSeen">Time last seen</String> <String Name="Left">left</String> + <String Name="ListenerFailed">Listening socket failed (you need to restart DC++): </String> <String Name="Loading">Loading DC++, please wait...</String> <String Name="LookupAtBitzi">Lookup TTH at Bitzi.com</String> <String Name="Low">Low</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/changelog.txt 2006-07-23 09:31:25 UTC (rev 641) @@ -6,6 +6,7 @@ * [NMDC] Fixed extra space in chat * [bug 395] Fixed password being blanked * [bug 419] Allowed changing case only when moving file in queue +* [bug 736] Fixed escaping of menu items -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -262,10 +262,14 @@ static const u_int32_t POLL_TIMEOUT = 250; int ConnectionManager::Server::run() throw() { - while(!die) { - if(sock.wait(POLL_TIMEOUT, Socket::WAIT_READ) == Socket::WAIT_READ) { - ConnectionManager::getInstance()->accept(sock, secure); + try { + while(!die) { + if(sock.wait(POLL_TIMEOUT, Socket::WAIT_CONNECT) == Socket::WAIT_CONNECT) { + ConnectionManager::getInstance()->accept(sock, secure); + } } + } catch(const Exception& e) { + LogManager::getInstance()->message(STRING(LISTENER_FAILED) + e.getError()); } return 0; } @@ -299,10 +303,6 @@ uc->setLastActivity(GET_TICK()); try { uc->accept(sock); - if(uc->isSecure() && !uc->isTrusted() && !BOOLSETTING(ALLOW_UNTRUSTED_CLIENTS)) { - putConnection(uc); - LogManager::getInstance()->message(STRING(CERTIFICATE_NOT_TRUSTED)); - } } catch(const Exception&) { putConnection(uc); delete uc; Modified: dcplusplus/trunk/client/HashManager.cpp =================================================================== --- dcplusplus/trunk/client/HashManager.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/HashManager.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -614,7 +614,7 @@ #ifdef _WIN32 TigerTree fastTTH(bs); tth = &fastTTH; - if(!virtualBuf || !fastHash(fname, buf, fastTTH, size, xcrc32)) { + if(!virtualBuf || !BOOLSETTING(FAST_HASH) || !fastHash(fname, buf, fastTTH, size, xcrc32)) { tth = &slowTTH; crc32 = CRC32Filter(); #endif Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -677,7 +677,6 @@ OnlineUser* replyTo = findUser(rtNick); OnlineUser* from = findUser(fromNick); - OnlineUser& to = getUser(getMyNick()); string msg = param.substr(j + 2); if(replyTo == NULL || from == NULL) { @@ -701,6 +700,7 @@ from = findUser(fromNick); } + OnlineUser& to = getUser(getMyNick()); fire(ClientListener::PrivateMessage(), this, *from, to, *replyTo, unescape(msg)); } else if(cmd == "$GetPass") { OnlineUser& ou = getUser(getMyNick()); Modified: dcplusplus/trunk/client/SSLSocket.cpp =================================================================== --- dcplusplus/trunk/client/SSLSocket.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/SSLSocket.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -25,7 +25,6 @@ #include <openssl/ssl.h> - SSLSocket::SSLSocket(SSL_CTX* context) throw(SocketException) : ctx(context), ssl(0) { } Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -75,7 +75,7 @@ "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", "UseTLS", "AutoSearchLimit", "AltSortOrder", "AutoKickNoFavs", "PromptPassword", "SpyFrameIgnoreTthSearches", "DontDlAlreadyQueued", "MaxCommandLength", "AllowUntrustedHubs", "AllowUntrustedClients", - "TLSPort", + "TLSPort", "FastHash", "SENTRY", // Int64 "TotalUpload", "TotalDownload", @@ -269,6 +269,7 @@ setDefault(MAX_COMMAND_LENGTH, 16*1024*1024); setDefault(ALLOW_UNTRUSTED_HUBS, true); setDefault(ALLOW_UNTRUSTED_CLIENTS, true); + setDefault(FAST_HASH, true); #ifdef _WIN32 setDefault(MAIN_WINDOW_STATE, SW_SHOWNORMAL); Modified: dcplusplus/trunk/client/SettingsManager.h =================================================================== --- dcplusplus/trunk/client/SettingsManager.h 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/SettingsManager.h 2006-07-23 09:31:25 UTC (rev 641) @@ -91,7 +91,7 @@ OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, USE_TLS, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, SPY_FRAME_IGNORE_TTH_SEARCHES, DONT_DL_ALREADY_QUEUED, MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS, - TLS_PORT, + TLS_PORT, FAST_HASH, INT_LAST }; enum Int64Setting { INT64_FIRST = INT_LAST + 1, Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/Socket.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -437,14 +437,18 @@ if(waitFor & WAIT_CONNECT) { dcassert(!(waitFor & WAIT_READ) && !(waitFor & WAIT_WRITE)); - FD_ZERO(&wfd); + FD_ZERO(&rfd); FD_ZERO(&efd); - FD_SET(sock, &wfd); + FD_SET(sock, &rfd); FD_SET(sock, &efd); - check(select((int)(sock+1), NULL, &wfd, &efd, &tv)); + check(select((int)(sock+1), &rfd, 0, &efd, &tv)); - if(FD_ISSET(sock, &wfd) || FD_ISSET(sock, &efd)) { + if(FD_ISSET(sock, &rfd)) { + return WAIT_CONNECT; + } + + if(FD_ISSET(sock, &efd)) { int y = 0; socklen_t z = sizeof(y); check(getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*)&y, &z)); Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -204,6 +204,7 @@ "Hub (last seen on if offline)", "Time last seen", "left", +"Listening socket failed (you need to restart DC++): ", "Loading DC++, please wait...", "Lookup TTH at Bitzi.com", "Low", @@ -828,6 +829,7 @@ "LastHub", "LastSeen", "Left", +"ListenerFailed", "Loading", "LookupAtBitzi", "Low", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/client/StringDefs.h 2006-07-23 09:31:25 UTC (rev 641) @@ -207,6 +207,7 @@ LAST_HUB, // "Hub (last seen on if offline)" LAST_SEEN, // "Time last seen" LEFT, // "left" + LISTENER_FAILED, // "Listening socket failed (you need to restart DC++): " LOADING, // "Loading DC++, please wait..." LOOKUP_AT_BITZI, // "Lookup TTH at Bitzi.com" LOW, // "Low" Modified: dcplusplus/trunk/windows/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/windows/QueueFrame.cpp 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/windows/QueueFrame.cpp 2006-07-23 09:31:25 UTC (rev 641) @@ -775,7 +775,7 @@ int pmItems = 0; QueueItemInfo::SourceIter i; for(i = ii->getSources().begin(); i != ii->getSources().end(); ++i) { - tstring nick = WinUtil::getNicks(i->getUser()); + tstring nick = WinUtil::escapeMenu(WinUtil::getNicks(i->getUser())); mi.fMask = MIIM_ID | MIIM_TYPE | MIIM_DATA; mi.fType = MFT_STRING; mi.dwTypeData = (LPTSTR)nick.c_str(); Modified: dcplusplus/trunk/windows/WinUtil.h =================================================================== --- dcplusplus/trunk/windows/WinUtil.h 2006-07-12 20:12:22 UTC (rev 640) +++ dcplusplus/trunk/windows/WinUtil.h 2006-07-23 09:31:25 UTC (rev 641) @@ -341,6 +341,14 @@ static bool isAlt() { return (GetKeyState(VK_MENU) & 0x8000) > 0; } static bool isCtrl() { return (GetKeyState(VK_CONTROL) & 0x8000) > 0; } + static tstring escapeMenu(tstring str) { + string::size_type i = 0; + while( (i = str.find(_T('&'), i)) != string::npos) { + str.insert(str.begin()+i, 1, _T('&')); + i += 2; + } + return str; + } template<class T> static HWND hiddenCreateEx(T& p) throw() { HWND active = (HWND)::SendMessage(mdiClient, WM_MDIGETACTIVE, 0, 0); ::LockWindowUpdate(mdiClient); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-12 20:13:19
|
Revision: 640 Author: arnetheduck Date: 2006-07-12 13:12:22 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=640&view=rev Log Message: ----------- badpassword, move file Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/AdcHub.cpp dcplusplus/trunk/client/Client.cpp dcplusplus/trunk/client/Client.h dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/changelog.txt 2006-07-12 20:12:22 UTC (rev 640) @@ -4,6 +4,8 @@ * [bug 125] Fixed out-of-order PM/quit * [bug 224] Slots are no longer granted to disconnected users, instead disconnection is delayed a minute * [NMDC] Fixed extra space in chat +* [bug 395] Fixed password being blanked +* [bug 419] Allowed changing case only when moving file in queue -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/AdcHub.cpp =================================================================== --- dcplusplus/trunk/client/AdcHub.cpp 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/client/AdcHub.cpp 2006-07-12 20:12:22 UTC (rev 640) @@ -343,6 +343,12 @@ if(!u) return; + int severity = Util::toInt(c.getParam(0).substr(0, 1)); + int code = Util::toInt(c.getParam(0).substr(1)); + + if(code == AdcCommand::ERROR_BAD_PASSWORD) { + setPassword(Util::emptyString); + } // @todo Check for invalid protocol and unset TLS if necessary fire(ClientListener::Message(), this, *u, c.getParam(1)); } Modified: dcplusplus/trunk/client/Client.cpp =================================================================== --- dcplusplus/trunk/client/Client.cpp 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/client/Client.cpp 2006-07-12 20:12:22 UTC (rev 640) @@ -73,7 +73,8 @@ } else { setCurrentDescription(SETTING(DESCRIPTION)); } - setPassword(hub->getPassword()); + if(!hub->getPassword().empty()) + setPassword(hub->getPassword()); } else { if(updateNick) { setCurrentNick(checkNick(SETTING(NICK))); Modified: dcplusplus/trunk/client/Client.h =================================================================== --- dcplusplus/trunk/client/Client.h 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/client/Client.h 2006-07-12 20:12:22 UTC (rev 640) @@ -38,7 +38,6 @@ typedef X<0> Connecting; typedef X<1> Connected; - typedef X<2> BadPassword; typedef X<3> UserUpdated; typedef X<4> UsersUpdated; typedef X<5> UserRemoved; @@ -58,7 +57,6 @@ virtual void on(Connecting, Client*) throw() { } virtual void on(Connected, Client*) throw() { } - virtual void on(BadPassword, Client*) throw() { } virtual void on(UserUpdated, Client*, const OnlineUser&) throw() { } virtual void on(UsersUpdated, Client*, const OnlineUser::List&) throw() { } virtual void on(UserRemoved, Client*, const OnlineUser&) throw() { } Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 20:12:22 UTC (rev 640) @@ -708,7 +708,7 @@ setMyIdentity(ou.getIdentity()); fire(ClientListener::GetPassword(), this); } else if(cmd == "$BadPass") { - fire(ClientListener::BadPassword(), this); + setPassword(Util::emptyString); } else if(cmd == "$ZOn") { socket->setMode(BufferedSocket::MODE_ZPIPE); } else { Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-07-12 20:12:22 UTC (rev 640) @@ -699,7 +699,7 @@ void QueueManager::move(const string& aSource, const string& aTarget) throw() { string target = Util::validateFileName(aTarget); - if(Util::stricmp(aSource, target) == 0) + if(aSource == target) return; bool delSource = false; @@ -717,7 +717,7 @@ // Let's see if the target exists...then things get complicated... QueueItem* qt = fileQueue.find(target); - if(qt == NULL) { + if(qt == NULL || Util::stricmp(aSource, target) == 0) { // Good, update the target and move in the queue... fileQueue.move(qs, target); fire(QueueManagerListener::Moved(), qs); Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-07-12 20:12:22 UTC (rev 640) @@ -1221,9 +1221,6 @@ void HubFrame::on(Connected, Client*) throw() { speak(CONNECTED); } -void HubFrame::on(BadPassword, Client*) throw() { - client->setPassword(Util::emptyString); -} void HubFrame::on(UserUpdated, Client*, const OnlineUser& user) throw() { speak(UPDATE_USER_JOIN, user); } Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-07-12 11:34:22 UTC (rev 639) +++ dcplusplus/trunk/windows/HubFrame.h 2006-07-12 20:12:22 UTC (rev 640) @@ -391,7 +391,6 @@ // ClientListener virtual void on(Connecting, Client*) throw(); virtual void on(Connected, Client*) throw(); - virtual void on(BadPassword, Client*) throw(); virtual void on(UserUpdated, Client*, const OnlineUser&) throw(); virtual void on(UsersUpdated, Client*, const OnlineUser::List&) throw(); virtual void on(UserRemoved, Client*, const OnlineUser&) throw(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-12 11:34:41
|
Revision: 639 Author: arnetheduck Date: 2006-07-12 04:34:22 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=639&view=rev Log Message: ----------- space fix Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/NmdcHub.cpp Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-12 10:19:01 UTC (rev 638) +++ dcplusplus/trunk/changelog.txt 2006-07-12 11:34:22 UTC (rev 639) @@ -3,6 +3,7 @@ without connection type * [bug 125] Fixed out-of-order PM/quit * [bug 224] Slots are no longer granted to disconnected users, instead disconnection is delayed a minute +* [NMDC] Fixed extra space in chat -- 0.694 2006-07-10 -- * Fixed crash in certificates page Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 10:19:01 UTC (rev 638) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 11:34:22 UTC (rev 639) @@ -202,9 +202,11 @@ return; } string nick = line.substr(1, i-1); + string message = line.substr(i+2); + OnlineUser* ou = findUser(nick); if(ou) { - fire(ClientListener::Message(), this, *ou, unescape(line.substr(i+1))); + fire(ClientListener::Message(), this, *ou, unescape(message)); } else { OnlineUser& o = getUser(nick); // Assume that messages from unknown users come from the hub @@ -212,7 +214,7 @@ o.getIdentity().setHidden(true); fire(ClientListener::UserUpdated(), this, o); - fire(ClientListener::Message(), this, o, unescape(line.substr(i+1))); + fire(ClientListener::Message(), this, o, unescape(message)); } return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-12 10:19:44
|
Revision: 638 Author: arnetheduck Date: 2006-07-12 03:19:01 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=638&view=rev Log Message: ----------- PM fixes, autodisconnect fixes Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/NmdcHub.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/SettingsManager.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/UploadManager.cpp dcplusplus/trunk/client/UploadManager.h dcplusplus/trunk/client/User.h dcplusplus/trunk/help/changelog.html dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h dcplusplus/trunk/windows/WindowsPage.cpp Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/Example.xml 2006-07-12 10:19:01 UTC (rev 638) @@ -438,7 +438,8 @@ <String Name="SettingsGeneral">Personal information</String> <String Name="SettingsGetUserCountry">Guess user country from IP</String> <String Name="SettingsHubUserCommands">Accept custom user commands from hub</String> - <String Name="SettingsIgnoreOffline">Ignore private messages from offline users</String> + <String Name="SettingsIgnoreHubPms">Ignore private messages from the hub</String> + <String Name="SettingsIgnoreBotPms">Ignore private messages from bots</String> <String Name="SettingsIncoming">Incoming connection settings (see Help/FAQ if unsure)</String> <String Name="SettingsKeepLists">Don't delete file lists when exiting</String> <String Name="SettingsLanguageFile">Language file</String> @@ -475,7 +476,8 @@ <String Name="SettingsPmHistory">PM history</String> <String Name="SettingsPopunderFilelist">Open new file list windows in the background</String> <String Name="SettingsPopunderPm">Open new private message windows in the background</String> - <String Name="SettingsPopupOffline">Open private messages from offline users in their own window</String> + <String Name="SettingsPopupBotPms">Open private messages from the hub in their own window</String> + <String Name="SettingsPopupHubPms">Open private messages from bots in their own window</String> <String Name="SettingsPopupPms">Open private messages in their own window</String> <String Name="SettingsPorts">Ports</String> <String Name="SettingsPromptPassword">Popup box to input password for hubs</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/changelog.txt 2006-07-12 10:19:01 UTC (rev 638) @@ -1,4 +1,10 @@ --- 0.694 2006-07-10 -- +-- -- +* PM popup/ignore options updated, in nmdc a hub is any nick which hasn't sent a hello or myinfo, and a bot is a nick with myinfo + without connection type +* [bug 125] Fixed out-of-order PM/quit +* [bug 224] Slots are no longer granted to disconnected users, instead disconnection is delayed a minute + +-- 0.694 2006-07-10 -- * Fixed crash in certificates page * [bug 1005] Fixed linux compile issue (thanks tpo) * [bug 1004] Fixed browse file list on self Modified: dcplusplus/trunk/client/NmdcHub.cpp =================================================================== --- dcplusplus/trunk/client/NmdcHub.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/NmdcHub.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -206,7 +206,13 @@ if(ou) { fire(ClientListener::Message(), this, *ou, unescape(line.substr(i+1))); } else { - fire(ClientListener::StatusMessage(), this, unescape(line)); + OnlineUser& o = getUser(nick); + // Assume that messages from unknown users come from the hub + o.getIdentity().setHub(true); + o.getIdentity().setHidden(true); + fire(ClientListener::UserUpdated(), this, o); + + fire(ClientListener::Message(), this, o, unescape(line.substr(i+1))); } return; } @@ -354,10 +360,14 @@ if(connection.empty()) { // No connection = bot... u.getUser()->setFlag(User::BOT); + u.getIdentity().setHub(false); } else { u.getUser()->unsetFlag(User::BOT); + u.getIdentity().setBot(false); } + u.getIdentity().setHub(false); + u.getIdentity().setConnection(connection); i = j + 1; j = param.find('$', i); @@ -663,16 +673,33 @@ if(fromNick.empty()) return; - OnlineUser* replyTo = findUser(rtNick); + OnlineUser* replyTo = findUser(rtNick); OnlineUser* from = findUser(fromNick); - OnlineUser* to = findUser(getMyNick()); + OnlineUser& to = getUser(getMyNick()); - if(replyTo == NULL || from == NULL || to == NULL) { - fire(ClientListener::StatusMessage(), this, unescape(param.substr(i))); - } else { - string msg = param.substr(j + 2); - fire(ClientListener::PrivateMessage(), this, *from, *to, *replyTo, unescape(param.substr(j + 2))); - } + string msg = param.substr(j + 2); + if(replyTo == NULL || from == NULL) { + if(replyTo == 0) { + // Assume it's from the hub + replyTo = &getUser(rtNick); + replyTo->getIdentity().setHub(true); + replyTo->getIdentity().setHidden(true); + fire(ClientListener::UserUpdated(), this, *replyTo); + } + if(from == 0) { + // Assume it's from the hub + from = &getUser(rtNick); + from->getIdentity().setHub(true); + from->getIdentity().setHidden(true); + fire(ClientListener::UserUpdated(), this, *from); + } + + // Update pointers just in case they've been invalidated + replyTo = findUser(rtNick); + from = findUser(fromNick); + + } + fire(ClientListener::PrivateMessage(), this, *from, to, *replyTo, unescape(msg)); } else if(cmd == "$GetPass") { OnlineUser& ou = getUser(getMyNick()); ou.getIdentity().set("RG", "1"); Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -49,7 +49,7 @@ // Ints "IncomingConnections", "InPort", "Slots", "Rollback", "AutoFollow", "ClearSearch", "BackgroundColor", "TextColor", "UseOemMonoFont", "ShareHidden", "FilterMessages", "MinimizeToTray", - "AutoSearch", "TimeStamps", "ConfirmExit", "IgnoreOffline", "PopupOffline", + "AutoSearch", "TimeStamps", "ConfirmExit", "PopupHubPms", "PopupBotPms", "IgnoreHubPms", "IgnoreBotPms", "ListDuplicates", "BufferSize", "DownloadSlots", "MaxDownloadSpeed", "LogMainChat", "LogPrivateChat", "LogDownloads", "LogUploads", "StatusInChat", "ShowJoins", "PrivateMessageBeep", "PrivateMessageBeepOpen", "UseSystemIcons", "PopupPMs", "MinUploadSpeed", "GetUserInfo", "UrlHandler", "MainWindowState", @@ -128,8 +128,10 @@ setDefault(AUTO_SEARCH, false); setDefault(TIME_STAMPS, false); setDefault(CONFIRM_EXIT, true); - setDefault(IGNORE_OFFLINE, false); - setDefault(POPUP_OFFLINE, false); + setDefault(POPUP_HUB_PMS, true); + setDefault(POPUP_BOT_PMS, true); + setDefault(IGNORE_HUB_PMS, false); + setDefault(IGNORE_BOT_PMS, false); setDefault(LIST_DUPES, true); setDefault(BUFFER_SIZE, 64); setDefault(HUBLIST_SERVERS, "http://www.hublist.org/PublicHubList.xml.bz2;http://dc.selwerd.nl/hublist.xml.bz2"); Modified: dcplusplus/trunk/client/SettingsManager.h =================================================================== --- dcplusplus/trunk/client/SettingsManager.h 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/SettingsManager.h 2006-07-12 10:19:01 UTC (rev 638) @@ -65,7 +65,7 @@ enum IntSetting { INT_FIRST = STR_LAST + 1, INCOMING_CONNECTIONS = INT_FIRST, TCP_PORT, SLOTS, ROLLBACK, AUTO_FOLLOW, CLEAR_SEARCH, BACKGROUND_COLOR, TEXT_COLOR, USE_OEM_MONOFONT, SHARE_HIDDEN, FILTER_MESSAGES, MINIMIZE_TRAY, - AUTO_SEARCH, TIME_STAMPS, CONFIRM_EXIT, IGNORE_OFFLINE, POPUP_OFFLINE, + AUTO_SEARCH, TIME_STAMPS, CONFIRM_EXIT, POPUP_HUB_PMS, POPUP_BOT_PMS, IGNORE_HUB_PMS, IGNORE_BOT_PMS, LIST_DUPES, BUFFER_SIZE, DOWNLOAD_SLOTS, MAX_DOWNLOAD_SPEED, LOG_MAIN_CHAT, LOG_PRIVATE_CHAT, LOG_DOWNLOADS, LOG_UPLOADS, STATUS_IN_CHAT, SHOW_JOINS, PRIVATE_MESSAGE_BEEP, PRIVATE_MESSAGE_BEEP_OPEN, USE_SYSTEM_ICONS, POPUP_PMS, MIN_UPLOAD_SPEED, GET_USER_INFO, URL_HANDLER, MAIN_WINDOW_STATE, Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -439,7 +439,8 @@ "Personal information", "Guess user country from IP", "Accept custom user commands from hub", -"Ignore private messages from offline users", +"Ignore private messages from the hub", +"Ignore private messages from bots", "Incoming connection settings (see Help/FAQ if unsure)", "Don't delete file lists when exiting", "Language file", @@ -476,7 +477,8 @@ "PM history", "Open new file list windows in the background", "Open new private message windows in the background", -"Open private messages from offline users in their own window", +"Open private messages from the hub in their own window", +"Open private messages from bots in their own window", "Open private messages in their own window", "Ports", "Popup box to input password for hubs", @@ -1061,7 +1063,8 @@ "SettingsGeneral", "SettingsGetUserCountry", "SettingsHubUserCommands", -"SettingsIgnoreOffline", +"SettingsIgnoreHubPms", +"SettingsIgnoreBotPms", "SettingsIncoming", "SettingsKeepLists", "SettingsLanguageFile", @@ -1098,7 +1101,8 @@ "SettingsPmHistory", "SettingsPopunderFilelist", "SettingsPopunderPm", -"SettingsPopupOffline", +"SettingsPopupBotPms", +"SettingsPopupHubPms", "SettingsPopupPms", "SettingsPorts", "SettingsPromptPassword", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/StringDefs.h 2006-07-12 10:19:01 UTC (rev 638) @@ -442,7 +442,8 @@ SETTINGS_GENERAL, // "Personal information" SETTINGS_GET_USER_COUNTRY, // "Guess user country from IP" SETTINGS_HUB_USER_COMMANDS, // "Accept custom user commands from hub" - SETTINGS_IGNORE_OFFLINE, // "Ignore private messages from offline users" + SETTINGS_IGNORE_HUB_PMS, // "Ignore private messages from the hub" + SETTINGS_IGNORE_BOT_PMS, // "Ignore private messages from bots" SETTINGS_INCOMING, // "Incoming connection settings (see Help/FAQ if unsure)" SETTINGS_KEEP_LISTS, // "Don't delete file lists when exiting" SETTINGS_LANGUAGE_FILE, // "Language file" @@ -479,7 +480,8 @@ SETTINGS_PM_HISTORY, // "PM history" SETTINGS_POPUNDER_FILELIST, // "Open new file list windows in the background" SETTINGS_POPUNDER_PM, // "Open new private message windows in the background" - SETTINGS_POPUP_OFFLINE, // "Open private messages from offline users in their own window" + SETTINGS_POPUP_BOT_PMS, // "Open private messages from the hub in their own window" + SETTINGS_POPUP_HUB_PMS, // "Open private messages from bots in their own window" SETTINGS_POPUP_PMS, // "Open private messages in their own window" SETTINGS_PORTS, // "Ports" SETTINGS_PROMPT_PASSWORD, // "Popup box to input password for hubs" Modified: dcplusplus/trunk/client/UploadManager.cpp =================================================================== --- dcplusplus/trunk/client/UploadManager.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/UploadManager.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -406,6 +406,28 @@ } waitingUsers.erase(i, waitingUsers.end()); + + if( BOOLSETTING(AUTO_KICK) ) { + for(Upload::Iter i = uploads.begin(); i != uploads.end(); ++i) { + Upload* u = *i; + if(u->getUser()->isOnline()) { + u->unsetFlag(Upload::FLAG_PENDING_KICK); + continue; + } + + if(u->isSet(Upload::FLAG_PENDING_KICK)) { + u->getUserConnection()->disconnect(true); + LogManager::getInstance()->message(STRING(DISCONNECTED_USER) + Util::toString(ClientManager::getInstance()->getNicks(u->getUser()->getCID()))); + } + + if(BOOLSETTING(AUTO_KICK_NO_FAVS) && FavoriteManager::getInstance()->isFavoriteUser(u->getUser())) { + continue; + } + + u->setFlag(Upload::FLAG_PENDING_KICK); + } + } + } void UploadManager::on(GetListLength, UserConnection* conn) throw() { @@ -490,25 +512,6 @@ } void UploadManager::on(ClientManagerListener::UserDisconnected, const User::Ptr& aUser) throw() { - - /// @todo Don't kick when /me disconnects - if( BOOLSETTING(AUTO_KICK) && !(BOOLSETTING(AUTO_KICK_NO_FAVS) && FavoriteManager::getInstance()->isFavoriteUser(aUser)) ) { - - Lock l(cs); - for(Upload::Iter i = uploads.begin(); i != uploads.end(); ++i) { - Upload* u = *i; - if(u->getUser() == aUser) { - // Oops...adios... - u->getUserConnection()->disconnect(true); - // But let's grant him/her a free slot just in case... - if (!u->getUserConnection()->isSet(UserConnection::FLAG_HASEXTRASLOT)) - reserveSlot(aUser); - LogManager::getInstance()->message(STRING(DISCONNECTED_USER) + Util::toString(ClientManager::getInstance()->getNicks(aUser->getCID()))); - } - } - } - - //Remove references to them. if(!aUser->isOnline()) { clearUserFiles(aUser); } Modified: dcplusplus/trunk/client/UploadManager.h =================================================================== --- dcplusplus/trunk/client/UploadManager.h 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/UploadManager.h 2006-07-12 10:19:01 UTC (rev 638) @@ -37,7 +37,8 @@ FLAG_USER_LIST = 0x01, FLAG_TTH_LEAVES = 0x02, FLAG_ZUPLOAD = 0x04, - FLAG_PARTIAL_LIST = 0x08 + FLAG_PARTIAL_LIST = 0x08, + FLAG_PENDING_KICK = 0x10 }; typedef Upload* Ptr; @@ -175,8 +176,8 @@ virtual void on(ClientManagerListener::UserDisconnected, const User::Ptr& aUser) throw(); // TimerManagerListener - virtual void on(TimerManagerListener::Second, u_int32_t aTick) throw(); - virtual void on(TimerManagerListener::Minute, u_int32_t aTick) throw(); + virtual void on(Second, u_int32_t aTick) throw(); + virtual void on(Minute, u_int32_t aTick) throw(); // UserConnectionListener virtual void on(BytesSent, UserConnection*, size_t, size_t) throw(); Modified: dcplusplus/trunk/client/User.h =================================================================== --- dcplusplus/trunk/client/User.h 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/client/User.h 2006-07-12 10:19:01 UTC (rev 638) @@ -38,7 +38,6 @@ PASSIVE_BIT, NMDC_BIT, BOT_BIT, - HUB_BIT, TTH_GET_BIT, SAVE_NICK_BIT, TLS_BIT @@ -51,7 +50,6 @@ PASSIVE = 1<<PASSIVE_BIT, NMDC = 1<<NMDC_BIT, BOT = 1<<BOT_BIT, - HUB = 1<<HUB_BIT, TTH_GET = 1<<TTH_GET_BIT, //< User supports getting files by tth -> don't have path in queue... SAVE_NICK = 1<<SAVE_NICK_BIT, //< Save cid->nick association TLS = 1<<TLS_BIT //< Client supports SSL @@ -114,6 +112,9 @@ int64_t getBytesShared() const { return Util::toInt64(get("SS")); } void setOp(bool op) { set("OP", op ? "1" : Util::emptyString); } + void setHub(bool hub) { set("HU", hub ? "1" : Util::emptyString); } + void setBot(bool bot) { set("BO", bot ? "1" : Util::emptyString); } + void setHidden(bool hidden) { set("HI", hidden ? "1" : Util::emptyString); } string getTag() const { if(!get("TA").empty()) Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/help/changelog.html 2006-07-12 10:19:01 UTC (rev 638) @@ -13,6 +13,14 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.694 <span style="color: gray;">(2006-07-10)</span></h2> +<ul> + <li>Fixed crash in certificates page</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1005">[bug 1005]</a> Fixed linux compile issue (thanks tpo)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1004">[bug 1004]</a> Fixed browse file list on self</li> + <li>Both .crt and .pem files are read as trusted certificates</li> +</ul> + <h2>0.693 <span style="color: gray;">(2006-07-09)</span></h2> <ul> <li>Fixed crash bug</li> Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -539,20 +539,28 @@ } } else if(task->speaker == PRIVATE_MESSAGE) { PMTask& pm = *static_cast<PMTask*>(task); - if(pm.replyTo->isOnline()) { - if(BOOLSETTING(POPUP_PMS) || PrivateFrame::isOpen(pm.replyTo)) { + if(pm.hub) { + if(BOOLSETTING(IGNORE_HUB_PMS)) { + addClientLine(TSTRING(IGNORED_MESSAGE) + pm.msg, false); + } else if(BOOLSETTING(POPUP_HUB_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 { - if(BOOLSETTING(IGNORE_OFFLINE)) { + } else if(pm.bot) { + if(BOOLSETTING(IGNORE_BOT_PMS)) { addClientLine(TSTRING(IGNORED_MESSAGE) + pm.msg, false); - } else if(BOOLSETTING(POPUP_OFFLINE)) { + } else if(BOOLSETTING(POPUP_BOT_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 { + 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); + } } } Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/windows/HubFrame.h 2006-07-12 10:19:01 UTC (rev 638) @@ -209,10 +209,15 @@ }; 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_) { } + PMTask(const OnlineUser& from_, const OnlineUser& to_, const OnlineUser& replyTo_, const tstring& m) : StringTask(PRIVATE_MESSAGE, m), + from(from_.getUser()), to(to_.getUser()), replyTo(replyTo_.getUser()), hub(replyTo_.getIdentity().isHub()), bot(replyTo_.getIdentity().isBot()) { } + User::Ptr from; User::Ptr to; User::Ptr replyTo; + + bool hub; + bool bot; }; friend struct CompareItems; Modified: dcplusplus/trunk/windows/WindowsPage.cpp =================================================================== --- dcplusplus/trunk/windows/WindowsPage.cpp 2006-07-10 20:44:32 UTC (rev 637) +++ dcplusplus/trunk/windows/WindowsPage.cpp 2006-07-12 10:19:01 UTC (rev 638) @@ -52,11 +52,13 @@ WindowsPage::ListItem WindowsPage::optionItems[] = { { SettingsManager::POPUP_PMS, ResourceManager::SETTINGS_POPUP_PMS }, - { SettingsManager::POPUP_OFFLINE, ResourceManager::SETTINGS_POPUP_OFFLINE }, + { SettingsManager::POPUP_HUB_PMS, ResourceManager::SETTINGS_POPUP_HUB_PMS }, + { SettingsManager::POPUP_BOT_PMS, ResourceManager::SETTINGS_POPUP_BOT_PMS }, { SettingsManager::POPUNDER_FILELIST, ResourceManager::SETTINGS_POPUNDER_FILELIST }, { SettingsManager::POPUNDER_PM, ResourceManager::SETTINGS_POPUNDER_PM }, { SettingsManager::JOIN_OPEN_NEW_WINDOW, ResourceManager::SETTINGS_OPEN_NEW_WINDOW }, - { SettingsManager::IGNORE_OFFLINE, ResourceManager::SETTINGS_IGNORE_OFFLINE }, + { SettingsManager::IGNORE_HUB_PMS, ResourceManager::SETTINGS_IGNORE_HUB_PMS }, + { SettingsManager::IGNORE_BOT_PMS, ResourceManager::SETTINGS_IGNORE_BOT_PMS }, { SettingsManager::TOGGLE_ACTIVE_WINDOW, ResourceManager::SETTINGS_TOGGLE_ACTIVE_WINDOW }, { SettingsManager::PROMPT_PASSWORD, ResourceManager::SETTINGS_PROMPT_PASSWORD }, { 0, ResourceManager::SETTINGS_AUTO_AWAY } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-10 20:46:21
|
Revision: 637 Author: arnetheduck Date: 2006-07-10 13:44:32 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=637&view=rev Log Message: ----------- 0.694 Modified Paths: -------------- dcplusplus/tags/dcplusplus-0.694/help/changelog.html Added Paths: ----------- dcplusplus/tags/dcplusplus-0.694/ dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc dcplusplus/tags/dcplusplus-0.694/Example.xml dcplusplus/tags/dcplusplus-0.694/changelog.txt dcplusplus/tags/dcplusplus-0.694/client/CryptoManager.cpp dcplusplus/tags/dcplusplus-0.694/client/HashManager.h dcplusplus/tags/dcplusplus-0.694/client/QueueManager.cpp dcplusplus/tags/dcplusplus-0.694/client/QueueManager.h dcplusplus/tags/dcplusplus-0.694/client/Streams.h dcplusplus/tags/dcplusplus-0.694/client/version.h dcplusplus/tags/dcplusplus-0.694/windows/CertificatesPage.cpp dcplusplus/tags/dcplusplus-0.694/windows/DirectoryListingFrm.cpp Removed Paths: ------------- dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc dcplusplus/tags/dcplusplus-0.694/Example.xml dcplusplus/tags/dcplusplus-0.694/changelog.txt dcplusplus/tags/dcplusplus-0.694/client/CryptoManager.cpp dcplusplus/tags/dcplusplus-0.694/client/HashManager.h dcplusplus/tags/dcplusplus-0.694/client/QueueManager.cpp dcplusplus/tags/dcplusplus-0.694/client/QueueManager.h dcplusplus/tags/dcplusplus-0.694/client/Streams.h dcplusplus/tags/dcplusplus-0.694/client/version.h dcplusplus/tags/dcplusplus-0.694/windows/CertificatesPage.cpp dcplusplus/tags/dcplusplus-0.694/windows/DirectoryListingFrm.cpp Copied: dcplusplus/tags/dcplusplus-0.694 (from rev 631, dcplusplus/trunk) Deleted: dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-09 11:21:30 UTC (rev 631) +++ dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc 2006-07-10 20:44:32 UTC (rev 637) @@ -1,1050 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "windows\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "wtl\\atlres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "windows\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""wtl\\\\atlres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_FOLDERS BITMAP "res\\folders.bmp" -IDB_ARROWS BITMAP "res\\arrows.bmp" -IDB_USERS BITMAP "res\\users.bmp" -IDB_TOOLBAR BITMAP "res\\toolbar.bmp" -IDB_TOOLBAR20 BITMAP "res\\toolbar20.bmp" -IDB_TOOLBAR20_HOT BITMAP "res\\toolbar20-highlight.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON "res\\DCPlusPlus.ico" -IDR_PUBLICHUBS ICON "res\\PublicHubs.ico" -IDR_SEARCH ICON "res\\search.ico" -IDR_FAVORITES ICON "res\\Favorites.ico" -IDR_PRIVATE ICON "res\\User.ico" -IDR_DIRECTORY ICON "res\\Directory.ico" -IDR_HUB ICON "res\\Hub.ico" -IDR_NOTEPAD ICON "res\\notepad.ico" -IDR_QUEUE ICON "res\\queue.ico" -IDR_FINISHED_DL ICON "res\\FinishedDL.ico" -IDR_ADLSEARCH ICON "res\\ADLSearch.ico" -IDR_FINISHED_UL ICON "res\\FinishedUL.ico" -IDR_USERS ICON "res\\FavoriteUser.ico" -IDR_SPY ICON "res\\searchspy.ico" -IDR_NET_STATS ICON "res\\netstats.ico" -IDR_WAITING_USERS ICON "res\\wuicon.ico" -IDI_MAGNET ICON "res\\magnet.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOGEX 0, 0, 243, 287 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,96,266,50,14 - ICON IDR_MAINFRAME,IDC_STATIC,110,15,21,20 - GROUPBOX "",IDC_STATIC,7,7,229,102 - GROUPBOX "Greetz && Contributors",IDC_STATIC,7,112,229,82, - BS_CENTER - GROUPBOX "Latest version",IDC_STATIC,7,239,229,24,BS_CENTER - CTEXT "0.xxx",IDC_LATEST,13,250,218,8 - GROUPBOX "Totals",IDC_STATIC,7,197,229,39,BS_CENTER - CTEXT "Upload: xx.xx MiB, Download: xx.xx MiB",IDC_TOTALS,13, - 208,218,8 - CTEXT "Ratio (Up/Down): x.xx",IDC_RATIO,13,221,218,8 - EDITTEXT IDC_THANKS,13,122,218,66,ES_MULTILINE | ES_READONLY | - WS_VSCROLL - CTEXT "Static",IDC_VERSION,13,37,218,54 - EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT - WS_BORDER - LTEXT "TTH:",IDC_STATIC,13,93,18,12 -END - -IDD_LINE DIALOGEX 0, 0, 239, 46 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Title" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Description",IDC_DESCRIPTION,7,7,168,32 - EDITTEXT IDC_LINE,13,18,156,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,182,7,50,14 - PUSHBUTTON "&Cancel",IDCANCEL,182,25,50,14 -END - -IDD_GENERALPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "General" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Personal information",IDC_SETTINGS_PERSONAL_INFORMATION, - 7,7,261,80 - RTEXT "Nick (Required)",IDC_SETTINGS_NICK,14,20,74,8 - EDITTEXT IDC_NICK,94,17,164,14,ES_AUTOHSCROLL - RTEXT "E-Mail",IDC_SETTINGS_EMAIL,14,37,74,8 - EDITTEXT IDC_EMAIL,94,34,164,14,ES_AUTOHSCROLL - RTEXT "Description",IDC_SETTINGS_DESCRIPTION,14,54,74,8 - EDITTEXT IDC_DESCRIPTION,94,51,164,14,ES_AUTOHSCROLL - RTEXT "Line speed (upload)",IDC_SETTINGS_UPLOAD_LINE_SPEED,14, - 70,74,8 - COMBOBOX IDC_CONNECTION,94,68,58,95,CBS_DROPDOWNLIST | - CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - LTEXT "idc_settings_mebibits",IDC_SETTINGS_MEBIBITS,156,71,102, - 8 -END - -IDD_ADVANCEDPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Advanced" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - CONTROL "",IDC_ADVANCED_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,7,7,261,211 -END - -IDD_DOWNLOADPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Downloads" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Directories",IDC_SETTINGS_DIRECTORIES,7,7,261,72 - LTEXT "Default download directory", - IDC_SETTINGS_DOWNLOAD_DIRECTORY,14,19,247,8 - EDITTEXT IDC_DOWNLOADDIR,14,28,197,14,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSEDIR,217,28,44,14 - LTEXT "Unfinished downloads directory (empty = download directly to target)", - IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY,14,46,247,8 - EDITTEXT IDC_TEMP_DOWNLOAD_DIRECTORY,14,56,197,14,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_BROWSETEMPDIR,217,56,44,14 - GROUPBOX "Limits",IDC_SETTINGS_DOWNLOAD_LIMITS,7,82,261,58 - EDITTEXT IDC_DOWNLOADS,14,93,29,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin1",IDC_SLOTSSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,35,91,11,14 - LTEXT "Maximum simultaneous downloads (0 = infinite)", - IDC_SETTINGS_DOWNLOADS_MAX,46,96,215,8 - EDITTEXT IDC_MAXSPEED,14,109,29,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin2",IDC_SPEEDSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,37,113,9,14 - LTEXT "No new downloads if speed exceeds (kiB/s, 0 = disable)", - IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE,46,112,218,8 - LTEXT "Note; because of changing download speeds, this is not 100% accurate...", - IDC_SETTINGS_SPEEDS_NOT_ACCURATE,14,127,247,8 - GROUPBOX "Public Hubs list",IDC_SETTINGS_PUBLIC_HUB_LIST,7,142, - 261,72 - LTEXT "Public Hubs list URL",IDC_SETTINGS_PUBLIC_HUB_LIST_URL, - 14,155,247,8 - PUSHBUTTON "idc_settings_list_config",IDC_SETTINGS_LIST_CONFIG,14, - 165,99,14 - LTEXT "HTTP Proxy (for hublist only)", - IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY,14,183,247,8 - EDITTEXT IDC_PROXY,14,192,247,14,ES_AUTOHSCROLL -END - -IDD_UPLOADPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Sharing" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Shared directories",IDC_SETTINGS_SHARED_DIRECTORIES,7,7, - 261,179 - CONTROL "List1",IDC_DIRECTORIES,"SysListView32",LVS_REPORT | - LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,14,17,247,120,WS_EX_ACCEPTFILES - LTEXT "Note; New files are added to the share only when they've been hashed!", - IDC_SETTINGS_ONLY_HASHED,14,142,226,8 - CONTROL "Share hidden files",IDC_SHAREHIDDEN,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,156,72,10 - LTEXT "Total size:",IDC_SETTINGS_SHARE_SIZE,14,170,33,8 - LTEXT "0 B",IDC_TOTAL,50,170,41,8 - PUSHBUTTON "&Rename",IDC_RENAME,119,166,44,14,WS_DISABLED - PUSHBUTTON "&Remove",IDC_REMOVE,167,166,44,14,WS_DISABLED - PUSHBUTTON "&Add folder",IDC_ADD,215,166,46,14 - RTEXT "Automatically open an extra slot if speed is below (0 = disable)", - IDC_SETTINGS_UPLOADS_MIN_SPEED,7,192,208,8 - EDITTEXT IDC_MIN_UPLOAD_SPEED,219,189,28,14,ES_AUTOHSCROLL - CONTROL "Spin1",IDC_MIN_UPLOAD_SPIN,"msctls_updown32", - UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS | UDS_NOTHOUSANDS,247,188,14,14 - LTEXT "kiB/s",IDC_SETTINGS_KBPS,249,192,19,8 - RTEXT "Upload slots",IDC_SETTINGS_UPLOADS_SLOTS,7,207,208,8 - EDITTEXT IDC_SLOTS,219,204,28,14,ES_NUMBER - CONTROL "Spin1",IDC_SLOTSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,247,204,14,14 -END - -IDD_APPEARANCEPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Appearance" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Options",IDC_SETTINGS_APPEARANCE_OPTIONS,7,9,261,128 - CONTROL "",IDC_APPEARANCE_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,16,20,244, - 108 - GROUPBOX "Default away message",IDC_SETTINGS_DEFAULT_AWAY_MSG,7, - 141,165,32 - EDITTEXT IDC_DEFAULT_AWAY_MESSAGE,16,152,145,14,ES_MULTILINE | - ES_AUTOHSCROLL | WS_VSCROLL - GROUPBOX "Set timestamps",IDC_SETTINGS_TIME_STAMPS_FORMAT,174,141, - 96,32 - EDITTEXT IDC_TIME_STAMPS_FORMAT,180,152,80,15,ES_AUTOHSCROLL - GROUPBOX "Language file",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32 - EDITTEXT IDC_LANGUAGE,16,185,188,14,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSE,210,185,50,14 - LTEXT "Note; most of these options require that you restart DC++", - IDC_SETTINGS_REQUIRES_RESTART,7,210,253,8 -END - -IDD_APPEARANCE2PAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Colors and sounds" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Colors",IDC_SETTINGS_COLORS,7,7,261,50 - PUSHBUTTON "Select &window color",IDC_SELWINCOLOR,16,17,82,14 - PUSHBUTTON "Select &text style",IDC_SELTEXT,16,35,82,14 - LTEXT "Donate ???:s! (ok, $$$ is fine too =) (see help menu)", - IDC_COLOREXAMPLE,107,17,91,32,SS_NOPREFIX | SS_SUNKEN | - WS_BORDER | NOT WS_GROUP - PUSHBUTTON "Uploads",IDC_SETTINGS_UPLOAD_BAR_COLOR,209,17,51,14 - PUSHBUTTON "Downloads",IDC_SETTINGS_DOWNLOAD_BAR_COLOR,209,35,51,14 - GROUPBOX "Sounds",IDC_SETTINGS_SOUNDS,6,62,264,42 - CONTROL "Make an annoying sound every time a private message is received", - IDC_PRIVATE_MESSAGE_BEEP,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,18,74,246,10 - CONTROL "Make an annoying sound when a private message window is opened", - IDC_PRIVATE_MESSAGE_BEEP_OPEN,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,18,87,246,10 - GROUPBOX "Bold options",IDC_SETTINGS_BOLD_CONTENTS,5,106,263,98 - CONTROL "",IDC_BOLD_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - WS_BORDER | WS_TABSTOP,10,117,254,81 - LTEXT "Note; most of these options require that you restart DC++", - IDC_SETTINGS_REQUIRES_RESTART,7,209,253,8 -END - -IDD_LOGPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Logs" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Logging",IDC_SETTINGS_LOGGING,6,3,264,214 - RTEXT "Directory",IDC_SETTINGS_LOG_DIR,18,14,39,8 - EDITTEXT IDC_LOG_DIRECTORY,60,13,150,12,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSE_LOG,216,13,41,12 - CONTROL "",IDC_LOG_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,60,30,198,89 - RTEXT "Format",IDC_SETTINGS_FORMAT,18,132,36,8,WS_TABSTOP - EDITTEXT IDC_LOG_FORMAT,60,129,198,12,ES_AUTOHSCROLL | WS_GROUP - RTEXT "File name",IDC_SETTINGS_FILE_NAME,18,145,36,8, - WS_TABSTOP - EDITTEXT IDC_LOG_FILE,60,145,198,12,ES_AUTOHSCROLL | WS_GROUP -END - -IDD_USER_COMMAND DIALOGEX 0, 0, 195, 295 -STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | - WS_CAPTION | WS_SYSMENU -CAPTION "Create / Modify Command" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "Command Type",IDC_SETTINGS_TYPE,7,7,181,37 - CONTROL "Separator",IDC_SETTINGS_SEPARATOR,"Button", - BS_AUTORADIOBUTTON,14,18,89,10 - CONTROL "Raw",IDC_SETTINGS_RAW,"Button",BS_AUTORADIOBUTTON,14,28, - 89,10 - CONTROL "Chat",IDC_SETTINGS_CHAT,"Button",BS_AUTORADIOBUTTON,103, - 18,78,10 - CONTROL "PM",IDC_SETTINGS_PM,"Button",BS_AUTORADIOBUTTON,103,28, - 78,10 - GROUPBOX "Context",IDC_SETTINGS_CONTEXT,7,44,181,37 - CONTROL "Hub Menu",IDC_SETTINGS_HUB_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,55,89,12 - CONTROL "User Menu",IDC_SETTINGS_USER_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,67,89,10 - CONTROL "Search Menu",IDC_SETTINGS_SEARCH_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,103,55,78,12 - CONTROL "Filelist Menu",IDC_SETTINGS_FILELIST_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,103,67,78,12 - GROUPBOX "Parameters",IDC_SETTINGS_PARAMETERS,7,82,181,138 - LTEXT "Name",IDC_SETTINGS_NAME,14,92,167,8 - EDITTEXT IDC_NAME,14,103,167,14,ES_AUTOHSCROLL - LTEXT "Command",IDC_SETTINGS_COMMAND,14,121,167,8 - EDITTEXT IDC_COMMAND,14,129,167,14,ES_MULTILINE | ES_AUTOHSCROLL | - WS_VSCROLL - LTEXT "Hub IP / DNS (empty = all, ""op"" = where op)", - IDC_SETTINGS_HUB,14,146,167,8 - EDITTEXT IDC_HUB,14,156,167,14,ES_AUTOHSCROLL - LTEXT "To",IDC_SETTINGS_TO,14,174,167,8 - EDITTEXT IDC_NICK,14,183,167,14,ES_AUTOHSCROLL - CONTROL "Send once per nick",IDC_SETTINGS_ONCE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,203,167,10 - GROUPBOX "Text sent to hub",IDC_USER_CMD_PREVIEW,7,223,181,34 - EDITTEXT IDC_RESULT,14,235,167,14,ES_AUTOHSCROLL | ES_READONLY - CONTROL "idc_user_cmd_open_help",IDC_USER_CMD_OPEN_HELP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,260,167,10 - DEFPUSHBUTTON "OK",IDOK,14,274,50,14 - PUSHBUTTON "Cancel",IDCANCEL,74,274,50,14 - PUSHBUTTON "Help",IDHELP,131,274,50,14 -END - -IDD_ADLS_PROPERTIES DIALOGEX 0, 0, 190, 125 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ADLSearch Properties" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "Search String",IDC_ADLSP_SEARCH,7,7,88,8 - EDITTEXT IDC_SEARCH_STRING,7,17,88,12,ES_AUTOHSCROLL - LTEXT "Source Type",IDC_ADLSP_TYPE,105,7,78,8 - COMBOBOX IDC_SOURCE_TYPE,105,17,78,78,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE - LTEXT "Min Filesize",IDC_ADLSP_SIZE_MIN,7,39,37,8 - EDITTEXT IDC_MIN_FILE_SIZE,7,50,41,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Max Filesize",IDC_ADLSP_SIZE_MAX,54,39,39,8 - EDITTEXT IDC_MAX_FILE_SIZE,53,50,41,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Size Type",IDC_ADLSP_UNITS,105,39,78,8 - COMBOBOX IDC_SIZE_TYPE,105,50,78,68,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP,WS_EX_CLIENTEDGE - LTEXT "Destination Directory",IDC_ADLSP_DESTINATION,8,72,87,8 - EDITTEXT IDC_DEST_DIR,7,83,88,12,ES_AUTOHSCROLL - CONTROL "Enabled",IDC_IS_ACTIVE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,105,72,78,10 - CONTROL "Download Matches",IDC_AUTOQUEUE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,105,87,77,10 - DEFPUSHBUTTON "OK",IDOK,32,104,50,14 - PUSHBUTTON "Cancel",IDCANCEL,88,104,50,14 -END - -IDD_UCPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - CONTROL "",IDC_MENU_ITEMS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,261,192 - PUSHBUTTON "&Add",IDC_ADD_MENU,7,204,50,14 - PUSHBUTTON "Chang&e",IDC_CHANGE_MENU,59,204,50,14 - PUSHBUTTON "Move &Up",IDC_MOVE_UP,111,204,50,14 - PUSHBUTTON "Move &Down",IDC_MOVE_DOWN,163,204,50,14 - PUSHBUTTON "&Remove",IDC_REMOVE_MENU,215,204,50,14 -END - -IDD_FAVORITEHUB DIALOGEX 0, 0, 201, 163 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Favorite Hub Properties" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Hub",IDC_FH_HUB,7,7,187,62 - RTEXT "Name",IDC_FH_NAME,12,21,40,8 - EDITTEXT IDC_HUBNAME,56,19,131,12,ES_AUTOHSCROLL - RTEXT "Address",IDC_FH_ADDRESS,12,36,40,8 - EDITTEXT IDC_HUBADDR,56,34,131,12,ES_AUTOHSCROLL - RTEXT "Description",IDC_FH_HUB_DESC,12,51,40,8 - EDITTEXT IDC_HUBDESCR,56,49,131,12,ES_AUTOHSCROLL - GROUPBOX "Identification (leave blank for defaults)",IDC_FH_IDENT, - 7,74,187,63 - RTEXT "Nick",IDC_FH_NICK,12,89,40,8 - EDITTEXT IDC_HUBNICK,56,87,131,12 - RTEXT "Password",IDC_FH_PASSWORD,12,104,40,8 - EDITTEXT IDC_HUBPASS,56,102,131,12,ES_PASSWORD - RTEXT "Description",IDC_FH_USER_DESC,16,119,36,8 - EDITTEXT IDC_HUBUSERDESCR,56,117,131,12,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,90,142,50,14 - PUSHBUTTON "Cancel",IDCANCEL,144,142,50,14 -END - -IDD_MAGNET DIALOGEX 0, 0, 250, 143 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "",IDC_STATIC,6,0,240,138 - ICON IDI_MAGNET,IDC_STATIC,22,14,21,20 - LTEXT "Static",IDC_MAGNET_TEXT,60,12,174,24 - RTEXT "Static",IDC_MAGNET_HASH,15,44,36,8 - EDITTEXT IDC_MAGNET_DISP_HASH,56,42,178,12,ES_AUTOHSCROLL | - ES_READONLY - RTEXT "Static",IDC_MAGNET_NAME,15,62,36,8 - EDITTEXT IDC_MAGNET_DISP_NAME,56,60,178,12,ES_AUTOHSCROLL | - ES_READONLY - CONTROL "Radio1",IDC_MAGNET_QUEUE,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,84,162,10 - CONTROL "Radio2",IDC_MAGNET_SEARCH,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,96,162,10 - CONTROL "Radio3",IDC_MAGNET_NOTHING,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,107,162,11 - CONTROL "Check1",IDC_MAGNET_REMEMBER,"Button",BS_AUTO3STATE | - WS_TABSTOP,18,120,162,10 - DEFPUSHBUTTON "OK",IDOK,184,88,50,14 - PUSHBUTTON "Cancel",IDCANCEL,184,112,50,14 -END - -IDD_HASH_PROGRESS DIALOGEX 0, 0, 430, 113 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "Creating file index..." -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "Please wait while DC++ indexes your files (they won't be shared until they've been indexed)...", - IDC_HASH_INDEXING,7,7,416,8 - LTEXT "Current file...",IDC_CURRENT_FILE,7,19,416,8 - GROUPBOX "Statistics",IDC_STATISTICS,7,30,416,40 - LTEXT "0.0 files/hour",IDC_FILES_PER_HOUR,14,39,376,8 - LTEXT "0.0 MiB/s",IDC_HASH_SPEED,14,48,376,8 - LTEXT "0:00:00 left",IDC_TIME_LEFT,14,57,376,8 - CONTROL "",IDC_HASH_PROGRESS,"msctls_progress32",WS_BORDER | 0x1, - 7,74,416,14 - DEFPUSHBUTTON "Run in background",IDOK,147,92,109,14 -END - -IDD_HUB_LIST DIALOGEX 0, 0, 262, 185 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "idd_hub_list" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "idc_list_desc",IDC_LIST_DESC,6,0,252,180 - EDITTEXT IDC_LIST_EDIT_BOX,12,12,180,14,ES_AUTOHSCROLL | - ES_WANTRETURN - PUSHBUTTON "idc_list_add",IDC_LIST_ADD,198,12,50,14 - CONTROL "",IDC_LIST_LIST,"SysListView32",LVS_REPORT | - LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | - WS_TABSTOP,12,36,180,138 - PUSHBUTTON "idc_list_up",IDC_LIST_UP,198,36,50,14 - PUSHBUTTON "idc_list_down",IDC_LIST_DOWN,198,54,50,14 - PUSHBUTTON "idc_list_edit",IDC_LIST_EDIT,198,73,50,14 - PUSHBUTTON "idc_list_remove",IDC_LIST_REMOVE,198,90,50,14 - DEFPUSHBUTTON "OK",IDOK,198,138,50,14 - PUSHBUTTON "Cancel",IDCANCEL,198,156,50,14 -END - -IDD_FAVORITE_DIRSPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Download to..." -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Download to directories", - IDC_SETTINGS_FAVORITE_DIRECTORIES,6,6,262,210 - CONTROL "List1",IDC_FAVORITE_DIRECTORIES,"SysListView32", - LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | - WS_BORDER | WS_TABSTOP,12,18,246,168,WS_EX_ACCEPTFILES - PUSHBUTTON "&Rename",IDC_RENAME,114,192,46,14,WS_DISABLED - PUSHBUTTON "&Remove",IDC_REMOVE,165,192,44,14,WS_DISABLED - PUSHBUTTON "&Add folder",IDC_ADD,213,192,46,14 -END - -IDD_ADVANCED3PAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Experts only" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - RTEXT "Rollback",IDC_SETTINGS_ROLLBACK,7,10,57,8 - EDITTEXT IDC_ROLLBACK,69,7,45,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "B",IDC_SETTINGS_B,117,10,8,8 - RTEXT "Max Hash Speed",IDC_SETTINGS_MAX_HASH_SPEED,7,27,57,8,0, - WS_EX_RIGHT - EDITTEXT IDC_MAX_HASH_SPEED,69,24,45,14,ES_AUTOHSCROLL - LTEXT "MiB/s",IDC_SETTINGS_MBS,117,27,20,8 - RTEXT "PM history",IDC_SETTINGS_PM_HISTORY,7,44,57,8 - EDITTEXT IDC_SHOW_LAST_LINES_LOG,69,41,45,14,ES_AUTOHSCROLL - RTEXT "Mini slot size",IDC_SETTINGS_TEXT_MINISLOT,7,61,57,8 - EDITTEXT IDC_SET_MINISLOT_SIZE,69,58,45,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB2,117,61,14,8 - RTEXT "Max filelist size",IDC_SETTINGS_MAX_FILELIST_SIZE,7,78, - 57,8 - EDITTEXT IDC_MAX_FILELIST_SIZE,69,75,45,14,ES_AUTOHSCROLL - LTEXT "MiB",IDC_SETTINGS_MB,117,78,14,8 - LTEXT "PID",IDC_STATIC,52,95,12,8 - EDITTEXT IDC_PRIVATE_ID,69,92,45,14,ES_AUTOHSCROLL - RTEXT "File write buffer",IDC_SETTINGS_WRITE_BUFFER,139,10,65, - 8 - EDITTEXT IDC_BUFFERSIZE,208,7,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB,252,10,10,8 - RTEXT "Max tab rows",IDC_SETTINGS_MAX_TAB_ROWS,139,27,65,8 - EDITTEXT IDC_MAX_TAB_ROWS,208,24,41,14,ES_AUTOHSCROLL - RTEXT "Search history",IDC_SETTINGS_SEARCH_HISTORY,139,44,65,8 - EDITTEXT IDC_SEARCH_HISTORY,208,41,41,14,ES_AUTOHSCROLL - CONTROL "",IDC_SEARCH_HISTORY_SPIN,"msctls_updown32", - UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS | UDS_NOTHOUSANDS,246,41,11,14 - RTEXT "Bind address",IDC_SETTINGS_BIND_ADDRESS,139,61,65,8 - EDITTEXT IDC_BIND_ADDRESS,208,58,41,14,ES_AUTOHSCROLL - RTEXT "Socket read buffer",IDC_SETTINGS_SOCKET_IN_BUFFER,131, - 78,73,8 - EDITTEXT IDC_SOCKET_IN_BUFFER,208,75,41,14,ES_AUTOHSCROLL - LTEXT "B",IDC_STATIC,252,78,8,8 - RTEXT "Socket write buffer",IDC_SETTINGS_SOCKET_OUT_BUFFER,128, - 96,76,8 - EDITTEXT IDC_SOCKET_OUT_BUFFER,208,93,41,14,ES_AUTOHSCROLL - LTEXT "B",IDC_STATIC,252,96,8,8 - LTEXT "Auto refresh time",IDC_SETTINGS_AUTO_REFRESH_TIME,7,113, - 57,8 - EDITTEXT IDC_AUTO_REFRESH_TIME,69,110,45,14,ES_AUTOHSCROLL - EDITTEXT IDC_AUTO_SEARCH_LIMIT,208,111,41,14,ES_AUTOHSCROLL - LTEXT "Auto-search limit",IDC_SETTINGS_AUTO_SEARCH_LIMIT,148, - 113,56,13 -END - -IDD_NETWORKPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Incoming Connection Settings (See help / FAQ if unsure)", - IDC_SETTINGS_INCOMING,7,7,261,113 - CONTROL "Direct connection",IDC_DIRECT,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,20,148,10 - CONTROL "Firewall with UPnP (WinXP+ only)",IDC_FIREWALL_UPNP, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,33,143,10 - CONTROL "Firewall with manual port forwarding",IDC_FIREWALL_NAT, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,47,143,10 - CONTROL "Firewall (passive mode, worst case)", - IDC_FIREWALL_PASSIVE,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,12,103,249,10 - LTEXT "Ports",IDC_SETTINGS_PORTS,230,17,18,8 - LTEXT "TCP",IDC_SETTINGS_PORT_TCP,209,31,15,8,NOT WS_GROUP - EDITTEXT IDC_PORT_TCP,230,28,29,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "UDP",IDC_SETTINGS_PORT_UDP,209,48,16,8 - EDITTEXT IDC_PORT_UDP,230,45,30,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "External / WAN IP",IDC_SETTINGS_IP,59,59,68,8,NOT - WS_GROUP - EDITTEXT IDC_EXTERNAL_IP,59,69,99,14,ES_AUTOHSCROLL - CONTROL "Don't allow hub/UPnP to override",IDC_OVERRIDE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,59,86,150,10 - GROUPBOX "Outgoing Connection Settings",IDC_SETTINGS_OUTGOING,7, - 126,261,95 - CONTROL "Direct Connection",IDC_DIRECT_OUT,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,139,153,10 - CONTROL "Socks 5",IDC_SOCKS5,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,12,152,40,8 - LTEXT "Server IP",IDC_SETTINGS_SOCKS5_IP,59,152,85,8 - EDITTEXT IDC_SOCKS_SERVER,59,162,85,14,ES_AUTOHSCROLL - LTEXT "Port",IDC_SETTINGS_SOCKS5_PORT,153,152,29,8 - EDITTEXT IDC_SOCKS_PORT,153,162,29,14,ES_AUTOHSCROLL - LTEXT "Username",IDC_SETTINGS_SOCKS5_USERNAME,59,179,84,8 - EDITTEXT IDC_SOCKS_USER,59,190,85,14,ES_AUTOHSCROLL - LTEXT "Password",IDC_SETTINGS_SOCKS5_PASSWORD,153,178,71,8 - EDITTEXT IDC_SOCKS_PASSWORD,153,190,71,14,ES_AUTOHSCROLL - CONTROL "Use SOCKS5 server to resolve hostnames", - IDC_SOCKS_RESOLVE,"Button",BS_AUTOCHECKBOX | WS_GROUP | - WS_TABSTOP,59,207,165,10 - LTEXT "TLS",IDC_SETTINGS_PORT_TLS,209,64,21,8 - EDITTEXT IDC_PORT_TLS,230,61,30,14,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_WINDOWSPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Windows" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Auto-open at startup",IDC_SETTINGS_AUTO_OPEN,7,7,261,68 - CONTROL "",IDC_WINDOWS_STARTUP,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,13,17,248,53 - GROUPBOX "Window options",IDC_SETTINGS_WINDOWS_OPTIONS,7,76,261, - 68 - CONTROL "",IDC_WINDOWS_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,13,86,248,53 - GROUPBOX "Confirmation dialog options", - IDC_SETTINGS_CONFIRM_OPTIONS,7,146,261,65 - CONTROL "",IDC_CONFIRM_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,13,157,248,48 -END - -IDD_QUEUEPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Queue" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Autoprio settings",IDC_SETTINGS_AUTOPRIO,3,3,267,46 - RTEXT "Highest prio max size",IDC_SETTINGS_PRIO_HIGHEST,7,15, - 72,8 - EDITTEXT IDC_PRIO_HIGHEST_SIZE,84,12,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB3,128,15,10,8 - RTEXT "Normal prio max size",IDC_SETTINGS_PRIO_NORMAL,7,32,72, - 8 - EDITTEXT IDC_PRIO_NORMAL_SIZE,84,29,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB5,128,32,10,8 - RTEXT "High prio max size",IDC_SETTINGS_PRIO_HIGH,147,15,57,8 - EDITTEXT IDC_PRIO_HIGH_SIZE,208,12,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB4,252,15,10,8 - RTEXT "Low prio max size",IDC_SETTINGS_PRIO_LOW,147,32,57,8 - EDITTEXT IDC_PRIO_LOW_SIZE,208,29,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB6,252,32,10,8 - GROUPBOX "Autodrop settings",IDC_SETTINGS_AUTODROP,3,51,267,63 - RTEXT "Drop sources below",IDC_SETTINGS_AUTODROP_SPEED,7,63,72, - 8 - EDITTEXT IDC_AUTODROP_SPEED,84,60,41,14,ES_AUTOHSCROLL - LTEXT "B/s",IDC_SETTINGS_BPS,128,63,15,8 - RTEXT "Min elapsed",IDC_SETTINGS_AUTODROP_ELAPSED,7,80,72,8 - EDITTEXT IDC_AUTODROP_ELAPSED,84,77,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S2,128,80,15,8 - RTEXT "Min sources online",IDC_SETTINGS_AUTODROP_MINSOURCES,7, - 97,72,8 - EDITTEXT IDC_AUTODROP_MINSOURCES,84,94,41,14,ES_AUTOHSCROLL - RTEXT "Check every",IDC_SETTINGS_AUTODROP_INTERVAL,147,63,57,8 - EDITTEXT IDC_AUTODROP_INTERVAL,208,60,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S1,252,63,10,8 - RTEXT "Max inactivity",IDC_SETTINGS_AUTODROP_INACTIVITY,147,80, - 57,8 - EDITTEXT IDC_AUTODROP_INACTIVITY,208,77,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S3,252,80,15,8 - RTEXT "Min filesize",IDC_SETTINGS_AUTODROP_FILESIZE,147,97,57, - 8 - EDITTEXT IDC_AUTODROP_FILESIZE,208,94,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB7,252,97,15,8 - GROUPBOX "Other queue options",IDC_SETTINGS_OTHER_QUEUE_OPTIONS,3, - 116,267,102 - CONTROL "",IDC_OTHER_QUEUE_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,9,126,255,86 -END - -IDD_CERTIFICATESPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Security Certificates" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - EDITTEXT IDC_TLS_PRIVATE_KEY_FILE,102,7,141,14,ES_AUTOHSCROLL - EDITTEXT IDC_TLS_CERTIFICATE_FILE,102,24,141,14,ES_AUTOHSCROLL - EDITTEXT IDC_TLS_TRUSTED_CERTIFICATES_PATH,102,42,141,14, - ES_AUTOHSCROLL - LTEXT "Private key file",IDC_STATIC,50,10,48,8 - LTEXT "Own certificate file",IDC_STATIC,37,27,61,8 - LTEXT "Trusted certificates path",IDC_STATIC,18,45,80,8 - LTEXT "Under construction, restart dc++ to see effects...", - IDC_STATIC,7,186,163,8 - LTEXT "Experimental feature, don't consider DC++ secure in any way", - IDC_STATIC,7,201,200,8 - CONTROL "",IDC_TLS_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,89,261,90 - PUSHBUTTON "Generate certificates",IDC_GENERATE_CERTS,184,62,84,14 - PUSHBUTTON "...",IDC_BROWSE_PRIVATE_KEY,247,7,21,14 - PUSHBUTTON "...",IDC_BROWSE_CERTIFICATE,247,24,21,14 - PUSHBUTTON "...",IDC_BROWSE_TRUSTED_PATH,248,42,20,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 236 - VERTGUIDE, 13 - VERTGUIDE, 231 - TOPMARGIN, 7 - BOTTOMMARGIN, 280 - END - - IDD_LINE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 232 - TOPMARGIN, 7 - BOTTOMMARGIN, 39 - END - - IDD_GENERALPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 88 - VERTGUIDE, 94 - VERTGUIDE, 156 - VERTGUIDE, 171 - VERTGUIDE, 258 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_ADVANCEDPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 64 - VERTGUIDE, 69 - VERTGUIDE, 114 - VERTGUIDE, 117 - VERTGUIDE, 204 - VERTGUIDE, 208 - VERTGUIDE, 249 - VERTGUIDE, 252 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_DOWNLOADPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 46 - VERTGUIDE, 211 - VERTGUIDE, 217 - VERTGUIDE, 230 - VERTGUIDE, 234 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 217 - END - - IDD_UPLOADPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 215 - VERTGUIDE, 219 - VERTGUIDE, 247 - VERTGUIDE, 249 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_APPEARANCEPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 16 - VERTGUIDE, 260 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_LOGPAGE, DIALOG - BEGIN - VERTGUIDE, 18 - VERTGUIDE, 60 - VERTGUIDE, 258 - END - - IDD_USER_COMMAND, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 188 - VERTGUIDE, 14 - VERTGUIDE, 103 - VERTGUIDE, 181 - VERTGUIDE, 188 - TOPMARGIN, 7 - BOTTOMMARGIN, 288 - HORZGUIDE, 18 - HORZGUIDE, 28 - HORZGUIDE, 44 - HORZGUIDE, 55 - HORZGUIDE, 67 - HORZGUIDE, 82 - HORZGUIDE, 257 - END - - IDD_ADLS_PROPERTIES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 183 - VERTGUIDE, 105 - TOPMARGIN, 7 - BOTTOMMARGIN, 118 - END - - IDD_UCPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_FAVORITEHUB, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 194 - VERTGUIDE, 12 - VERTGUIDE, 52 - VERTGUIDE, 56 - TOPMARGIN, 7 - BOTTOMMARGIN, 156 - END - - IDD_MAGNET, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 243 - VERTGUIDE, 234 - TOPMARGIN, 7 - BOTTOMMARGIN, 136 - END - - IDD_HASH_PROGRESS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 423 - VERTGUIDE, 14 - VERTGUIDE, 390 - TOPMARGIN, 7 - BOTTOMMARGIN, 106 - END - - IDD_HUB_LIST, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 255 - VERTGUIDE, 12 - VERTGUIDE, 144 - VERTGUIDE, 150 - TOPMARGIN, 7 - BOTTOMMARGIN, 178 - END - - IDD_ADVANCED3PAGE, DIALOG - BEGIN - VERTGUIDE, 64 - VERTGUIDE, 69 - VERTGUIDE, 114 - VERTGUIDE, 117 - VERTGUIDE, 204 - VERTGUIDE, 208 - VERTGUIDE, 249 - VERTGUIDE, 252 - END - - IDD_NETWORKPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - VERTGUIDE, 12 - VERTGUIDE, 59 - VERTGUIDE, 209 - VERTGUIDE, 230 - VERTGUIDE, 268 - END - - IDD_WINDOWSPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 13 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_QUEUEPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_CERTIFICATESPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 98 - VERTGUIDE, 102 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,2 - PRODUCTVERSION 0,6,9,2 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "http://dcplusplus.sourceforge.net" - VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 2" - VALUE "InternalName", "DC++" - VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" - VALUE "OriginalFilename", "DCPlusPlus.exe" - VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 2" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS -BEGIN - "P", ID_FILE_CONNECT, VIRTKEY, CONTROL, NOINVERT - "Q", ID_FILE_QUICK_CONNECT, VIRTKEY, CONTROL, NOINVERT - "R", ID_FILE_RECONNECT, VIRTKEY, CONTROL, NOINVERT - "S", ID_FILE_SEARCH, VIRTKEY, CONTROL, NOINVERT - "2", ID_VIEW_STATUS_BAR, VIRTKEY, CONTROL, NOINVERT - "1", ID_VIEW_TOOLBAR, VIRTKEY, CONTROL, NOINVERT - "3", ID_VIEW_TRANSFER_VIEW, VIRTKEY, CONTROL, NOINVERT - "F", IDC_FAVORITES, VIRTKEY, CONTROL, NOINVERT - "U", IDC_FAVUSERS, VIRTKEY, CONTROL, NOINVERT - "T", IDC_FOLLOW, VIRTKEY, CONTROL, NOINVERT - "N", IDC_NOTEPAD, VIRTKEY, CONTROL, NOINVERT - "D", IDC_QUEUE, VIRTKEY, CONTROL, NOINVERT - "E", IDC_REFRESH_FILE_LIST, VIRTKEY, CONTROL, NOINVERT - "S", IDC_SEND_MESSAGE, VIRTKEY, ALT, NOINVERT - "L", IDC_OPEN_FILE_LIST, VIRTKEY, CONTROL, NOINVERT -END - -IDR_PUBLICHUBS ACCELERATORS -BEGIN - "C", IDC_PUB_LIST_CONFIG, VIRTKEY, ALT, NOINVERT - "I", IDC_FILTER_FOCUS, VIRTKEY, ALT, NOINVERT - "R", IDC_REFRESH, VIRTKEY, ALT, NOINVERT -END - -IDR_ADLSEARCH ACCELERATORS -BEGIN - "N", IDC_ADD, VIRTKEY, ALT, NOINVERT - "P", IDC_EDIT, VIRTKEY, ALT, NOINVERT - "H", IDC_HELP_FAQ, VIRTKEY, ALT, NOINVERT - "D", IDC_MOVE_DOWN, VIRTKEY, ALT, NOINVERT - "U", IDC_MOVE_UP, VIRTKEY, ALT, NOINVERT - "R", IDC_REMOVE, VIRTKEY, ALT, NOINVERT -END - -IDR_FAVORITES ACCELERATORS -BEGIN - "N", IDC_NEWFAV, VIRTKEY, ALT, NOINVERT - "P", IDC_EDIT, VIRTKEY, ALT, NOINVERT - "R", IDC_REMOVE, VIRTKEY, ALT, NOINVERT - "U", IDC_MOVE_UP, VIRTKEY, ALT, NOINVERT - "D", IDC_MOVE_DOWN, VIRTKEY, ALT, NOINVERT - "C", IDC_CONNECT, VIRTKEY, ALT, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "res\\DCPlusPlus.Manifest" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Copied: dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc (from rev 636, dcplusplus/trunk/DCPlusPlus.rc) =================================================================== --- dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc (rev 0) +++ dcplusplus/tags/dcplusplus-0.694/DCPlusPlus.rc 2006-07-10 20:44:32 UTC (rev 637) @@ -0,0 +1,1050 @@ +// Microsoft Visual C++ generated resource script. +// +#include "windows\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "wtl\\atlres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "windows\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""wtl\\\\atlres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_FOLDERS BITMAP "res\\folders.bmp" +IDB_ARROWS BITMAP "res\\arrows.bmp" +IDB_USERS BITMAP "res\\users.bmp" +IDB_TOOLBAR BITMAP "res\\toolbar.bmp" +IDB_TOOLBAR20 BITMAP "res\\toolbar20.bmp" +IDB_TOOLBAR20_HOT BITMAP "res\\toolbar20-highlight.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\DCPlusPlus.ico" +IDR_PUBLICHUBS ICON "res\\PublicHubs.ico" +IDR_SEARCH ICON "res\\search.ico" +IDR_FAVORITES ICON "res\\Favorites.ico" +IDR_PRIVATE ICON "res\\User.ico" +IDR_DIRECTORY ICON "res\\Directory.ico" +IDR_HUB ICON "res\\Hub.ico" +IDR_NOTEPAD ICON "res\\notepad.ico" +IDR_QUEUE ICON "res\\queue.ico" +IDR_FINISHED_DL ICON "res\\FinishedDL.ico" +IDR_ADLSEARCH ICON "res\\ADLSearch.ico" +IDR_FINISHED_UL ICON "res\\FinishedUL.ico" +IDR_USERS ICON "res\\FavoriteUser.ico" +IDR_SPY ICON "res\\searchspy.ico" +IDR_NET_STATS ICON "res\\netstats.ico" +IDR_WAITING_USERS ICON "res\\wuicon.ico" +IDI_MAGNET ICON "res\\magnet.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 243, 287 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,96,266,50,14 + ICON IDR_MAINFRAME,IDC_STATIC,110,15,21,20 + GROUPBOX "",IDC_STATIC,7,7,229,102 + GROUPBOX "Greetz && Contributors",IDC_STATIC,7,112,229,82, + BS_CENTER + GROUPBOX "Latest version",IDC_STATIC,7,239,229,24,BS_CENTER + CTEXT "0.xxx",IDC_LATEST,13,250,218,8 + GROUPBOX "Totals",IDC_STATIC,7,197,229,39,BS_CENTER + CTEXT "Upload: xx.xx MiB, Download: xx.xx MiB",IDC_TOTALS,13, + 208,218,8 + CTEXT "Ratio (Up/Down): x.xx",IDC_RATIO,13,221,218,8 + EDITTEXT IDC_THANKS,13,122,218,66,ES_MULTILINE | ES_READONLY | + WS_VSCROLL + CTEXT "Static",IDC_VERSION,13,37,218,54 + EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_BORDER + LTEXT "TTH:",IDC_STATIC,13,93,18,12 +END + +IDD_LINE DIALOGEX 0, 0, 239, 46 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Title" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Description",IDC_DESCRIPTION,7,7,168,32 + EDITTEXT IDC_LINE,13,18,156,14,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,182,7,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,182,25,50,14 +END + +IDD_GENERALPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Personal information",IDC_SETTINGS_PERSONAL_INFORMATION, + 7,7,261,80 + RTEXT "Nick (Required)",IDC_SETTINGS_NICK,14,20,74,8 + EDITTEXT IDC_NICK,94,17,164,14,ES_AUTOHSCROLL + RTEXT "E-Mail",IDC_SETTINGS_EMAIL,14,37,74,8 + EDITTEXT IDC_EMAIL,94,34,164,14,ES_AUTOHSCROLL + RTEXT "Description",IDC_SETTINGS_DESCRIPTION,14,54,74,8 + EDITTEXT IDC_DESCRIPTION,94,51,164,14,ES_AUTOHSCROLL + RTEXT "Line speed (upload)",IDC_SETTINGS_UPLOAD_LINE_SPEED,14, + 70,74,8 + COMBOBOX IDC_CONNECTION,94,68,58,95,CBS_DROPDOWNLIST | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + LTEXT "idc_settings_mebibits",IDC_SETTINGS_MEBIBITS,156,71,102, + 8 +END + +IDD_ADVANCEDPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Advanced" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "",IDC_ADVANCED_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,7,7,261,211 +END + +IDD_DOWNLOADPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Downloads" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Directories",IDC_SETTINGS_DIRECTORIES,7,7,261,72 + LTEXT "Default download directory", + IDC_SETTINGS_DOWNLOAD_DIRECTORY,14,19,247,8 + EDITTEXT IDC_DOWNLOADDIR,14,28,197,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSEDIR,217,28,44,14 + LTEXT "Unfinished downloads directory (empty = download directly to target)", + IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY,14,46,247,8 + EDITTEXT IDC_TEMP_DOWNLOAD_DIRECTORY,14,56,197,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSETEMPDIR,217,56,44,14 + GROUPBOX "Limits",IDC_SETTINGS_DOWNLOAD_LIMITS,7,82,261,58 + EDITTEXT IDC_DOWNLOADS,14,93,29,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_SLOTSSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,35,91,11,14 + LTEXT "Maximum simultaneous downloads (0 = infinite)", + IDC_SETTINGS_DOWNLOADS_MAX,46,96,215,8 + EDITTEXT IDC_MAXSPEED,14,109,29,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SPEEDSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,37,113,9,14 + LTEXT "No new downloads if speed exceeds (kiB/s, 0 = disable)", + IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE,46,112,218,8 + LTEXT "Note; because of changing download speeds, this is not 100% accurate...", + IDC_SETTINGS_SPEEDS_NOT_ACCURATE,14,127,247,8 + GROUPBOX "Public Hubs list",IDC_SETTINGS_PUBLIC_HUB_LIST,7,142, + 261,72 + LTEXT "Public Hubs list URL",IDC_SETTINGS_PUBLIC_HUB_LIST_URL, + 14,155,247,8 + PUSHBUTTON "idc_settings_list_config",IDC_SETTINGS_LIST_CONFIG,14, + 165,99,14 + LTEXT "HTTP Proxy (for hublist only)", + IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY,14,183,247,8 + EDITTEXT IDC_PROXY,14,192,247,14,ES_AUTOHSCROLL +END + +IDD_UPLOADPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE +CAPTION "Sharing" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Shared directories",IDC_SETTINGS_SHARED_DIRECTORIES,7,7, + 261,179 + CONTROL "List1",IDC_DIRECTORIES,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,14,17,247,120,WS_EX_ACCEPTFILES + LTEXT "Note; New files are added to the share only when they've been hashed!", + IDC_SETTINGS_ONLY_HASHED,14,142,226,8 + CONTROL "Share hidden files",IDC_SHAREHIDDEN,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,156,72,10 + LTEXT "Total size:",IDC_SETTINGS_SHARE_SIZE,14,170,33,8 + LTEXT "0 B",IDC_TOTAL,50,170,41,8 + PUSHBUTTON "&Rename",IDC_RENAME,119,166,44,14,WS_DISABLED + PUSHBUTTON "&Remove",IDC_REMOVE,167,166,44,14,WS_DISABLED + PUSHBUTTON "&Add folder",IDC_ADD,215,166,46,14 + RTEXT "Automatically open an extra slot if speed is below (0 = disable)", + IDC_SETTINGS_UPLOADS_MIN_SPEED,7,192,208,8 + EDITTEXT IDC_MIN_UPLOAD_SPEED,219,189,28,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_MIN_UPLOAD_SPIN,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS | UDS_NOTHOUSANDS,247,188,14,14 + LTEXT "kiB/s",IDC_SETTINGS_KBPS,249,192,19,8 + RTEXT "Upload slots",IDC_SETTINGS_UPLOADS_SLOTS,7,207,208,8 + EDITTEXT IDC_SLOTS,219,204,28,14,ES_NUMBER + CONTROL "Spin1",IDC_SLOTSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,247,204,14,14 +END + +IDD_APPEARANCEPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Appearance" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Options",IDC_SETTINGS_APPEARANCE_OPTIONS,7,9,261,128 + CONTROL "",IDC_APPEARANCE_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,16,20,244, + 108 + GROUPBOX "Default away message",IDC_SETTINGS_DEFAULT_AWAY_MSG,7, + 141,165,32 + EDITTEXT IDC_DEFAULT_AWAY_MESSAGE,16,152,145,14,ES_MULTILINE | + ES_AUTOHSCROLL | WS_VSCROLL + GROUPBOX "Set timestamps",IDC_SETTINGS_TIME_STAMPS_FORMAT,174,141, + 96,32 + EDITTEXT IDC_TIME_STAMPS_FORMAT,180,152,80,15,ES_AUTOHSCROLL + GROUPBOX "Language file",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32 + EDITTEXT IDC_LANGUAGE,16,185,188,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSE,210,185,50,14 + LTEXT "Note; most of these options require that you restart DC++", + IDC_SETTINGS_REQUIRES_RESTART,7,210,253,8 +END + +IDD_APPEARANCE2PAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE +CAPTION "Colors and sounds" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Colors",IDC_SETTINGS_COLORS,7,7,261,50 + PUSHBUTTON "Select &window color",IDC_SELWINCOLOR,16,17,82,14 + PUSHBUTTON "Select &text style",IDC_SELTEXT,16,35,82,14 + LTEXT "Donate ???:s! (ok, $$$ is fine too =) (see help menu)", + IDC_COLOREXAMPLE,107,17,91,32,SS_NOPREFIX | SS_SUNKEN | + WS_BORDER | NOT WS_GROUP + PUSHBUTTON "Uploads",IDC_SETTINGS_UPLOAD_BAR_COLOR,209,17,51,14 + PUSHBUTTON "Downloads",IDC_SETTINGS_DOWNLOAD_BAR_COLOR,209,35,51,14 + GROUPBOX "Sounds",IDC_SETTINGS_SOUNDS,6,62,264,42 + CONTROL "Make an annoying sound every time a private message is received", + IDC_PRIVATE_MESSAGE_BEEP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,74,246,10 + CONTROL "Make an annoying sound when a private message window is opened", + IDC_PRIVATE_MESSAGE_BEEP_OPEN,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,87,246,10 + GROUPBOX "Bold options",IDC_SETTINGS_BOLD_CONTENTS,5,106,263,98 + CONTROL "",IDC_BOLD_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | + WS_BORDER | WS_TABSTOP,10,117,254,81 + LTEXT "Note; most of these options require that you restart DC++", + IDC_SETTINGS_REQUIRES_RESTART,7,209,253,8 +END + +IDD_LOGPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Logs" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Logging",IDC_SETTINGS_LOGGING,6,3,264,214 + RTEXT "Directory",IDC_SETTINGS_LOG_DIR,18,14,39,8 + EDITTEXT IDC_LOG_DIRECTORY,60,13,150,12,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSE_LOG,216,13,41,12 + CONTROL "",IDC_LOG_OPTIONS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,60,30,198,89 + RTEXT "Format",IDC_SETTINGS_FORMAT,18,132,36,8,WS_TABSTOP + EDITTEXT IDC_LOG_FORMAT,60,129,198,12,ES_AUTOHSCROLL | WS_GROUP + RTEXT "File name",IDC_SETTINGS_FILE_NAME,18,145,36,8, + WS_TABSTOP + EDITTEXT IDC_LOG_FILE,60,145,198,12,ES_AUTOHSCROLL | WS_GROUP ... [truncated message content] |
From: <arn...@us...> - 2006-07-10 20:34:56
|
Revision: 636 Author: arnetheduck Date: 2006-07-10 13:34:17 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=636&view=rev Log Message: ----------- 0.694 fixes Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/CryptoManager.cpp dcplusplus/trunk/client/HashManager.h dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/QueueManager.h dcplusplus/trunk/client/Streams.h dcplusplus/trunk/client/version.h dcplusplus/trunk/windows/DirectoryListingFrm.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-07-10 20:34:17 UTC (rev 636) @@ -942,8 +942,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,3 - PRODUCTVERSION 0,6,9,3 + FILEVERSION 0,6,9,4 + PRODUCTVERSION 0,6,9,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -960,12 +960,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 3" + VALUE "FileVersion", "0, 6, 9, 4" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 3" + VALUE "ProductVersion", "0, 6, 9, 4" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/Example.xml 2006-07-10 20:34:17 UTC (rev 636) @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.691" Revision="1" RightToLeft="0"> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.694" 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-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/changelog.txt 2006-07-10 20:34:17 UTC (rev 636) @@ -1,4 +1,10 @@ --- 0.693 2006-07-09 -- +-- 0.694 2006-07-10 -- +* Fixed crash in certificates page +* [bug 1005] Fixed linux compile issue (thanks tpo) +* [bug 1004] Fixed browse file list on self +* Both .crt and .pem files are read as trusted certificates + +-- 0.693 2006-07-09 -- * Fixed crash bug * Added language code to example language xml Modified: dcplusplus/trunk/client/CryptoManager.cpp =================================================================== --- dcplusplus/trunk/client/CryptoManager.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/CryptoManager.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -196,18 +196,29 @@ hFind = FindFirstFile(Text::toT(SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + "*.pem").c_str(), &data); if(hFind != INVALID_HANDLE_VALUE) { do { - if(SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { + if( + SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS + ) { LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); } - if(SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { + } while(FindNextFile(hFind, &data)); + + FindClose(hFind); + } + hFind = FindFirstFile(Text::toT(SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + "*.crt").c_str(), &data); + if(hFind != INVALID_HANDLE_VALUE) { + do { + if( + SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS + ) { LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); } - if(SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { - LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); - } - if(SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { - LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); - } } while(FindNextFile(hFind, &data)); FindClose(hFind); Modified: dcplusplus/trunk/client/HashManager.h =================================================================== --- dcplusplus/trunk/client/HashManager.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/HashManager.h 2006-07-10 20:34:17 UTC (rev 636) @@ -32,6 +32,7 @@ #include "Util.h" #include "FastAlloc.h" #include "Text.h" +#include "Streams.h" STANDARD_EXCEPTION(HashException); class File; Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -413,7 +413,11 @@ add(target, -1, NULL, aUser, USER_LIST_NAME, true, QueueItem::FLAG_USER_LIST | aFlags); } -void QueueManager::addPfs(const User::Ptr& aUser, const string& aDir) throw() { +void QueueManager::addPfs(const User::Ptr& aUser, const string& aDir) throw(QueueException) { + if(aUser == ClientManager::getInstance()->getMe()) { + throw QueueException(STRING(NO_DOWNLOADS_FROM_SELF)); + } + if(!aUser->isOnline() || aUser->getCID().isZero()) return; Modified: dcplusplus/trunk/client/QueueManager.h =================================================================== --- dcplusplus/trunk/client/QueueManager.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/QueueManager.h 2006-07-10 20:34:17 UTC (rev 636) @@ -80,7 +80,7 @@ /** Add a user's filelist to the queue. */ void addList(const User::Ptr& aUser, int aFlags) throw(QueueException, FileException); /** Queue a partial file list download */ - void addPfs(const User::Ptr& aUser, const string& aDir) throw(); + void addPfs(const User::Ptr& aUser, const string& aDir) throw(QueueException); /** Readd a source that was removed */ void readd(const string& target, User::Ptr& aUser) throw(QueueException); /** Add a directory to the queue (downloads filelist and matches the directory). */ Modified: dcplusplus/trunk/client/Streams.h =================================================================== --- dcplusplus/trunk/client/Streams.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/Streams.h 2006-07-10 20:34:17 UTC (rev 636) @@ -23,6 +23,7 @@ #pragma once #endif // _MSC_VER > 1000 +#include "SettingsManager.h" #include "Exception.h" STANDARD_EXCEPTION(FileException); Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/version.h 2006-07-10 20:34:17 UTC (rev 636) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.693" -#define VERSIONFLOAT 0.693 +#define VERSIONSTRING "0.694" +#define VERSIONFLOAT 0.694 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/windows/DirectoryListingFrm.cpp =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -334,8 +334,12 @@ if(!d->getComplete()) { if(dl->getUser()->isOnline()) { - QueueManager::getInstance()->addPfs(dl->getUser(), dl->getPath(d)); - ctrlStatus.SetText(STATUS_TEXT, CTSTRING(DOWNLOADING_LIST)); + try { + QueueManager::getInstance()->addPfs(dl->getUser(), dl->getPath(d)); + ctrlStatus.SetText(STATUS_TEXT, CTSTRING(DOWNLOADING_LIST)); + } catch(const QueueException& e) { + ctrlStatus.SetText(STATUS_TEXT, Text::toT(e.getError()).c_str()); + } } else { ctrlStatus.SetText(STATUS_TEXT, CTSTRING(USER_OFFLINE)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-10 08:40:11
|
Revision: 635 Author: arnetheduck Date: 2006-07-10 01:40:05 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=635&view=rev Log Message: ----------- we love copypaste errors Modified Paths: -------------- dcplusplus/trunk/windows/CertificatesPage.cpp Modified: dcplusplus/trunk/windows/CertificatesPage.cpp =================================================================== --- dcplusplus/trunk/windows/CertificatesPage.cpp 2006-07-10 07:42:05 UTC (rev 634) +++ dcplusplus/trunk/windows/CertificatesPage.cpp 2006-07-10 08:40:05 UTC (rev 635) @@ -43,8 +43,8 @@ PropPage::ListItem CertificatesPage::listItems[] = { { SettingsManager::USE_TLS, ResourceManager::SETTINGS_USE_TLS }, { SettingsManager::ALLOW_UNTRUSTED_HUBS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_HUBS }, - { SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, } - { 0, 0, PropPage::T_END } + { SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, }, + { 0, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, }, }; LRESULT CertificatesPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-10 07:42:13
|
Revision: 634 Author: arnetheduck Date: 2006-07-10 00:42:05 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=634&view=rev Log Message: ----------- Certpage fix Modified Paths: -------------- dcplusplus/trunk/windows/CertificatesPage.cpp Modified: dcplusplus/trunk/windows/CertificatesPage.cpp =================================================================== --- dcplusplus/trunk/windows/CertificatesPage.cpp 2006-07-09 12:04:27 UTC (rev 633) +++ dcplusplus/trunk/windows/CertificatesPage.cpp 2006-07-10 07:42:05 UTC (rev 634) @@ -44,6 +44,7 @@ { SettingsManager::USE_TLS, ResourceManager::SETTINGS_USE_TLS }, { SettingsManager::ALLOW_UNTRUSTED_HUBS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_HUBS }, { SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, } + { 0, 0, PropPage::T_END } }; LRESULT CertificatesPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-09 12:04:46
|
Revision: 633 Author: arnetheduck Date: 2006-07-09 05:04:27 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=633&view=rev Log Message: ----------- 0.693 Added Paths: ----------- dcplusplus/tags/dcplusplus-0.693/ dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc dcplusplus/tags/dcplusplus-0.693/client/version.h Removed Paths: ------------- dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc dcplusplus/tags/dcplusplus-0.693/client/version.h Copied: dcplusplus/tags/dcplusplus-0.693 (from rev 631, dcplusplus/trunk) Deleted: dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-09 11:21:30 UTC (rev 631) +++ dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc 2006-07-09 12:04:27 UTC (rev 633) @@ -1,1050 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "windows\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "wtl\\atlres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "windows\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""wtl\\\\atlres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_FOLDERS BITMAP "res\\folders.bmp" -IDB_ARROWS BITMAP "res\\arrows.bmp" -IDB_USERS BITMAP "res\\users.bmp" -IDB_TOOLBAR BITMAP "res\\toolbar.bmp" -IDB_TOOLBAR20 BITMAP "res\\toolbar20.bmp" -IDB_TOOLBAR20_HOT BITMAP "res\\toolbar20-highlight.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON "res\\DCPlusPlus.ico" -IDR_PUBLICHUBS ICON "res\\PublicHubs.ico" -IDR_SEARCH ICON "res\\search.ico" -IDR_FAVORITES ICON "res\\Favorites.ico" -IDR_PRIVATE ICON "res\\User.ico" -IDR_DIRECTORY ICON "res\\Directory.ico" -IDR_HUB ICON "res\\Hub.ico" -IDR_NOTEPAD ICON "res\\notepad.ico" -IDR_QUEUE ICON "res\\queue.ico" -IDR_FINISHED_DL ICON "res\\FinishedDL.ico" -IDR_ADLSEARCH ICON "res\\ADLSearch.ico" -IDR_FINISHED_UL ICON "res\\FinishedUL.ico" -IDR_USERS ICON "res\\FavoriteUser.ico" -IDR_SPY ICON "res\\searchspy.ico" -IDR_NET_STATS ICON "res\\netstats.ico" -IDR_WAITING_USERS ICON "res\\wuicon.ico" -IDI_MAGNET ICON "res\\magnet.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOGEX 0, 0, 243, 287 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,96,266,50,14 - ICON IDR_MAINFRAME,IDC_STATIC,110,15,21,20 - GROUPBOX "",IDC_STATIC,7,7,229,102 - GROUPBOX "Greetz && Contributors",IDC_STATIC,7,112,229,82, - BS_CENTER - GROUPBOX "Latest version",IDC_STATIC,7,239,229,24,BS_CENTER - CTEXT "0.xxx",IDC_LATEST,13,250,218,8 - GROUPBOX "Totals",IDC_STATIC,7,197,229,39,BS_CENTER - CTEXT "Upload: xx.xx MiB, Download: xx.xx MiB",IDC_TOTALS,13, - 208,218,8 - CTEXT "Ratio (Up/Down): x.xx",IDC_RATIO,13,221,218,8 - EDITTEXT IDC_THANKS,13,122,218,66,ES_MULTILINE | ES_READONLY | - WS_VSCROLL - CTEXT "Static",IDC_VERSION,13,37,218,54 - EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT - WS_BORDER - LTEXT "TTH:",IDC_STATIC,13,93,18,12 -END - -IDD_LINE DIALOGEX 0, 0, 239, 46 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Title" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Description",IDC_DESCRIPTION,7,7,168,32 - EDITTEXT IDC_LINE,13,18,156,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,182,7,50,14 - PUSHBUTTON "&Cancel",IDCANCEL,182,25,50,14 -END - -IDD_GENERALPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "General" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Personal information",IDC_SETTINGS_PERSONAL_INFORMATION, - 7,7,261,80 - RTEXT "Nick (Required)",IDC_SETTINGS_NICK,14,20,74,8 - EDITTEXT IDC_NICK,94,17,164,14,ES_AUTOHSCROLL - RTEXT "E-Mail",IDC_SETTINGS_EMAIL,14,37,74,8 - EDITTEXT IDC_EMAIL,94,34,164,14,ES_AUTOHSCROLL - RTEXT "Description",IDC_SETTINGS_DESCRIPTION,14,54,74,8 - EDITTEXT IDC_DESCRIPTION,94,51,164,14,ES_AUTOHSCROLL - RTEXT "Line speed (upload)",IDC_SETTINGS_UPLOAD_LINE_SPEED,14, - 70,74,8 - COMBOBOX IDC_CONNECTION,94,68,58,95,CBS_DROPDOWNLIST | - CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - LTEXT "idc_settings_mebibits",IDC_SETTINGS_MEBIBITS,156,71,102, - 8 -END - -IDD_ADVANCEDPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Advanced" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - CONTROL "",IDC_ADVANCED_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,7,7,261,211 -END - -IDD_DOWNLOADPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Downloads" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Directories",IDC_SETTINGS_DIRECTORIES,7,7,261,72 - LTEXT "Default download directory", - IDC_SETTINGS_DOWNLOAD_DIRECTORY,14,19,247,8 - EDITTEXT IDC_DOWNLOADDIR,14,28,197,14,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSEDIR,217,28,44,14 - LTEXT "Unfinished downloads directory (empty = download directly to target)", - IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY,14,46,247,8 - EDITTEXT IDC_TEMP_DOWNLOAD_DIRECTORY,14,56,197,14,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_BROWSETEMPDIR,217,56,44,14 - GROUPBOX "Limits",IDC_SETTINGS_DOWNLOAD_LIMITS,7,82,261,58 - EDITTEXT IDC_DOWNLOADS,14,93,29,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin1",IDC_SLOTSSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,35,91,11,14 - LTEXT "Maximum simultaneous downloads (0 = infinite)", - IDC_SETTINGS_DOWNLOADS_MAX,46,96,215,8 - EDITTEXT IDC_MAXSPEED,14,109,29,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin2",IDC_SPEEDSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,37,113,9,14 - LTEXT "No new downloads if speed exceeds (kiB/s, 0 = disable)", - IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE,46,112,218,8 - LTEXT "Note; because of changing download speeds, this is not 100% accurate...", - IDC_SETTINGS_SPEEDS_NOT_ACCURATE,14,127,247,8 - GROUPBOX "Public Hubs list",IDC_SETTINGS_PUBLIC_HUB_LIST,7,142, - 261,72 - LTEXT "Public Hubs list URL",IDC_SETTINGS_PUBLIC_HUB_LIST_URL, - 14,155,247,8 - PUSHBUTTON "idc_settings_list_config",IDC_SETTINGS_LIST_CONFIG,14, - 165,99,14 - LTEXT "HTTP Proxy (for hublist only)", - IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY,14,183,247,8 - EDITTEXT IDC_PROXY,14,192,247,14,ES_AUTOHSCROLL -END - -IDD_UPLOADPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Sharing" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Shared directories",IDC_SETTINGS_SHARED_DIRECTORIES,7,7, - 261,179 - CONTROL "List1",IDC_DIRECTORIES,"SysListView32",LVS_REPORT | - LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,14,17,247,120,WS_EX_ACCEPTFILES - LTEXT "Note; New files are added to the share only when they've been hashed!", - IDC_SETTINGS_ONLY_HASHED,14,142,226,8 - CONTROL "Share hidden files",IDC_SHAREHIDDEN,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,156,72,10 - LTEXT "Total size:",IDC_SETTINGS_SHARE_SIZE,14,170,33,8 - LTEXT "0 B",IDC_TOTAL,50,170,41,8 - PUSHBUTTON "&Rename",IDC_RENAME,119,166,44,14,WS_DISABLED - PUSHBUTTON "&Remove",IDC_REMOVE,167,166,44,14,WS_DISABLED - PUSHBUTTON "&Add folder",IDC_ADD,215,166,46,14 - RTEXT "Automatically open an extra slot if speed is below (0 = disable)", - IDC_SETTINGS_UPLOADS_MIN_SPEED,7,192,208,8 - EDITTEXT IDC_MIN_UPLOAD_SPEED,219,189,28,14,ES_AUTOHSCROLL - CONTROL "Spin1",IDC_MIN_UPLOAD_SPIN,"msctls_updown32", - UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS | UDS_NOTHOUSANDS,247,188,14,14 - LTEXT "kiB/s",IDC_SETTINGS_KBPS,249,192,19,8 - RTEXT "Upload slots",IDC_SETTINGS_UPLOADS_SLOTS,7,207,208,8 - EDITTEXT IDC_SLOTS,219,204,28,14,ES_NUMBER - CONTROL "Spin1",IDC_SLOTSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS,247,204,14,14 -END - -IDD_APPEARANCEPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Appearance" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Options",IDC_SETTINGS_APPEARANCE_OPTIONS,7,9,261,128 - CONTROL "",IDC_APPEARANCE_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,16,20,244, - 108 - GROUPBOX "Default away message",IDC_SETTINGS_DEFAULT_AWAY_MSG,7, - 141,165,32 - EDITTEXT IDC_DEFAULT_AWAY_MESSAGE,16,152,145,14,ES_MULTILINE | - ES_AUTOHSCROLL | WS_VSCROLL - GROUPBOX "Set timestamps",IDC_SETTINGS_TIME_STAMPS_FORMAT,174,141, - 96,32 - EDITTEXT IDC_TIME_STAMPS_FORMAT,180,152,80,15,ES_AUTOHSCROLL - GROUPBOX "Language file",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32 - EDITTEXT IDC_LANGUAGE,16,185,188,14,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSE,210,185,50,14 - LTEXT "Note; most of these options require that you restart DC++", - IDC_SETTINGS_REQUIRES_RESTART,7,210,253,8 -END - -IDD_APPEARANCE2PAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Colors and sounds" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Colors",IDC_SETTINGS_COLORS,7,7,261,50 - PUSHBUTTON "Select &window color",IDC_SELWINCOLOR,16,17,82,14 - PUSHBUTTON "Select &text style",IDC_SELTEXT,16,35,82,14 - LTEXT "Donate ???:s! (ok, $$$ is fine too =) (see help menu)", - IDC_COLOREXAMPLE,107,17,91,32,SS_NOPREFIX | SS_SUNKEN | - WS_BORDER | NOT WS_GROUP - PUSHBUTTON "Uploads",IDC_SETTINGS_UPLOAD_BAR_COLOR,209,17,51,14 - PUSHBUTTON "Downloads",IDC_SETTINGS_DOWNLOAD_BAR_COLOR,209,35,51,14 - GROUPBOX "Sounds",IDC_SETTINGS_SOUNDS,6,62,264,42 - CONTROL "Make an annoying sound every time a private message is received", - IDC_PRIVATE_MESSAGE_BEEP,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,18,74,246,10 - CONTROL "Make an annoying sound when a private message window is opened", - IDC_PRIVATE_MESSAGE_BEEP_OPEN,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,18,87,246,10 - GROUPBOX "Bold options",IDC_SETTINGS_BOLD_CONTENTS,5,106,263,98 - CONTROL "",IDC_BOLD_BOOLEANS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - WS_BORDER | WS_TABSTOP,10,117,254,81 - LTEXT "Note; most of these options require that you restart DC++", - IDC_SETTINGS_REQUIRES_RESTART,7,209,253,8 -END - -IDD_LOGPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Logs" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Logging",IDC_SETTINGS_LOGGING,6,3,264,214 - RTEXT "Directory",IDC_SETTINGS_LOG_DIR,18,14,39,8 - EDITTEXT IDC_LOG_DIRECTORY,60,13,150,12,ES_AUTOHSCROLL - PUSHBUTTON "&Browse...",IDC_BROWSE_LOG,216,13,41,12 - CONTROL "",IDC_LOG_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,60,30,198,89 - RTEXT "Format",IDC_SETTINGS_FORMAT,18,132,36,8,WS_TABSTOP - EDITTEXT IDC_LOG_FORMAT,60,129,198,12,ES_AUTOHSCROLL | WS_GROUP - RTEXT "File name",IDC_SETTINGS_FILE_NAME,18,145,36,8, - WS_TABSTOP - EDITTEXT IDC_LOG_FILE,60,145,198,12,ES_AUTOHSCROLL | WS_GROUP -END - -IDD_USER_COMMAND DIALOGEX 0, 0, 195, 295 -STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | - WS_CAPTION | WS_SYSMENU -CAPTION "Create / Modify Command" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "Command Type",IDC_SETTINGS_TYPE,7,7,181,37 - CONTROL "Separator",IDC_SETTINGS_SEPARATOR,"Button", - BS_AUTORADIOBUTTON,14,18,89,10 - CONTROL "Raw",IDC_SETTINGS_RAW,"Button",BS_AUTORADIOBUTTON,14,28, - 89,10 - CONTROL "Chat",IDC_SETTINGS_CHAT,"Button",BS_AUTORADIOBUTTON,103, - 18,78,10 - CONTROL "PM",IDC_SETTINGS_PM,"Button",BS_AUTORADIOBUTTON,103,28, - 78,10 - GROUPBOX "Context",IDC_SETTINGS_CONTEXT,7,44,181,37 - CONTROL "Hub Menu",IDC_SETTINGS_HUB_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,55,89,12 - CONTROL "User Menu",IDC_SETTINGS_USER_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,67,89,10 - CONTROL "Search Menu",IDC_SETTINGS_SEARCH_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,103,55,78,12 - CONTROL "Filelist Menu",IDC_SETTINGS_FILELIST_MENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,103,67,78,12 - GROUPBOX "Parameters",IDC_SETTINGS_PARAMETERS,7,82,181,138 - LTEXT "Name",IDC_SETTINGS_NAME,14,92,167,8 - EDITTEXT IDC_NAME,14,103,167,14,ES_AUTOHSCROLL - LTEXT "Command",IDC_SETTINGS_COMMAND,14,121,167,8 - EDITTEXT IDC_COMMAND,14,129,167,14,ES_MULTILINE | ES_AUTOHSCROLL | - WS_VSCROLL - LTEXT "Hub IP / DNS (empty = all, ""op"" = where op)", - IDC_SETTINGS_HUB,14,146,167,8 - EDITTEXT IDC_HUB,14,156,167,14,ES_AUTOHSCROLL - LTEXT "To",IDC_SETTINGS_TO,14,174,167,8 - EDITTEXT IDC_NICK,14,183,167,14,ES_AUTOHSCROLL - CONTROL "Send once per nick",IDC_SETTINGS_ONCE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,203,167,10 - GROUPBOX "Text sent to hub",IDC_USER_CMD_PREVIEW,7,223,181,34 - EDITTEXT IDC_RESULT,14,235,167,14,ES_AUTOHSCROLL | ES_READONLY - CONTROL "idc_user_cmd_open_help",IDC_USER_CMD_OPEN_HELP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,260,167,10 - DEFPUSHBUTTON "OK",IDOK,14,274,50,14 - PUSHBUTTON "Cancel",IDCANCEL,74,274,50,14 - PUSHBUTTON "Help",IDHELP,131,274,50,14 -END - -IDD_ADLS_PROPERTIES DIALOGEX 0, 0, 190, 125 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ADLSearch Properties" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "Search String",IDC_ADLSP_SEARCH,7,7,88,8 - EDITTEXT IDC_SEARCH_STRING,7,17,88,12,ES_AUTOHSCROLL - LTEXT "Source Type",IDC_ADLSP_TYPE,105,7,78,8 - COMBOBOX IDC_SOURCE_TYPE,105,17,78,78,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE - LTEXT "Min Filesize",IDC_ADLSP_SIZE_MIN,7,39,37,8 - EDITTEXT IDC_MIN_FILE_SIZE,7,50,41,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Max Filesize",IDC_ADLSP_SIZE_MAX,54,39,39,8 - EDITTEXT IDC_MAX_FILE_SIZE,53,50,41,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Size Type",IDC_ADLSP_UNITS,105,39,78,8 - COMBOBOX IDC_SIZE_TYPE,105,50,78,68,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP,WS_EX_CLIENTEDGE - LTEXT "Destination Directory",IDC_ADLSP_DESTINATION,8,72,87,8 - EDITTEXT IDC_DEST_DIR,7,83,88,12,ES_AUTOHSCROLL - CONTROL "Enabled",IDC_IS_ACTIVE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,105,72,78,10 - CONTROL "Download Matches",IDC_AUTOQUEUE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,105,87,77,10 - DEFPUSHBUTTON "OK",IDOK,32,104,50,14 - PUSHBUTTON "Cancel",IDCANCEL,88,104,50,14 -END - -IDD_UCPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - CONTROL "",IDC_MENU_ITEMS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,261,192 - PUSHBUTTON "&Add",IDC_ADD_MENU,7,204,50,14 - PUSHBUTTON "Chang&e",IDC_CHANGE_MENU,59,204,50,14 - PUSHBUTTON "Move &Up",IDC_MOVE_UP,111,204,50,14 - PUSHBUTTON "Move &Down",IDC_MOVE_DOWN,163,204,50,14 - PUSHBUTTON "&Remove",IDC_REMOVE_MENU,215,204,50,14 -END - -IDD_FAVORITEHUB DIALOGEX 0, 0, 201, 163 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Favorite Hub Properties" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Hub",IDC_FH_HUB,7,7,187,62 - RTEXT "Name",IDC_FH_NAME,12,21,40,8 - EDITTEXT IDC_HUBNAME,56,19,131,12,ES_AUTOHSCROLL - RTEXT "Address",IDC_FH_ADDRESS,12,36,40,8 - EDITTEXT IDC_HUBADDR,56,34,131,12,ES_AUTOHSCROLL - RTEXT "Description",IDC_FH_HUB_DESC,12,51,40,8 - EDITTEXT IDC_HUBDESCR,56,49,131,12,ES_AUTOHSCROLL - GROUPBOX "Identification (leave blank for defaults)",IDC_FH_IDENT, - 7,74,187,63 - RTEXT "Nick",IDC_FH_NICK,12,89,40,8 - EDITTEXT IDC_HUBNICK,56,87,131,12 - RTEXT "Password",IDC_FH_PASSWORD,12,104,40,8 - EDITTEXT IDC_HUBPASS,56,102,131,12,ES_PASSWORD - RTEXT "Description",IDC_FH_USER_DESC,16,119,36,8 - EDITTEXT IDC_HUBUSERDESCR,56,117,131,12,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,90,142,50,14 - PUSHBUTTON "Cancel",IDCANCEL,144,142,50,14 -END - -IDD_MAGNET DIALOGEX 0, 0, 250, 143 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "",IDC_STATIC,6,0,240,138 - ICON IDI_MAGNET,IDC_STATIC,22,14,21,20 - LTEXT "Static",IDC_MAGNET_TEXT,60,12,174,24 - RTEXT "Static",IDC_MAGNET_HASH,15,44,36,8 - EDITTEXT IDC_MAGNET_DISP_HASH,56,42,178,12,ES_AUTOHSCROLL | - ES_READONLY - RTEXT "Static",IDC_MAGNET_NAME,15,62,36,8 - EDITTEXT IDC_MAGNET_DISP_NAME,56,60,178,12,ES_AUTOHSCROLL | - ES_READONLY - CONTROL "Radio1",IDC_MAGNET_QUEUE,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,84,162,10 - CONTROL "Radio2",IDC_MAGNET_SEARCH,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,96,162,10 - CONTROL "Radio3",IDC_MAGNET_NOTHING,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,18,107,162,11 - CONTROL "Check1",IDC_MAGNET_REMEMBER,"Button",BS_AUTO3STATE | - WS_TABSTOP,18,120,162,10 - DEFPUSHBUTTON "OK",IDOK,184,88,50,14 - PUSHBUTTON "Cancel",IDCANCEL,184,112,50,14 -END - -IDD_HASH_PROGRESS DIALOGEX 0, 0, 430, 113 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "Creating file index..." -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "Please wait while DC++ indexes your files (they won't be shared until they've been indexed)...", - IDC_HASH_INDEXING,7,7,416,8 - LTEXT "Current file...",IDC_CURRENT_FILE,7,19,416,8 - GROUPBOX "Statistics",IDC_STATISTICS,7,30,416,40 - LTEXT "0.0 files/hour",IDC_FILES_PER_HOUR,14,39,376,8 - LTEXT "0.0 MiB/s",IDC_HASH_SPEED,14,48,376,8 - LTEXT "0:00:00 left",IDC_TIME_LEFT,14,57,376,8 - CONTROL "",IDC_HASH_PROGRESS,"msctls_progress32",WS_BORDER | 0x1, - 7,74,416,14 - DEFPUSHBUTTON "Run in background",IDOK,147,92,109,14 -END - -IDD_HUB_LIST DIALOGEX 0, 0, 262, 185 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "idd_hub_list" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "idc_list_desc",IDC_LIST_DESC,6,0,252,180 - EDITTEXT IDC_LIST_EDIT_BOX,12,12,180,14,ES_AUTOHSCROLL | - ES_WANTRETURN - PUSHBUTTON "idc_list_add",IDC_LIST_ADD,198,12,50,14 - CONTROL "",IDC_LIST_LIST,"SysListView32",LVS_REPORT | - LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | - WS_TABSTOP,12,36,180,138 - PUSHBUTTON "idc_list_up",IDC_LIST_UP,198,36,50,14 - PUSHBUTTON "idc_list_down",IDC_LIST_DOWN,198,54,50,14 - PUSHBUTTON "idc_list_edit",IDC_LIST_EDIT,198,73,50,14 - PUSHBUTTON "idc_list_remove",IDC_LIST_REMOVE,198,90,50,14 - DEFPUSHBUTTON "OK",IDOK,198,138,50,14 - PUSHBUTTON "Cancel",IDCANCEL,198,156,50,14 -END - -IDD_FAVORITE_DIRSPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Download to..." -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Download to directories", - IDC_SETTINGS_FAVORITE_DIRECTORIES,6,6,262,210 - CONTROL "List1",IDC_FAVORITE_DIRECTORIES,"SysListView32", - LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | - WS_BORDER | WS_TABSTOP,12,18,246,168,WS_EX_ACCEPTFILES - PUSHBUTTON "&Rename",IDC_RENAME,114,192,46,14,WS_DISABLED - PUSHBUTTON "&Remove",IDC_REMOVE,165,192,44,14,WS_DISABLED - PUSHBUTTON "&Add folder",IDC_ADD,213,192,46,14 -END - -IDD_ADVANCED3PAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Experts only" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - RTEXT "Rollback",IDC_SETTINGS_ROLLBACK,7,10,57,8 - EDITTEXT IDC_ROLLBACK,69,7,45,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "B",IDC_SETTINGS_B,117,10,8,8 - RTEXT "Max Hash Speed",IDC_SETTINGS_MAX_HASH_SPEED,7,27,57,8,0, - WS_EX_RIGHT - EDITTEXT IDC_MAX_HASH_SPEED,69,24,45,14,ES_AUTOHSCROLL - LTEXT "MiB/s",IDC_SETTINGS_MBS,117,27,20,8 - RTEXT "PM history",IDC_SETTINGS_PM_HISTORY,7,44,57,8 - EDITTEXT IDC_SHOW_LAST_LINES_LOG,69,41,45,14,ES_AUTOHSCROLL - RTEXT "Mini slot size",IDC_SETTINGS_TEXT_MINISLOT,7,61,57,8 - EDITTEXT IDC_SET_MINISLOT_SIZE,69,58,45,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB2,117,61,14,8 - RTEXT "Max filelist size",IDC_SETTINGS_MAX_FILELIST_SIZE,7,78, - 57,8 - EDITTEXT IDC_MAX_FILELIST_SIZE,69,75,45,14,ES_AUTOHSCROLL - LTEXT "MiB",IDC_SETTINGS_MB,117,78,14,8 - LTEXT "PID",IDC_STATIC,52,95,12,8 - EDITTEXT IDC_PRIVATE_ID,69,92,45,14,ES_AUTOHSCROLL - RTEXT "File write buffer",IDC_SETTINGS_WRITE_BUFFER,139,10,65, - 8 - EDITTEXT IDC_BUFFERSIZE,208,7,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB,252,10,10,8 - RTEXT "Max tab rows",IDC_SETTINGS_MAX_TAB_ROWS,139,27,65,8 - EDITTEXT IDC_MAX_TAB_ROWS,208,24,41,14,ES_AUTOHSCROLL - RTEXT "Search history",IDC_SETTINGS_SEARCH_HISTORY,139,44,65,8 - EDITTEXT IDC_SEARCH_HISTORY,208,41,41,14,ES_AUTOHSCROLL - CONTROL "",IDC_SEARCH_HISTORY_SPIN,"msctls_updown32", - UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS | UDS_NOTHOUSANDS,246,41,11,14 - RTEXT "Bind address",IDC_SETTINGS_BIND_ADDRESS,139,61,65,8 - EDITTEXT IDC_BIND_ADDRESS,208,58,41,14,ES_AUTOHSCROLL - RTEXT "Socket read buffer",IDC_SETTINGS_SOCKET_IN_BUFFER,131, - 78,73,8 - EDITTEXT IDC_SOCKET_IN_BUFFER,208,75,41,14,ES_AUTOHSCROLL - LTEXT "B",IDC_STATIC,252,78,8,8 - RTEXT "Socket write buffer",IDC_SETTINGS_SOCKET_OUT_BUFFER,128, - 96,76,8 - EDITTEXT IDC_SOCKET_OUT_BUFFER,208,93,41,14,ES_AUTOHSCROLL - LTEXT "B",IDC_STATIC,252,96,8,8 - LTEXT "Auto refresh time",IDC_SETTINGS_AUTO_REFRESH_TIME,7,113, - 57,8 - EDITTEXT IDC_AUTO_REFRESH_TIME,69,110,45,14,ES_AUTOHSCROLL - EDITTEXT IDC_AUTO_SEARCH_LIMIT,208,111,41,14,ES_AUTOHSCROLL - LTEXT "Auto-search limit",IDC_SETTINGS_AUTO_SEARCH_LIMIT,148, - 113,56,13 -END - -IDD_NETWORKPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Incoming Connection Settings (See help / FAQ if unsure)", - IDC_SETTINGS_INCOMING,7,7,261,113 - CONTROL "Direct connection",IDC_DIRECT,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,20,148,10 - CONTROL "Firewall with UPnP (WinXP+ only)",IDC_FIREWALL_UPNP, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,33,143,10 - CONTROL "Firewall with manual port forwarding",IDC_FIREWALL_NAT, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,47,143,10 - CONTROL "Firewall (passive mode, worst case)", - IDC_FIREWALL_PASSIVE,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,12,103,249,10 - LTEXT "Ports",IDC_SETTINGS_PORTS,230,17,18,8 - LTEXT "TCP",IDC_SETTINGS_PORT_TCP,209,31,15,8,NOT WS_GROUP - EDITTEXT IDC_PORT_TCP,230,28,29,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "UDP",IDC_SETTINGS_PORT_UDP,209,48,16,8 - EDITTEXT IDC_PORT_UDP,230,45,30,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "External / WAN IP",IDC_SETTINGS_IP,59,59,68,8,NOT - WS_GROUP - EDITTEXT IDC_EXTERNAL_IP,59,69,99,14,ES_AUTOHSCROLL - CONTROL "Don't allow hub/UPnP to override",IDC_OVERRIDE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,59,86,150,10 - GROUPBOX "Outgoing Connection Settings",IDC_SETTINGS_OUTGOING,7, - 126,261,95 - CONTROL "Direct Connection",IDC_DIRECT_OUT,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,139,153,10 - CONTROL "Socks 5",IDC_SOCKS5,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,12,152,40,8 - LTEXT "Server IP",IDC_SETTINGS_SOCKS5_IP,59,152,85,8 - EDITTEXT IDC_SOCKS_SERVER,59,162,85,14,ES_AUTOHSCROLL - LTEXT "Port",IDC_SETTINGS_SOCKS5_PORT,153,152,29,8 - EDITTEXT IDC_SOCKS_PORT,153,162,29,14,ES_AUTOHSCROLL - LTEXT "Username",IDC_SETTINGS_SOCKS5_USERNAME,59,179,84,8 - EDITTEXT IDC_SOCKS_USER,59,190,85,14,ES_AUTOHSCROLL - LTEXT "Password",IDC_SETTINGS_SOCKS5_PASSWORD,153,178,71,8 - EDITTEXT IDC_SOCKS_PASSWORD,153,190,71,14,ES_AUTOHSCROLL - CONTROL "Use SOCKS5 server to resolve hostnames", - IDC_SOCKS_RESOLVE,"Button",BS_AUTOCHECKBOX | WS_GROUP | - WS_TABSTOP,59,207,165,10 - LTEXT "TLS",IDC_SETTINGS_PORT_TLS,209,64,21,8 - EDITTEXT IDC_PORT_TLS,230,61,30,14,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_WINDOWSPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Windows" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Auto-open at startup",IDC_SETTINGS_AUTO_OPEN,7,7,261,68 - CONTROL "",IDC_WINDOWS_STARTUP,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,13,17,248,53 - GROUPBOX "Window options",IDC_SETTINGS_WINDOWS_OPTIONS,7,76,261, - 68 - CONTROL "",IDC_WINDOWS_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,13,86,248,53 - GROUPBOX "Confirmation dialog options", - IDC_SETTINGS_CONFIRM_OPTIONS,7,146,261,65 - CONTROL "",IDC_CONFIRM_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,13,157,248,48 -END - -IDD_QUEUEPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE -CAPTION "Queue" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Autoprio settings",IDC_SETTINGS_AUTOPRIO,3,3,267,46 - RTEXT "Highest prio max size",IDC_SETTINGS_PRIO_HIGHEST,7,15, - 72,8 - EDITTEXT IDC_PRIO_HIGHEST_SIZE,84,12,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB3,128,15,10,8 - RTEXT "Normal prio max size",IDC_SETTINGS_PRIO_NORMAL,7,32,72, - 8 - EDITTEXT IDC_PRIO_NORMAL_SIZE,84,29,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB5,128,32,10,8 - RTEXT "High prio max size",IDC_SETTINGS_PRIO_HIGH,147,15,57,8 - EDITTEXT IDC_PRIO_HIGH_SIZE,208,12,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB4,252,15,10,8 - RTEXT "Low prio max size",IDC_SETTINGS_PRIO_LOW,147,32,57,8 - EDITTEXT IDC_PRIO_LOW_SIZE,208,29,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB6,252,32,10,8 - GROUPBOX "Autodrop settings",IDC_SETTINGS_AUTODROP,3,51,267,63 - RTEXT "Drop sources below",IDC_SETTINGS_AUTODROP_SPEED,7,63,72, - 8 - EDITTEXT IDC_AUTODROP_SPEED,84,60,41,14,ES_AUTOHSCROLL - LTEXT "B/s",IDC_SETTINGS_BPS,128,63,15,8 - RTEXT "Min elapsed",IDC_SETTINGS_AUTODROP_ELAPSED,7,80,72,8 - EDITTEXT IDC_AUTODROP_ELAPSED,84,77,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S2,128,80,15,8 - RTEXT "Min sources online",IDC_SETTINGS_AUTODROP_MINSOURCES,7, - 97,72,8 - EDITTEXT IDC_AUTODROP_MINSOURCES,84,94,41,14,ES_AUTOHSCROLL - RTEXT "Check every",IDC_SETTINGS_AUTODROP_INTERVAL,147,63,57,8 - EDITTEXT IDC_AUTODROP_INTERVAL,208,60,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S1,252,63,10,8 - RTEXT "Max inactivity",IDC_SETTINGS_AUTODROP_INACTIVITY,147,80, - 57,8 - EDITTEXT IDC_AUTODROP_INACTIVITY,208,77,41,14,ES_AUTOHSCROLL - LTEXT "s",IDC_SETTINGS_S3,252,80,15,8 - RTEXT "Min filesize",IDC_SETTINGS_AUTODROP_FILESIZE,147,97,57, - 8 - EDITTEXT IDC_AUTODROP_FILESIZE,208,94,41,14,ES_AUTOHSCROLL - LTEXT "KiB",IDC_SETTINGS_KB7,252,97,15,8 - GROUPBOX "Other queue options",IDC_SETTINGS_OTHER_QUEUE_OPTIONS,3, - 116,267,102 - CONTROL "",IDC_OTHER_QUEUE_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | - LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,9,126,255,86 -END - -IDD_CERTIFICATESPAGE DIALOGEX 0, 0, 275, 225 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -EXSTYLE WS_EX_STATICEDGE -CAPTION "Security Certificates" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - EDITTEXT IDC_TLS_PRIVATE_KEY_FILE,102,7,141,14,ES_AUTOHSCROLL - EDITTEXT IDC_TLS_CERTIFICATE_FILE,102,24,141,14,ES_AUTOHSCROLL - EDITTEXT IDC_TLS_TRUSTED_CERTIFICATES_PATH,102,42,141,14, - ES_AUTOHSCROLL - LTEXT "Private key file",IDC_STATIC,50,10,48,8 - LTEXT "Own certificate file",IDC_STATIC,37,27,61,8 - LTEXT "Trusted certificates path",IDC_STATIC,18,45,80,8 - LTEXT "Under construction, restart dc++ to see effects...", - IDC_STATIC,7,186,163,8 - LTEXT "Experimental feature, don't consider DC++ secure in any way", - IDC_STATIC,7,201,200,8 - CONTROL "",IDC_TLS_OPTIONS,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,89,261,90 - PUSHBUTTON "Generate certificates",IDC_GENERATE_CERTS,184,62,84,14 - PUSHBUTTON "...",IDC_BROWSE_PRIVATE_KEY,247,7,21,14 - PUSHBUTTON "...",IDC_BROWSE_CERTIFICATE,247,24,21,14 - PUSHBUTTON "...",IDC_BROWSE_TRUSTED_PATH,248,42,20,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 236 - VERTGUIDE, 13 - VERTGUIDE, 231 - TOPMARGIN, 7 - BOTTOMMARGIN, 280 - END - - IDD_LINE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 232 - TOPMARGIN, 7 - BOTTOMMARGIN, 39 - END - - IDD_GENERALPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 88 - VERTGUIDE, 94 - VERTGUIDE, 156 - VERTGUIDE, 171 - VERTGUIDE, 258 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_ADVANCEDPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 64 - VERTGUIDE, 69 - VERTGUIDE, 114 - VERTGUIDE, 117 - VERTGUIDE, 204 - VERTGUIDE, 208 - VERTGUIDE, 249 - VERTGUIDE, 252 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_DOWNLOADPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 46 - VERTGUIDE, 211 - VERTGUIDE, 217 - VERTGUIDE, 230 - VERTGUIDE, 234 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 217 - END - - IDD_UPLOADPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 14 - VERTGUIDE, 215 - VERTGUIDE, 219 - VERTGUIDE, 247 - VERTGUIDE, 249 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_APPEARANCEPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 16 - VERTGUIDE, 260 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_LOGPAGE, DIALOG - BEGIN - VERTGUIDE, 18 - VERTGUIDE, 60 - VERTGUIDE, 258 - END - - IDD_USER_COMMAND, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 188 - VERTGUIDE, 14 - VERTGUIDE, 103 - VERTGUIDE, 181 - VERTGUIDE, 188 - TOPMARGIN, 7 - BOTTOMMARGIN, 288 - HORZGUIDE, 18 - HORZGUIDE, 28 - HORZGUIDE, 44 - HORZGUIDE, 55 - HORZGUIDE, 67 - HORZGUIDE, 82 - HORZGUIDE, 257 - END - - IDD_ADLS_PROPERTIES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 183 - VERTGUIDE, 105 - TOPMARGIN, 7 - BOTTOMMARGIN, 118 - END - - IDD_UCPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_FAVORITEHUB, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 194 - VERTGUIDE, 12 - VERTGUIDE, 52 - VERTGUIDE, 56 - TOPMARGIN, 7 - BOTTOMMARGIN, 156 - END - - IDD_MAGNET, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 243 - VERTGUIDE, 234 - TOPMARGIN, 7 - BOTTOMMARGIN, 136 - END - - IDD_HASH_PROGRESS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 423 - VERTGUIDE, 14 - VERTGUIDE, 390 - TOPMARGIN, 7 - BOTTOMMARGIN, 106 - END - - IDD_HUB_LIST, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 255 - VERTGUIDE, 12 - VERTGUIDE, 144 - VERTGUIDE, 150 - TOPMARGIN, 7 - BOTTOMMARGIN, 178 - END - - IDD_ADVANCED3PAGE, DIALOG - BEGIN - VERTGUIDE, 64 - VERTGUIDE, 69 - VERTGUIDE, 114 - VERTGUIDE, 117 - VERTGUIDE, 204 - VERTGUIDE, 208 - VERTGUIDE, 249 - VERTGUIDE, 252 - END - - IDD_NETWORKPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - VERTGUIDE, 12 - VERTGUIDE, 59 - VERTGUIDE, 209 - VERTGUIDE, 230 - VERTGUIDE, 268 - END - - IDD_WINDOWSPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 13 - VERTGUIDE, 261 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_QUEUEPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END - - IDD_CERTIFICATESPAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 268 - VERTGUIDE, 98 - VERTGUIDE, 102 - TOPMARGIN, 7 - BOTTOMMARGIN, 218 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,2 - PRODUCTVERSION 0,6,9,2 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "http://dcplusplus.sourceforge.net" - VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 2" - VALUE "InternalName", "DC++" - VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" - VALUE "OriginalFilename", "DCPlusPlus.exe" - VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 2" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS -BEGIN - "P", ID_FILE_CONNECT, VIRTKEY, CONTROL, NOINVERT - "Q", ID_FILE_QUICK_CONNECT, VIRTKEY, CONTROL, NOINVERT - "R", ID_FILE_RECONNECT, VIRTKEY, CONTROL, NOINVERT - "S", ID_FILE_SEARCH, VIRTKEY, CONTROL, NOINVERT - "2", ID_VIEW_STATUS_BAR, VIRTKEY, CONTROL, NOINVERT - "1", ID_VIEW_TOOLBAR, VIRTKEY, CONTROL, NOINVERT - "3", ID_VIEW_TRANSFER_VIEW, VIRTKEY, CONTROL, NOINVERT - "F", IDC_FAVORITES, VIRTKEY, CONTROL, NOINVERT - "U", IDC_FAVUSERS, VIRTKEY, CONTROL, NOINVERT - "T", IDC_FOLLOW, VIRTKEY, CONTROL, NOINVERT - "N", IDC_NOTEPAD, VIRTKEY, CONTROL, NOINVERT - "D", IDC_QUEUE, VIRTKEY, CONTROL, NOINVERT - "E", IDC_REFRESH_FILE_LIST, VIRTKEY, CONTROL, NOINVERT - "S", IDC_SEND_MESSAGE, VIRTKEY, ALT, NOINVERT - "L", IDC_OPEN_FILE_LIST, VIRTKEY, CONTROL, NOINVERT -END - -IDR_PUBLICHUBS ACCELERATORS -BEGIN - "C", IDC_PUB_LIST_CONFIG, VIRTKEY, ALT, NOINVERT - "I", IDC_FILTER_FOCUS, VIRTKEY, ALT, NOINVERT - "R", IDC_REFRESH, VIRTKEY, ALT, NOINVERT -END - -IDR_ADLSEARCH ACCELERATORS -BEGIN - "N", IDC_ADD, VIRTKEY, ALT, NOINVERT - "P", IDC_EDIT, VIRTKEY, ALT, NOINVERT - "H", IDC_HELP_FAQ, VIRTKEY, ALT, NOINVERT - "D", IDC_MOVE_DOWN, VIRTKEY, ALT, NOINVERT - "U", IDC_MOVE_UP, VIRTKEY, ALT, NOINVERT - "R", IDC_REMOVE, VIRTKEY, ALT, NOINVERT -END - -IDR_FAVORITES ACCELERATORS -BEGIN - "N", IDC_NEWFAV, VIRTKEY, ALT, NOINVERT - "P", IDC_EDIT, VIRTKEY, ALT, NOINVERT - "R", IDC_REMOVE, VIRTKEY, ALT, NOINVERT - "U", IDC_MOVE_UP, VIRTKEY, ALT, NOINVERT - "D", IDC_MOVE_DOWN, VIRTKEY, ALT, NOINVERT - "C", IDC_CONNECT, VIRTKEY, ALT, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "res\\DCPlusPlus.Manifest" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Copied: dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc (from rev 632, dcplusplus/trunk/DCPlusPlus.rc) =================================================================== --- dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc (rev 0) +++ dcplusplus/tags/dcplusplus-0.693/DCPlusPlus.rc 2006-07-09 12:04:27 UTC (rev 633) @@ -0,0 +1,1050 @@ +// Microsoft Visual C++ generated resource script. +// +#include "windows\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "wtl\\atlres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "windows\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""wtl\\\\atlres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_FOLDERS BITMAP "res\\folders.bmp" +IDB_ARROWS BITMAP "res\\arrows.bmp" +IDB_USERS BITMAP "res\\users.bmp" +IDB_TOOLBAR BITMAP "res\\toolbar.bmp" +IDB_TOOLBAR20 BITMAP "res\\toolbar20.bmp" +IDB_TOOLBAR20_HOT BITMAP "res\\toolbar20-highlight.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\DCPlusPlus.ico" +IDR_PUBLICHUBS ICON "res\\PublicHubs.ico" +IDR_SEARCH ICON "res\\search.ico" +IDR_FAVORITES ICON "res\\Favorites.ico" +IDR_PRIVATE ICON "res\\User.ico" +IDR_DIRECTORY ICON "res\\Directory.ico" +IDR_HUB ICON "res\\Hub.ico" +IDR_NOTEPAD ICON "res\\notepad.ico" +IDR_QUEUE ICON "res\\queue.ico" +IDR_FINISHED_DL ICON "res\\FinishedDL.ico" +IDR_ADLSEARCH ICON "res\\ADLSearch.ico" +IDR_FINISHED_UL ICON "res\\FinishedUL.ico" +IDR_USERS ICON "res\\FavoriteUser.ico" +IDR_SPY ICON "res\\searchspy.ico" +IDR_NET_STATS ICON "res\\netstats.ico" +IDR_WAITING_USERS ICON "res\\wuicon.ico" +IDI_MAGNET ICON "res\\magnet.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 243, 287 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,96,266,50,14 + ICON IDR_MAINFRAME,IDC_STATIC,110,15,21,20 + GROUPBOX "",IDC_STATIC,7,7,229,102 + GROUPBOX "Greetz && Contributors",IDC_STATIC,7,112,229,82, + BS_CENTER + GROUPBOX "Latest version",IDC_STATIC,7,239,229,24,BS_CENTER + CTEXT "0.xxx",IDC_LATEST,13,250,218,8 + GROUPBOX "Totals",IDC_STATIC,7,197,229,39,BS_CENTER + CTEXT "Upload: xx.xx MiB, Download: xx.xx MiB",IDC_TOTALS,13, + 208,218,8 + CTEXT "Ratio (Up/Down): x.xx",IDC_RATIO,13,221,218,8 + EDITTEXT IDC_THANKS,13,122,218,66,ES_MULTILINE | ES_READONLY | + WS_VSCROLL + CTEXT "Static",IDC_VERSION,13,37,218,54 + EDITTEXT IDC_TTH,35,93,196,12,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_BORDER + LTEXT "TTH:",IDC_STATIC,13,93,18,12 +END + +IDD_LINE DIALOGEX 0, 0, 239, 46 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Title" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Description",IDC_DESCRIPTION,7,7,168,32 + EDITTEXT IDC_LINE,13,18,156,14,ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,182,7,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,182,25,50,14 +END + +IDD_GENERALPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Personal information",IDC_SETTINGS_PERSONAL_INFORMATION, + 7,7,261,80 + RTEXT "Nick (Required)",IDC_SETTINGS_NICK,14,20,74,8 + EDITTEXT IDC_NICK,94,17,164,14,ES_AUTOHSCROLL + RTEXT "E-Mail",IDC_SETTINGS_EMAIL,14,37,74,8 + EDITTEXT IDC_EMAIL,94,34,164,14,ES_AUTOHSCROLL + RTEXT "Description",IDC_SETTINGS_DESCRIPTION,14,54,74,8 + EDITTEXT IDC_DESCRIPTION,94,51,164,14,ES_AUTOHSCROLL + RTEXT "Line speed (upload)",IDC_SETTINGS_UPLOAD_LINE_SPEED,14, + 70,74,8 + COMBOBOX IDC_CONNECTION,94,68,58,95,CBS_DROPDOWNLIST | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + LTEXT "idc_settings_mebibits",IDC_SETTINGS_MEBIBITS,156,71,102, + 8 +END + +IDD_ADVANCEDPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Advanced" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "",IDC_ADVANCED_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,7,7,261,211 +END + +IDD_DOWNLOADPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Downloads" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Directories",IDC_SETTINGS_DIRECTORIES,7,7,261,72 + LTEXT "Default download directory", + IDC_SETTINGS_DOWNLOAD_DIRECTORY,14,19,247,8 + EDITTEXT IDC_DOWNLOADDIR,14,28,197,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSEDIR,217,28,44,14 + LTEXT "Unfinished downloads directory (empty = download directly to target)", + IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY,14,46,247,8 + EDITTEXT IDC_TEMP_DOWNLOAD_DIRECTORY,14,56,197,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSETEMPDIR,217,56,44,14 + GROUPBOX "Limits",IDC_SETTINGS_DOWNLOAD_LIMITS,7,82,261,58 + EDITTEXT IDC_DOWNLOADS,14,93,29,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_SLOTSSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,35,91,11,14 + LTEXT "Maximum simultaneous downloads (0 = infinite)", + IDC_SETTINGS_DOWNLOADS_MAX,46,96,215,8 + EDITTEXT IDC_MAXSPEED,14,109,29,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SPEEDSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,37,113,9,14 + LTEXT "No new downloads if speed exceeds (kiB/s, 0 = disable)", + IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE,46,112,218,8 + LTEXT "Note; because of changing download speeds, this is not 100% accurate...", + IDC_SETTINGS_SPEEDS_NOT_ACCURATE,14,127,247,8 + GROUPBOX "Public Hubs list",IDC_SETTINGS_PUBLIC_HUB_LIST,7,142, + 261,72 + LTEXT "Public Hubs list URL",IDC_SETTINGS_PUBLIC_HUB_LIST_URL, + 14,155,247,8 + PUSHBUTTON "idc_settings_list_config",IDC_SETTINGS_LIST_CONFIG,14, + 165,99,14 + LTEXT "HTTP Proxy (for hublist only)", + IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY,14,183,247,8 + EDITTEXT IDC_PROXY,14,192,247,14,ES_AUTOHSCROLL +END + +IDD_UPLOADPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE +CAPTION "Sharing" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Shared directories",IDC_SETTINGS_SHARED_DIRECTORIES,7,7, + 261,179 + CONTROL "List1",IDC_DIRECTORIES,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,14,17,247,120,WS_EX_ACCEPTFILES + LTEXT "Note; New files are added to the share only when they've been hashed!", + IDC_SETTINGS_ONLY_HASHED,14,142,226,8 + CONTROL "Share hidden files",IDC_SHAREHIDDEN,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,156,72,10 + LTEXT "Total size:",IDC_SETTINGS_SHARE_SIZE,14,170,33,8 + LTEXT "0 B",IDC_TOTAL,50,170,41,8 + PUSHBUTTON "&Rename",IDC_RENAME,119,166,44,14,WS_DISABLED + PUSHBUTTON "&Remove",IDC_REMOVE,167,166,44,14,WS_DISABLED + PUSHBUTTON "&Add folder",IDC_ADD,215,166,46,14 + RTEXT "Automatically open an extra slot if speed is below (0 = disable)", + IDC_SETTINGS_UPLOADS_MIN_SPEED,7,192,208,8 + EDITTEXT IDC_MIN_UPLOAD_SPEED,219,189,28,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_MIN_UPLOAD_SPIN,"msctls_updown32", + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | + UDS_ARROWKEYS | UDS_NOTHOUSANDS,247,188,14,14 + LTEXT "kiB/s",IDC_SETTINGS_KBPS,249,192,19,8 + RTEXT "Upload slots",IDC_SETTINGS_UPLOADS_SLOTS,7,207,208,8 + EDITTEXT IDC_SLOTS,219,204,28,14,ES_NUMBER + CONTROL "Spin1",IDC_SLOTSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + UDS_NOTHOUSANDS,247,204,14,14 +END + +IDD_APPEARANCEPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Appearance" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Options",IDC_SETTINGS_APPEARANCE_OPTIONS,7,9,261,128 + CONTROL "",IDC_APPEARANCE_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,16,20,244, + 108 + GROUPBOX "Default away message",IDC_SETTINGS_DEFAULT_AWAY_MSG,7, + 141,165,32 + EDITTEXT IDC_DEFAULT_AWAY_MESSAGE,16,152,145,14,ES_MULTILINE | + ES_AUTOHSCROLL | WS_VSCROLL + GROUPBOX "Set timestamps",IDC_SETTINGS_TIME_STAMPS_FORMAT,174,141, + 96,32 + EDITTEXT IDC_TIME_STAMPS_FORMAT,180,152,80,15,ES_AUTOHSCROLL + GROUPBOX "Language file",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32 + EDITTEXT IDC_LANGUAGE,16,185,188,14,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSE,210,185,50,14 + LTEXT "Note; most of these options require that you restart DC++", + IDC_SETTINGS_REQUIRES_RESTART,7,210,253,8 +END + +IDD_APPEARANCE2PAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_ACCEPTFILES | WS_EX_STATICEDGE +CAPTION "Colors and sounds" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Colors",IDC_SETTINGS_COLORS,7,7,261,50 + PUSHBUTTON "Select &window color",IDC_SELWINCOLOR,16,17,82,14 + PUSHBUTTON "Select &text style",IDC_SELTEXT,16,35,82,14 + LTEXT "Donate ???:s! (ok, $$$ is fine too =) (see help menu)", + IDC_COLOREXAMPLE,107,17,91,32,SS_NOPREFIX | SS_SUNKEN | + WS_BORDER | NOT WS_GROUP + PUSHBUTTON "Uploads",IDC_SETTINGS_UPLOAD_BAR_COLOR,209,17,51,14 + PUSHBUTTON "Downloads",IDC_SETTINGS_DOWNLOAD_BAR_COLOR,209,35,51,14 + GROUPBOX "Sounds",IDC_SETTINGS_SOUNDS,6,62,264,42 + CONTROL "Make an annoying sound every time a private message is received", + IDC_PRIVATE_MESSAGE_BEEP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,74,246,10 + CONTROL "Make an annoying sound when a private message window is opened", + IDC_PRIVATE_MESSAGE_BEEP_OPEN,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,18,87,246,10 + GROUPBOX "Bold options",IDC_SETTINGS_BOLD_CONTENTS,5,106,263,98 + CONTROL "",IDC_BOLD_BOOLEANS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | + WS_BORDER | WS_TABSTOP,10,117,254,81 + LTEXT "Note; most of these options require that you restart DC++", + IDC_SETTINGS_REQUIRES_RESTART,7,209,253,8 +END + +IDD_LOGPAGE DIALOGEX 0, 0, 275, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +EXSTYLE WS_EX_STATICEDGE +CAPTION "Logs" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Logging",IDC_SETTINGS_LOGGING,6,3,264,214 + RTEXT "Directory",IDC_SETTINGS_LOG_DIR,18,14,39,8 + EDITTEXT IDC_LOG_DIRECTORY,60,13,150,12,ES_AUTOHSCROLL + PUSHBUTTON "&Browse...",IDC_BROWSE_LOG,216,13,41,12 + CONTROL "",IDC_LOG_OPTIONS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,60,30,198,89 + RTEXT "Format",IDC_SETTINGS_FORMAT,18,132,36,8,WS_TABSTOP + EDITTEXT IDC_LOG_FORMAT,60,129,198,12,ES_AUTOHSCROLL | WS_GROUP + RTEXT "File name",IDC_SETTINGS_FILE_NAME,18,145,36,8, + WS_TABSTOP + EDITTEXT IDC_LOG_FILE,60,145,198,12,ES_AUTOHSCROLL | WS_GROUP +END + +IDD_USER_COMMAND DIALOGEX 0, 0, 195, 295 +STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | + WS_CAPTION | WS_SYSMENU +CAPTION "Create / Modify Command" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + GROUPBOX "Command Type",IDC_SETTINGS_TYPE,7,7,181,37 + CONTROL "Separator",IDC_SETTINGS_SEPARATOR,"Button", + BS_AUTORADIOBUTTON,14,18,89,10 + CONTROL "Raw",IDC_SETTINGS_RAW,"Button",BS_AUTORADIOBUTTON,14,28, + 89,10 + CONTROL "Chat",IDC_SETTINGS_CHAT,"Button",BS_AUTORADIOBUTTON,103, + 18,78,10 + CONTROL "PM",IDC_SETTINGS_PM,"Button",BS_AUTORADIOBUTTON,103,28, + 78,10 + GROUPBOX "Context",IDC_SETTINGS_CONTEXT,7,44,181,37 + CONTROL "Hub Menu",IDC_SETTINGS_HUB_MENU,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,55,89,12 + CONTROL "User Menu",IDC_SETTINGS_USER_MENU,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,67,89,10 + CONTROL "Search Menu",IDC_SETTINGS_SEARCH_MENU,"Button", + BS_A... [truncated message content] |
From: <arn...@us...> - 2006-07-09 11:39:22
|
Revision: 632 Author: arnetheduck Date: 2006-07-09 04:39:04 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=632&view=rev Log Message: ----------- Version update Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/client/version.h Removed Paths: ------------- dcplusplus/trunk/yassl/.cvsignore Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-09 11:21:30 UTC (rev 631) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-07-09 11:39:04 UTC (rev 632) @@ -942,8 +942,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,2 - PRODUCTVERSION 0,6,9,2 + FILEVERSION 0,6,9,3 + PRODUCTVERSION 0,6,9,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -960,12 +960,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 2" + VALUE "FileVersion", "0, 6, 9, 3" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 2" + VALUE "ProductVersion", "0, 6, 9, 3" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-07-09 11:21:30 UTC (rev 631) +++ dcplusplus/trunk/client/version.h 2006-07-09 11:39:04 UTC (rev 632) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.692" -#define VERSIONFLOAT 0.692 +#define VERSIONSTRING "0.693" +#define VERSIONFLOAT 0.693 /* Update the .rc file as well... */ Deleted: dcplusplus/trunk/yassl/.cvsignore =================================================================== --- dcplusplus/trunk/yassl/.cvsignore 2006-07-09 11:21:30 UTC (rev 631) +++ dcplusplus/trunk/yassl/.cvsignore 2006-07-09 11:39:04 UTC (rev 632) @@ -1 +0,0 @@ -doc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-09 11:21:39
|
Revision: 631 Author: arnetheduck Date: 2006-07-09 04:21:30 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=631&view=rev Log Message: ----------- Modified Paths: -------------- dcplusplus/trunk/help/changelog.html Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-07-09 11:07:09 UTC (rev 630) +++ dcplusplus/trunk/help/changelog.html 2006-07-09 11:21:30 UTC (rev 631) @@ -13,6 +13,12 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.693 <span style="color: gray;">(2006-07-09)</span></h2> +<ul> + <li>Fixed crash bug</li> + <li>Added language code to example language xml</li> +</ul> + <h2>0.692 <span style="color: gray;">(2006-07-09)</span></h2> <ul> <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=927">[bug 927]</a> Fixed OP detection bug really (thanks pothead)</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-09 11:07:30
|
Revision: 630 Author: arnetheduck Date: 2006-07-09 04:07:09 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=630&view=rev Log Message: ----------- Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/BufferedSocket.cpp dcplusplus/trunk/help/changelog.html dcplusplus/trunk/makedefs.py Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-09 09:31:00 UTC (rev 629) +++ dcplusplus/trunk/Example.xml 2006-07-09 11:07:09 UTC (rev 630) @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.692" Revision="1" RightToLeft="0"> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<Language Name="Example Language" Author="arnetheduck" Version="0.691" 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-07-09 09:31:00 UTC (rev 629) +++ dcplusplus/trunk/changelog.txt 2006-07-09 11:07:09 UTC (rev 630) @@ -1,4 +1,8 @@ --- 0.692 2006-07-09 -- +-- 0.693 2006-07-09 -- +* Fixed crash bug +* Added language code to example language xml + +-- 0.692 2006-07-09 -- * [bug 927] Fixed OP detection bug really (thanks pothead) * [bug 938] Added a few more ADC info fields (thanks ullner) * [bug 939] Fixed hub info update (thanks ullner) Modified: dcplusplus/trunk/client/BufferedSocket.cpp =================================================================== --- dcplusplus/trunk/client/BufferedSocket.cpp 2006-07-09 09:31:00 UTC (rev 629) +++ dcplusplus/trunk/client/BufferedSocket.cpp 2006-07-09 11:07:09 UTC (rev 630) @@ -90,13 +90,13 @@ // This lock prevents the shutdown task from being added and executed before we're done initializing the socket Lock l(cs); start(); + addTask(ACCEPTED, 0); } catch(...) { delete sock; sock = 0; throw; } - addTask(ACCEPTED, 0); } void BufferedSocket::connect(const string& aAddress, short aPort, bool secure, bool allowUntrusted, bool proxy) throw(SocketException, ThreadException) { @@ -117,13 +117,13 @@ Lock l(cs); start(); + addTask(CONNECT, new ConnectInfo(aAddress, aPort, proxy && (SETTING(OUTGOING_CONNECTIONS) == SettingsManager::OUTGOING_SOCKS5))); } catch(...) { delete sock; sock = 0; throw; } - addTask(CONNECT, new ConnectInfo(aAddress, aPort, proxy && (SETTING(OUTGOING_CONNECTIONS) == SettingsManager::OUTGOING_SOCKS5))); } #define CONNECT_TIMEOUT 30000 Modified: dcplusplus/trunk/help/changelog.html =================================================================== --- dcplusplus/trunk/help/changelog.html 2006-07-09 09:31:00 UTC (rev 629) +++ dcplusplus/trunk/help/changelog.html 2006-07-09 11:07:09 UTC (rev 630) @@ -13,6 +13,50 @@ <h1>DC++ Changelog</h1> See the version history of DC++ below. +<h2>0.692 <span style="color: gray;">(2006-07-09)</span></h2> +<ul> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=927">[bug 927]</a> Fixed OP detection bug really (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=938">[bug 938]</a> Added a few more ADC info fields (thanks ullner)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=939">[bug 939]</a> Fixed hub info update (thanks ullner)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=940">[bug 940]</a> Fixed a 64-bit compile error (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=942">[bug 942]</a> Fixed atomic operations on unices (thanks tobias nygren)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=943">[bug 943]</a> Fixed unix utsname compile issue (thanks tobias nygren)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=944">[bug 944]</a> Fixed unix string conversion bug (thanks tobias nygren)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=945">[bug 945]</a> Fixed unix mutex initialiser (thanks tobias nygren)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=946">[bug 946]</a> Tiger hash supports big endian and 64-bit architectures (thanks tobias nygren)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=941">[bug 941]</a> Updated usercount display (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=951">[bug 951]</a> Fixed issue with high port numbers (thanks tpo)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=958">[bug 958]</a> Search spy tth option automagically saved (thanks ullner)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=959">[bug 959]</a> Code cleanup (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=966">[bug 966]</a> Max hash speed fixed when fast hashing method is not used (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=967">[bug 967]</a> Fixed path case-sensitivity issue (thanks steven sheehy)</li> + <li>Fixed auto-reconnect</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=936">[bug 936]</a> Fixed duplicate entries in search hubs</li> + <li>Fixed some hub title display issues</li> + <li>Some spring cleanup</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=970">[bug 970]</a> Unix file permissions correctly set (thanks steven sheehy)</li> + <li>[ADC] Allowed $ and | in nick/description</li> + <li>Fixed targetdrive bug for temp target location</li> + <li>Fixed a crash bug when hash data cannot be saved</li> + <li>Possibly fixed issues with queue items not being updated</li> + <li>Added warning when someone tries to spam hublist.org or dcpp.net with your client</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=968">[bug 968]</a> Fixed unix compile issue (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=975">[bug 975]</a> Fixed silly warning (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=978">[bug 978]</a> Fixed 64-bit compiler issue (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=988">[bug 988]</a> Only unique nicks diplayed in title bar</li> + <li>Added protection from hubs/clients sending junk data resulting in high memory usage / crash</li> + <li>Updated to yaSSL 1.3.7</li> + <li>Added a few TLS options; [U] in transfer status means untrusted TLS (encrypted but certificate not validated)</li> + <li>Added certificate generation, OpenSSL must be installed and in PATH for this to work</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=996">[bug 996]</a> Fixed an issue where directories that are hard to delete were created</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1000">[bug 1000]</a> Fixed linux compile issue (thanks steven sheehy)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=949">[bug 949]</a> Fixed a crash when reading invalid XML files</li> + <li>TLS port may now be specified in settings and is only opened if TLS is enabled</li> + <li>Added TLS port to /connection</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=977">[bug 977]</a> Added copy hub address to hub right-click menu (thanks pothead)</li> + <li><a href="http://dcpp.net/bugzilla/show_bug.cgi?id=1001">[bug 1001]</a> Fixed assertion on unix (thanks steven sheehy)</li> +</ul> + <h2>0.691 <span style="color: gray;">(2006-06-03)</span></h2> <ul> <li>Links to bugzilla in html changelog</li> Modified: dcplusplus/trunk/makedefs.py =================================================================== --- dcplusplus/trunk/makedefs.py 2006-07-09 09:31:00 UTC (rev 629) +++ dcplusplus/trunk/makedefs.py 2006-07-09 11:07:09 UTC (rev 630) @@ -29,7 +29,7 @@ prolog = ""; example = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n'; -example += '<Language Name="Example Language" Author="arnetheduck" Version=' + version + ' Revision="1" RightToLeft="0">\n' +example += '<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version=' + version + ' Revision="1" RightToLeft="0">\n' example += '\t<Strings>\n'; lre = re.compile('\s*(\w+),\s*//\s*\"(.+)\"\s*') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-09 09:15:40
|
Revision: 628 Author: arnetheduck Date: 2006-07-09 02:15:27 -0700 (Sun, 09 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=628&view=rev Log Message: ----------- Patches Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/DirectoryListing.cpp dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/HubFrame.h Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-08 18:46:12 UTC (rev 627) +++ dcplusplus/trunk/changelog.txt 2006-07-09 09:15:27 UTC (rev 628) @@ -1,4 +1,4 @@ --- 0.692 -- +-- 0.692 2006-07-09 -- * [bug 927] Fixed OP detection bug really (thanks pothead) * [bug 938] Added a few more ADC info fields (thanks ullner) * [bug 939] Fixed hub info update (thanks ullner) @@ -37,6 +37,8 @@ * [bug 949] Fixed a crash when reading invalid XML files * TLS port may now be specified in settings and is only opened if TLS is enabled * Added TLS port to /connection +* [bug 977] Added copy hub address to hub right-click menu (thanks pothead) +* [bug 1001] Fixed assertion on unix (thanks steven sheehy) -- 0.691 2006-06-03 -- * Links to bugzilla in html changelog Modified: dcplusplus/trunk/client/DirectoryListing.cpp =================================================================== --- dcplusplus/trunk/client/DirectoryListing.cpp 2006-07-08 18:46:12 UTC (rev 627) +++ dcplusplus/trunk/client/DirectoryListing.cpp 2006-07-09 09:15:27 UTC (rev 628) @@ -338,7 +338,7 @@ void DirectoryListing::download(const string& aDir, const string& aTarget, bool highPrio) { dcassert(aDir.size() > 2); - dcassert(aDir[aDir.size() - 1] == PATH_SEPARATOR); + dcassert(aDir[aDir.size() - 1] == '\\'); // This should not be PATH_SEPARATOR Directory* d = find(aDir, getRoot()); if(d != NULL) download(d, aTarget, highPrio); Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-07-08 18:46:12 UTC (rev 627) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-07-09 09:15:27 UTC (rev 628) @@ -119,6 +119,7 @@ tabMenu = CreatePopupMenu(); tabMenu.AppendMenu(MF_STRING, IDC_ADD_AS_FAVORITE, CTSTRING(ADD_TO_FAVORITES)); tabMenu.AppendMenu(MF_STRING, ID_FILE_RECONNECT, CTSTRING(MENU_RECONNECT)); + tabMenu.AppendMenu(MF_STRING, IDC_COPY_HUB, CTSTRING(COPY_HUB)); showJoins = BOOLSETTING(SHOW_JOINS); favShowJoins = BOOLSETTING(FAV_SHOW_JOINS); @@ -373,6 +374,11 @@ return 0; } +LRESULT HubFrame::onCopyHub(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { + WinUtil::setClipboard(Text::toT(client->getHubUrl())); + return 0; +} + LRESULT HubFrame::onDoubleClickUsers(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { NMITEMACTIVATE* item = (NMITEMACTIVATE*)pnmh; if(item->iItem != -1) { Modified: dcplusplus/trunk/windows/HubFrame.h =================================================================== --- dcplusplus/trunk/windows/HubFrame.h 2006-07-08 18:46:12 UTC (rev 627) +++ dcplusplus/trunk/windows/HubFrame.h 2006-07-09 09:15:27 UTC (rev 628) @@ -72,6 +72,7 @@ COMMAND_ID_HANDLER(IDC_SEND_MESSAGE, onSendMessage) COMMAND_ID_HANDLER(IDC_ADD_AS_FAVORITE, onAddAsFavorite) COMMAND_ID_HANDLER(IDC_COPY_NICK, onCopyNick) + COMMAND_ID_HANDLER(IDC_COPY_HUB, onCopyHub) COMMAND_ID_HANDLER(IDC_CLOSE_WINDOW, onCloseWindow) CHAIN_COMMANDS(ucBase) CHAIN_COMMANDS(uibBase) @@ -92,6 +93,7 @@ LRESULT onSpeaker(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/); LRESULT onCopyNick(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); + LRESULT onCopyHub(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT onClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); LRESULT onDoubleClickUsers(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2006-07-08 18:47:02
|
Revision: 627 Author: arnetheduck Date: 2006-07-08 11:46:12 -0700 (Sat, 08 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=627&view=rev Log Message: ----------- TLS port settings Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/ShareManager.cpp dcplusplus/trunk/client/SimpleXML.cpp dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/windows/HubFrame.cpp dcplusplus/trunk/windows/NetworkPage.cpp dcplusplus/trunk/windows/resource.h Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-07-08 18:46:12 UTC (rev 627) @@ -573,9 +573,9 @@ WS_TABSTOP,12,103,249,10 LTEXT "Ports",IDC_SETTINGS_PORTS,230,17,18,8 LTEXT "TCP",IDC_SETTINGS_PORT_TCP,209,31,15,8,NOT WS_GROUP - EDITTEXT IDC_PORT_TCP,230,28,29,14,ES_AUTOHSCROLL + EDITTEXT IDC_PORT_TCP,230,28,29,14,ES_AUTOHSCROLL | ES_NUMBER LTEXT "UDP",IDC_SETTINGS_PORT_UDP,209,48,16,8 - EDITTEXT IDC_PORT_UDP,230,45,30,14,ES_AUTOHSCROLL + EDITTEXT IDC_PORT_UDP,230,45,30,14,ES_AUTOHSCROLL | ES_NUMBER LTEXT "External / WAN IP",IDC_SETTINGS_IP,59,59,68,8,NOT WS_GROUP EDITTEXT IDC_EXTERNAL_IP,59,69,99,14,ES_AUTOHSCROLL @@ -598,6 +598,8 @@ CONTROL "Use SOCKS5 server to resolve hostnames", IDC_SOCKS_RESOLVE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,59,207,165,10 + LTEXT "TLS",IDC_SETTINGS_PORT_TLS,209,64,21,8 + EDITTEXT IDC_PORT_TLS,230,61,30,14,ES_AUTOHSCROLL | ES_NUMBER END IDD_WINDOWSPAGE DIALOGEX 0, 0, 275, 225 Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/Example.xml 2006-07-08 18:46:12 UTC (rev 627) @@ -506,7 +506,8 @@ <String Name="SettingsSounds">Sounds</String> <String Name="SettingsSpeedsNotAccurate">Note; because of changing download speeds, this is not 100% accurate...</String> <String Name="SettingsStatusInChat">View status messages in main chat</String> - <String Name="SettingsTcpPort">TCP Port</String> + <String Name="SettingsTcpPort">TCP</String> + <String Name="SettingsTlsPort">TLS</String> <String Name="SettingsTextMinislot">Mini slot size</String> <String Name="SettingsPrioAutoprio">Autoprio settings</String> <String Name="SettingsPrioHighest">Highest prio max size</String> @@ -517,7 +518,7 @@ <String Name="SettingsTimeStamps">Show timestamps in chat by default</String> <String Name="SettingsTimeStampsFormat">Set timestamps</String> <String Name="SettingsToggleActiveWindow">Toggle window when selecting an active tab</String> - <String Name="SettingsUdpPort">UDP Port</String> + <String Name="SettingsUdpPort">UDP</String> <String Name="SettingsUnfinishedDownloadDirectory">Unfinished downloads directory</String> <String Name="SettingsUploadLineSpeed">Line speed (upload)</String> <String Name="SettingsUploads">Sharing</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/changelog.txt 2006-07-08 18:46:12 UTC (rev 627) @@ -34,6 +34,9 @@ * Added certificate generation, OpenSSL must be installed and in PATH for this to work * [bug 996] Fixed an issue where directories that are hard to delete were created * [bug 1000] Fixed linux compile issue (thanks steven sheehy) +* [bug 949] Fixed a crash when reading invalid XML files +* TLS port may now be specified in settings and is only opened if TLS is enabled +* Added TLS port to /connection -- 0.691 2006-06-03 -- * Links to bugzilla in html changelog Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -67,7 +67,10 @@ } } - lastPort++; + if(!CryptoManager::getInstance()->TLSOk()) { + return; + } + lastPort = (unsigned short)SETTING(TLS_PORT); firstPort = lastPort; while(true) { Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -116,6 +116,7 @@ setDefault(SLOTS, 1); setDefault(TCP_PORT, 0); setDefault(UDP_PORT, 0); + setDefault(TLS_PORT, 0); setDefault(INCOMING_CONNECTIONS, INCOMING_DIRECT); setDefault(OUTGOING_CONNECTIONS, OUTGOING_DIRECT); setDefault(ROLLBACK, 4096); Modified: dcplusplus/trunk/client/ShareManager.cpp =================================================================== --- dcplusplus/trunk/client/ShareManager.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/ShareManager.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -294,13 +294,13 @@ break; } } - } else if(cur != NULL) { + } else if(cur != 0) { cur = new ShareManager::Directory(getAttrib(attribs, "Name", 0), cur); cur->addType(SearchManager::TYPE_DIRECTORY); // needed since we match our own name in directory searches cur->getParent()->directories[cur->getName()] = cur; } - if(simple) + if(simple && cur) cur = cur->getParent(); else depth++; Modified: dcplusplus/trunk/client/SimpleXML.cpp =================================================================== --- dcplusplus/trunk/client/SimpleXML.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/SimpleXML.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -164,9 +164,12 @@ string::size_type j; for(;;) { - if((j = tmp.find('=', i)) == string::npos) { + if((j = tmp.find_first_of("= \"'/>", i)) == string::npos) { throw SimpleXMLException("Missing '=' in " + name); } + if(tmp[j] != '=') { + throw SimpleXMLException("Missing '=' in " + name); + } if(tmp[j+1] != '"' && tmp[j+1] != '\'') { throw SimpleXMLException("Invalid character after '=' in " + name); Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -507,7 +507,8 @@ "Sounds", "Note; because of changing download speeds, this is not 100% accurate...", "View status messages in main chat", -"TCP Port", +"TCP", +"TLS", "Mini slot size", "Autoprio settings", "Highest prio max size", @@ -518,7 +519,7 @@ "Show timestamps in chat by default", "Set timestamps", "Toggle window when selecting an active tab", -"UDP Port", +"UDP", "Unfinished downloads directory", "Line speed (upload)", "Sharing", @@ -1129,6 +1130,7 @@ "SettingsSpeedsNotAccurate", "SettingsStatusInChat", "SettingsTcpPort", +"SettingsTlsPort", "SettingsTextMinislot", "SettingsPrioAutoprio", "SettingsPrioHighest", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/client/StringDefs.h 2006-07-08 18:46:12 UTC (rev 627) @@ -510,7 +510,8 @@ SETTINGS_SOUNDS, // "Sounds" SETTINGS_SPEEDS_NOT_ACCURATE, // "Note; because of changing download speeds, this is not 100% accurate..." SETTINGS_STATUS_IN_CHAT, // "View status messages in main chat" - SETTINGS_TCP_PORT, // "TCP Port" + SETTINGS_TCP_PORT, // "TCP" + SETTINGS_TLS_PORT, // "TLS" SETTINGS_TEXT_MINISLOT, // "Mini slot size" SETTINGS_PRIO_AUTOPRIO, // "Autoprio settings" SETTINGS_PRIO_HIGHEST, // "Highest prio max size" @@ -521,7 +522,7 @@ SETTINGS_TIME_STAMPS, // "Show timestamps in chat by default" SETTINGS_TIME_STAMPS_FORMAT, // "Set timestamps" SETTINGS_TOGGLE_ACTIVE_WINDOW, // "Toggle window when selecting an active tab" - SETTINGS_UDP_PORT, // "UDP Port" + SETTINGS_UDP_PORT, // "UDP" SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY, // "Unfinished downloads directory" SETTINGS_UPLOAD_LINE_SPEED, // "Line speed (upload)" SETTINGS_UPLOADS, // "Sharing" Modified: dcplusplus/trunk/windows/HubFrame.cpp =================================================================== --- dcplusplus/trunk/windows/HubFrame.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/windows/HubFrame.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -231,7 +231,12 @@ } else if(Util::stricmp(cmd.c_str(), _T("userlist")) == 0) { ctrlShowUsers.SetCheck(showUsers ? BST_UNCHECKED : BST_CHECKED); } else if(Util::stricmp(cmd.c_str(), _T("connection")) == 0) { - addClientLine(Text::toT((STRING(IP) + client->getLocalIp() + ", " + STRING(PORT) + Util::toString(ConnectionManager::getInstance()->getPort()) + "/" + Util::toString(SearchManager::getInstance()->getPort())))); + addClientLine(Text::toT((STRING(IP) + client->getLocalIp() + ", " + + STRING(PORT) + + Util::toString(ConnectionManager::getInstance()->getPort()) + "/" + + Util::toString(SearchManager::getInstance()->getPort()) + "/" + + Util::toString(ConnectionManager::getInstance()->getSecurePort()) + ))); } else if((Util::stricmp(cmd.c_str(), _T("favorite")) == 0) || (Util::stricmp(cmd.c_str(), _T("fav")) == 0)) { addAsFavorite(); } else if((Util::stricmp(cmd.c_str(), _T("removefavorite")) == 0) || (Util::stricmp(cmd.c_str(), _T("removefav")) == 0)) { Modified: dcplusplus/trunk/windows/NetworkPage.cpp =================================================================== --- dcplusplus/trunk/windows/NetworkPage.cpp 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/windows/NetworkPage.cpp 2006-07-08 18:46:12 UTC (rev 627) @@ -37,6 +37,7 @@ { IDC_SETTINGS_IP, ResourceManager::SETTINGS_EXTERNAL_IP }, { IDC_SETTINGS_PORT_TCP, ResourceManager::SETTINGS_TCP_PORT }, { IDC_SETTINGS_PORT_UDP, ResourceManager::SETTINGS_UDP_PORT }, + { IDC_SETTINGS_PORT_TLS, ResourceManager::SETTINGS_TLS_PORT }, { IDC_SETTINGS_SOCKS5_IP, ResourceManager::SETTINGS_SOCKS5_IP }, { IDC_SETTINGS_SOCKS5_PORT, ResourceManager::SETTINGS_SOCKS5_PORT }, { IDC_SETTINGS_SOCKS5_USERNAME, ResourceManager::SETTINGS_SOCKS5_USERNAME }, @@ -51,6 +52,7 @@ { IDC_EXTERNAL_IP, SettingsManager::EXTERNAL_IP, PropPage::T_STR }, { IDC_PORT_TCP, SettingsManager::TCP_PORT, PropPage::T_INT }, { IDC_PORT_UDP, SettingsManager::UDP_PORT, PropPage::T_INT }, + { IDC_PORT_TLS, SettingsManager::TLS_PORT, PropPage::T_INT }, { IDC_OVERRIDE, SettingsManager::NO_IP_OVERRIDE, PropPage::T_BOOL }, { IDC_SOCKS_SERVER, SettingsManager::SOCKS_SERVER, PropPage::T_STR }, { IDC_SOCKS_PORT, SettingsManager::SOCKS_PORT, PropPage::T_INT }, Modified: dcplusplus/trunk/windows/resource.h =================================================================== --- dcplusplus/trunk/windows/resource.h 2006-07-08 17:21:56 UTC (rev 626) +++ dcplusplus/trunk/windows/resource.h 2006-07-08 18:46:12 UTC (rev 627) @@ -373,6 +373,8 @@ #define IDC_SOCKET_OUT_BUFFER 1318 #define IDC_SSL_CERTIFICATE_FILE 1318 #define IDC_TLS_CERTIFICATE_FILE 1318 +#define IDC_TLS_PORT 1318 +#define IDC_PORT_TLS 1318 #define IDC_SETTINGS_SOCKET_OUT_BUFFER 1319 #define IDC_SETTINGS_SOCKET_IN_BUFFER 1320 #define IDC_CHECK1 1321 @@ -423,11 +425,11 @@ #define IDC_CLOSE_ALL_PM 1423 #define IDC_BROWSE_PRIVATE_KEY 1423 #define IDC_CLOSE_ALL_OFFLINE_PM 1424 -#define IDC_BROWSE_OWN_CERTIFICATE 1424 #define IDC_BROWSE_CERTIFICATE 1424 #define IDC_CLOSE_ALL_DIR_LIST 1425 #define IDC_BROWSE_TRUSTED_PATH 1425 #define IDC_CLOSE_ALL_SEARCH_FRAME 1426 +#define IDC_SETTINGS_PORT_TLS 1427 #define IDC_BROWSELIST 3000 #define IDC_REMOVE_SOURCE 3500 #define IDC_PM 4000 @@ -469,7 +471,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 246 #define _APS_NEXT_COMMAND_VALUE 32789 -#define _APS_NEXT_CONTROL_VALUE 1426 +#define _APS_NEXT_CONTROL_VALUE 1428 #define _APS_NEXT_SYMED_VALUE 105 #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |