Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
07de9d6c3f
Codechange: Use override keyword in networking classes.
6 years ago
Patric Stout
e3c639a09f
Remove: ENABLE_NETWORK switch
...
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.
6 years ago
Niels Martin Hansen
db2c0ccae0
Fix fdc2e85: Double close of file handles
...
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.
6 years ago
frosch
4fc43b510d
(svn r27576) -Fix (r27570): Compilation failure with all compilers but mine.
8 years ago
frosch
97e6981e39
(svn r27570) -Fix [FS#6449]: Various incorrect but uncritical size computations in the content client.
8 years ago
rubidium
21f991e235
(svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay
11 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
rubidium
2e54c8fdfa
(svn r26056) -Fix: a number of possibly uninitialised variables
11 years ago
rubidium
ed4e14dc20
(svn r26047) -Fix: possible, but very unlikely, null pointer dereference when gunziping just downloaded files
11 years ago
rubidium
5eac3a77d2
(svn r25597) -Fix [FS#5635]: [Content] When the server closed the connection, the client would for eternity try to read a packet and never timeout making it impossible to reconnect
11 years ago
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
yexo
483d878d5f
(svn r24466) -Codechange [FS#5236]: add general function for ContentType -> Subdirectory conversion (LordAro)
12 years ago
rubidium
8371ecc922
(svn r23719) -Fix [FS#4930]: extraction of music packs failed
13 years ago
truebrain
963802e9a7
(svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library)
13 years ago
truebrain
b4f832f29f
(svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory
13 years ago
truebrain
561b25d031
(svn r23601) -Fix: fix the conflict in window number
13 years ago
rubidium
fefe22b4aa
(svn r23590) -Codechange: make the string validation settings better expandable
13 years ago
rubidium
58423b26d1
(svn r23474) -Codechange: move the declaration error related functions to error.h
13 years ago
truebrain
cc12942d70
(svn r23384) -Remove: no longer allow a binary to be without AI support; the parts some compilers failed at, are integrated in other parts of the code now too
13 years ago
truebrain
e37149a1de
(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary
13 years ago
rubidium
a3a2fdcfc2
(svn r23234) -Fix [FS#4840]: crash when after downloading content
13 years ago
rubidium
2b897b4fa0
(svn r23219) -Change: different directories for basesets and newgrfs. So data to baseset or newgrf, and gm to baseset
13 years ago
rubidium
160294ff22
(svn r23216) -Codechange: introduce the concept of having different tar lists
13 years ago
rubidium
0061b5f184
(svn r22822) -Codechange: make a distinction between base sets and newgrfs for their directory
13 years ago
rubidium
944a5cb7aa
(svn r22423) -Document: some network stuff
14 years ago
rubidium
d4737e0724
(svn r22399) -Codechange: replace some defines in the tcp/content code so doxygen can create better documentation
14 years ago
rubidium
db6121f361
(svn r22208) -Fix [FS#4543]: When downloading a file via HTTP failed mid-way and OpenTTD fell back to the old system the partial downloaded amount would be counted twice
14 years ago
alberth
1dbc0a20be
(svn r22144) -Codechange: Unify 'while (true)' to 'for (;;)'
14 years ago
rubidium
81ef0dbcfc
(svn r21898) -Fix [FS#4438]: using a pointer-iterator and adding things (thus reallocating) to the iterated array caused OpenTTD to crash on invalid pointers
14 years ago
rubidium
eb299736c1
(svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n].
14 years ago
rubidium
b6c2216749
(svn r21358) -Codechange: make some network function names conform to coding style
14 years ago
smatz
9594a3f7c5
(svn r21319) -Fix: crash when creating file download by the content download system failed
14 years ago
smatz
eb4516e50c
(svn r21318) -Fix: parameters to ShowErrorMessage() were swapped when content download failed
14 years ago
frosch
3972c790c2
(svn r20957) -Codechange: Add another parameter to FindGRFConfig() to define search restrictions.
14 years ago
rubidium
f555e6d72e
(svn r20933) -Codechange: move some more client related methods and such to network_client.cpp
14 years ago
alberth
35fec79700
(svn r20499) -Doc: Spelling fixes, and one doxygen comment addition.
14 years ago
rubidium
b8487afe54
(svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :)
14 years ago
frosch
4ce5c6d93d
(svn r20089) -Fix [FS#3932]: Access of already freed memory, esp. due to hidden destructor call from Swap().
14 years ago
rubidium
5ca4098443
(svn r20082) -Fix [FS#3899]: reading deleted memory when selecting a NewGRF 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.
14 years ago
rubidium
948beec597
(svn r19777) -Change: use the file scanner to find the .tars
15 years ago
smatz
32510296b6
(svn r19686) -Fix (r15126): truncated archives were not detected when using zlib 1.2.3. This also fixes zlib 1.2.4 compatibility, zlib 1.2.5 is bugfree
15 years ago
smatz
0ef33548c2
(svn r19614) -Codechange: "it's" => "its" where appropriate
15 years ago
frosch
ba5f5c1ce1
(svn r19600) -Fix (r18994): Presence of online content was not properly updated after download due to duplicate slashes in the path.
15 years ago
rubidium
0f6d82df7e
(svn r19262) -Feature: finalise BaNaNaS support for music sets
15 years ago
smatz
f051066bc4
(svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit
15 years ago
rubidium
21bd2722cd
(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
15 years ago
rubidium
228da0ccd3
(svn r19001) -Fix: some GCC compile warnings
15 years ago
rubidium
d818c7c7b1
(svn r18996) -Fix (r18993, r18994): MSVC 64 bits had somethings to complain about
15 years ago
rubidium
2db44fc18e
(svn r18994) -Change: content mirroring support (based on work by TrueBrain).
15 years ago