Michael Lutz
94c5269fa7
Codechange: Use atomic variables for thread synchronization where useful.
5 years ago
Michael Lutz
05f4e73608
Codechange: Replace custom mutex code with C++11 mutex'es.
...
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.
5 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.
5 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
10 years ago
alberth
732e073261
(svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb)
12 years ago
rubidium
1adb9a5c85
(svn r24070) -Fix [FS#5098]: the 'last joined' server was not properly selected anymore (adf88)
12 years ago
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
13 years ago
rubidium
4d5dbf5170
(svn r22410) -Document: some more bits ;)
13 years ago
yexo
93533b603a
(svn r22162) -Fix [FS#4533]: No update of NewGRF window when unknown GRF name becomes available
14 years ago
rubidium
e1eeca6440
(svn r22029) -Fix [FS#4482]: the server list got not resorted/redrawn after NewGRFs were downloaded
14 years ago
frosch
3972c790c2
(svn r20957) -Codechange: Add another parameter to FindGRFConfig() to define search restrictions.
14 years ago
yexo
9a05f8004b
(svn r20692) -Fix [FS#4055]: crash after downloading missing content
14 years ago
frosch
4bd32799f1
(svn r20286) -Codechange: Unify end of doxygen comments.
14 years ago
frosch
ed4f806f1d
(svn r20283) -Codechange: Unify start of doygen comments.
14 years ago
yexo
d3c1be9abd
(svn r20249) -Codechange: change the newgrf name/description from a char* to a GRFText* to make translations possible
14 years ago
rubidium
062dd0e24c
(svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int
14 years ago
yexo
a9c8dbc0a0
(svn r19255) -Codechange: encapsulate GRFIdentifier in GRFConfig instead of subclassing it
15 years ago
rubidium
1967084bc3
(svn r18746) -Fix [FS#3489]: clear the cached NewGRFs of a server when receiving a reply instead of when requesting the information. With slow/unstable network connections it would look like the NewGRF settings button went randomly missing.
15 years ago
rubidium
c2221885f4
(svn r18027) -Codechange: make some unneededly global variables static and remove some unused variables
15 years ago
rubidium
d6cded5380
(svn r17693) -Cleanup: remove some unneeded includes
15 years ago
rubidium
55c0109ee0
(svn r17562) -Fix [FS#2972]: the NewGRF settings of (remote) network games did not get properly updated when the NewGRFs were rescanned causing reading of freed data
15 years ago
rubidium
07d2af338e
(svn r17339) -Codechange: move thread related files to their own directory (like done for video, music, sound, etc)
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
63c29124de
(svn r16981) -Fix [FS#3062]: the last manually added server would not be saved
15 years ago
rubidium
3061d70387
(svn r16064) -Fix: memory leak when querying a server multiple times.
15 years ago
rubidium
ebe0f9e7f7
(svn r15998) -Codechange: some coding style updates
15 years ago
rubidium
c2dbc8270b
(svn r15991) -Fix: don't add 0.0.0.0/:: to the server list; you can't connect to them in any case
15 years ago
rubidium
89d0eca6b7
(svn r15931) -Codechange: let the host and ban lists use of SmallVector.
15 years ago
rubidium
11723c40b2
(svn r15926) -Codechange: make the broadcast IP list less AF dependent.
15 years ago
rubidium
c5160c7c8e
(svn r15917) -Codechange: remove the latest traces of NetworkAddress::GetIP.
15 years ago
rubidium
1e205e01b8
(svn r15916) -Codechange: let the network game list use NetworkAddress
15 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
rubidium
6a3aaef486
(svn r15159) -Fix: move the UDP queries that resolve a hostname into threads so they don't freeze OpenTTD when for example the network connection got severed. Thanks to glx for writing the mutex implementation for Windows.
16 years ago
rubidium
5f3772a42c
(svn r15157) -Codechange: wrap the hostname/ip and port into a single structure so we can pass either one of them and not convert an ip to a string and then back again.
16 years ago
rubidium
2f3b88ef9a
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
16 years ago
rubidium
172237e326
(svn r12709) -Feature: show the last joined server. Heavily based on a patch by Yexo.
16 years ago
rubidium
bf98e25e43
(svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed.
17 years ago
rubidium
fda75ae603
(svn r10694) -Codechange: update the server information in the game list every once in a while so the information stays fairly up-to-date when you are looking through the servers.
17 years ago
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
18 years ago
celestar
0ed4b64e64
(svn r8857) -Documentation: Added some doxygen @file tags, repaired others (the @file tag MUST be found before any line of code, that includes preprocessor directives).
18 years ago
rubidium
9ddd227eb3
(svn r8544) -Codechange: move game list related function/struct declarations to network_gamelist.h
18 years ago
rubidium
07b9d95c3c
(svn r8542) -Codechange (Fix?): tweak the gamelist requery timeout so more servers are found for slow network connections.
18 years ago
rubidium
15980fc023
(svn r8520) -Fix/Feature: requery gameservers that did not respond to their first query.
18 years ago
KUDr
33be1ecfb1
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
18 years ago
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
18 years ago
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
18 years ago