summaryrefslogtreecommitdiff
path: root/src/network/network_content.cpp
AgeCommit message (Collapse)Author
2019-03-24Codechange: Use override keyword in networking classes.peter1138
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-02-06Fix fdc2e85: Double close of file handlesNiels Martin Hansen
When unpacking downloaded content, the downloaded .gz file was being opened with `fopen`, the OS file handle given to zlib, and then afterwards zlib told to close the file. But the `FILE *` object was never closed with `fclose`, meaning the stdio library would have a hanging file object, whose file handle was now invalid or referred to a different file. This caused asserts during shutdown with Microsoft's C library in debug mode. Fix this by properly duplicating the OS handle and `fclose`ing the `FILE *` object, before giving the handle to zlib.
2016-05-22(svn r27576) -Fix (r27570): Compilation failure with all compilers but mine.frosch
2016-05-22(svn r27570) -Fix [FS#6449]: Various incorrect but uncritical size ↵frosch
computations in the content client.
2014-04-23(svn r26489) -Codechange: properly account for the end of buffers in the ↵rubidium
file io code instead of assuming MAX_PATH is okay
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-11-22(svn r26056) -Fix: a number of possibly uninitialised variablesrubidium
2013-11-22(svn r26047) -Fix: possible, but very unlikely, null pointer dereference ↵rubidium
when gunziping just downloaded files
2013-07-13(svn r25597) -Fix [FS#5635]: [Content] When the server closed the ↵rubidium
connection, the client would for eternity try to read a packet and never timeout making it impossible to reconnect
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)
2012-08-13(svn r24466) -Codechange [FS#5236]: add general function for ContentType -> ↵yexo
Subdirectory conversion (LordAro)
2012-01-02(svn r23719) -Fix [FS#4930]: extraction of music packs failedrubidium
2011-12-19(svn r23612) -Add: allow importing libraries in the same way as AI does, ↵truebrain
only with GS prefix (and in game/library)
2011-12-19(svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from ↵truebrain
that directory
2011-12-19(svn r23601) -Fix: fix the conflict in window numbertruebrain
2011-12-18(svn r23590) -Codechange: make the string validation settings better expandablerubidium
2011-12-10(svn r23474) -Codechange: move the declaration error related functions to ↵rubidium
error.h
2011-12-01(svn r23384) -Remove: no longer allow a binary to be without AI support; the ↵truebrain
parts some compilers failed at, are integrated in other parts of the code now too
2011-11-29(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo ↵truebrain
and AIScannerLibrary
2011-11-16(svn r23234) -Fix [FS#4840]: crash when after downloading contentrubidium
2011-11-14(svn r23219) -Change: different directories for basesets and newgrfs. So ↵rubidium
data to baseset or newgrf, and gm to baseset
2011-11-14(svn r23216) -Codechange: introduce the concept of having different tar listsrubidium
2011-08-24(svn r22822) -Codechange: make a distinction between base sets and newgrfs ↵rubidium
for their directory
2011-05-04(svn r22423) -Document: some network stuffrubidium
2011-05-01(svn r22399) -Codechange: replace some defines in the tcp/content code so ↵rubidium
doxygen can create better documentation
2011-03-06(svn r22208) -Fix [FS#4543]: When downloading a file via HTTP failed mid-way ↵rubidium
and OpenTTD fell back to the old system the partial downloaded amount would be counted twice
2011-02-25(svn r22144) -Codechange: Unify 'while (true)' to 'for (;;)'alberth
2011-01-23(svn r21898) -Fix [FS#4438]: using a pointer-iterator and adding things ↵rubidium
(thus reallocating) to the iterated array caused OpenTTD to crash on invalid pointers
2011-01-22(svn r21886) -Codechange: move documentation towards the code to make it ↵rubidium
more likely to be updated [n].
2010-11-30(svn r21358) -Codechange: make some network function names conform to coding ↵rubidium
style
2010-11-25(svn r21319) -Fix: crash when creating file download by the content download ↵smatz
system failed
2010-11-25(svn r21318) -Fix: parameters to ShowErrorMessage() were swapped when ↵smatz
content download failed
2010-10-17(svn r20957) -Codechange: Add another parameter to FindGRFConfig() to define ↵frosch
search restrictions.
2010-10-15(svn r20933) -Codechange: move some more client related methods and such to ↵rubidium
network_client.cpp
2010-08-15(svn r20499) -Doc: Spelling fixes, and one doxygen comment addition.alberth
2010-07-19(svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be ↵rubidium
missed :)
2010-07-08(svn r20089) -Fix [FS#3932]: Access of already freed memory, esp. due to ↵frosch
hidden destructor call from Swap().
2010-07-05(svn r20082) -Fix [FS#3899]: reading deleted memory when selecting a NewGRF ↵rubidium
in the content download window of which the data has not been acquired from the content server. The crash would occur after the content server's reply was processed and the ContentInfo object was replaced with another.
2010-05-10(svn r19777) -Change: use the file scanner to find the .tarsrubidium
2010-04-21(svn r19686) -Fix (r15126): truncated archives were not detected when using ↵smatz
zlib 1.2.3. This also fixes zlib 1.2.4 compatibility, zlib 1.2.5 is bugfree
2010-04-12(svn r19614) -Codechange: "it's" => "its" where appropriatesmatz
2010-04-10(svn r19600) -Fix (r18994): Presence of online content was not properly ↵frosch
updated after download due to duplicate slashes in the path.
2010-02-26(svn r19262) -Feature: finalise BaNaNaS support for music setsrubidium
2010-02-24(svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bitsmatz
2010-02-10(svn r19081) -Codechange: make it possible to disable compilation of the ↵rubidium
AI+Squirrel
2010-02-04(svn r19001) -Fix: some GCC compile warningsrubidium
2010-02-03(svn r18996) -Fix (r18993, r18994): MSVC 64 bits had somethings to complain ↵rubidium
about
2010-02-03(svn r18994) -Change: content mirroring support (based on work by TrueBrain).rubidium
2010-02-03(svn r18992) -Codechange: move the file opening/closing out of the content ↵rubidium
download function