summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-10-07Fix: [Cygwin] Fix missing AI_ADDRCONFIG declarationJoe Stringer
Fixes the following complaints: src/network/core/address.cpp: In member function 'const sockaddr_storage* NetworkAddress::GetAddress()': src/network/core/address.cpp:134:55: error: 'AI_ADDRCONFIG' was not declared in this scope this->Resolve(this->address.ss_family, SOCK_STREAM, AI_ADDRCONFIG, nullptr, ResolveLoopProc); Signed-off-by: Joe Stringer <joe@wand.net.nz>
2019-09-30Fix: clang and MSVC warnings (glx)Charles Pigott
2019-09-30Fix: GCC9's warnings about deprecated implicit assignment operatorsCharles Pigott
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-05-04Codechange: replace grow() usage in ↵glx
ClientNetworkContentSocketHandler::OnReceiveData()
2019-04-29Codechange: Remove Company/OwnerByte typesCharles Pigott
2019-04-27Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548)PeterN
2019-04-25Fix dcb2571: Missing override keywordsNiels Martin Hansen
2019-04-24Fix: Also breaking for warning text in set company passwordNiels Martin Hansen
2019-04-24Add: Warn players that company passwords are not truly secureNiels Martin Hansen
2019-04-18Codechange: use std::vector for _language_dropdownglx
2019-04-13Codechange: use std::sort() in GUIListglx
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandlerJonathan G Rennison
In particular this crash can be observed when using the bootstrap GUI to download the base graphics. In ClientNetworkContentSocketHandler::OnReceiveContentInfo ClientNetworkContentSocketHandler::callbacks is iterated, using an iterator cb->OnReceiveContentInfo() is called (cb is of type BootstrapAskForDownloadWindow) This calls new BootstrapContentDownloadStatusWindow() This inherits from BaseNetworkContentDownloadStatusWindow The constructor of which calls _network_content_client.AddCallback(this) This reallocates the std::vector which is being iterated in ClientNetworkContentSocketHandler::OnReceiveContentInfo This results in iter being invalid, and an assertion failure occurs shortly afterwards due to its use in the next iteration of cb->OnReceiveContentInfo() Adjust all locations where ClientNetworkContentSocketHandler::callbacks is iterated to avoid problematic behaviour
2019-04-09Remove: AutoFreeSmallVector.Michael Lutz
The last use was for storing a list of memory blocks. As the way these lists are accessed is very specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
2019-04-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
2019-04-06Codechange: Use platform independent C++11 function for sleeping on a thread.Michael Lutz
2019-04-06Codechange: Use atomic variables for thread synchronization where useful.Michael Lutz
2019-04-06Codechange: Replace custom thread code with C++11 thread objects.Michael Lutz
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
2019-04-06Codechange: Replace custom mutex code with C++11 mutex'es.Michael Lutz
A conforming compiler with a valid <mutex>-header is expected. Most parts of the code assume that locking a mutex will never fail unexpectedly, which is generally true on all common platforms that don't just pretend to be C++11. The use of condition variables in driver code is checked.
2019-04-05Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465)glx22
2019-03-29Fix #7434: Incorrect use of vector iterator. (#7437)PeterN
2019-03-28Fix: MSVC warnings (#7423)glx22
2019-03-26Fix #7165: Missed 'Append() --> push_back()' replacementstormcone
2019-03-26Cleanup: Remove unused size template parameters from SmallMap and ↵Henry Wilson
Auto[Free|Delete]SmallVector
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Include() with include()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Erase() with std::vector::erase()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Get() const with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Contains() with std::find() patternHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() const with suitable alternativesHenry Wilson
The use of std::none_of in network/core/host.cpp is driven by the non-const comparison operator use by NetworkAddress. A future commit should address the const_casts in that class to ensure const-correctness.
2019-03-26Codechange: Replaced SmallVector::Find() non-const with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Reset() with std::vector::clear() + ↵Henry Wilson
shrink_to_fit()
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-24Codechange: Use override keyword in networking classes.peter1138
2019-03-24Codechange: Use override specifier in Window-derived classes.peter1138
2019-03-24Codechange: Use override specifer for overriding member declarationsHenry Wilson
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2019-03-07Cleanup: Remove repeated network error message on connection timeout. (#7327)SamuXarick
2019-03-05Fix: warnings when compiling for a recent version of HaikuPatric Stout
This might break older Haiku versions, but it is hard to tell.
2019-03-05Remove: BeOS support (deprecated by Haiku)Patric Stout
In 10 years there is no commit to change how BeOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), BeOS is no longer support. SDL2 suggests to use Haiku instead of BeOS.
2019-03-05Remove: MorphOS / AmigaOS supportPatric Stout
In 10 years there is no commit to change how MorphOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), MorphOS is no longer support. There is an SDL2 port for MorphOS, but it is not maintained by upstream SDL2, and nobody can currently test it out. If anyone wants to re-add MorphOS, please do (revert this patch, fix the problems, and create a Pull Request). If you need any help doing so, let us know! It is not that we don't like MorphOS, it is that we don't have anyone fixing the problems :(
2019-03-03Fix #7280: Save in the right location on desync and server timeoutNiels Martin Hansen
2019-02-16Fix: colour of network specific strings in company dropdown menusglx