1
0
Commit Graph

276 Commits

Author SHA1 Message Date
peterbell10
ee84197014
Force all headers other than "Globals.h" to be included with relative paths (#4269)
Closes #4236

CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/".

#include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-08-29 01:51:25 +01:00
Nate
801d5d7170 Fix: Create players folder recursively (#4283)
Problem: On a new server the players folder was not created on windows.

Root Cause:
`GetUUIDFolderName` was returning a folder structure for players with `/` while CreateFolderRecursively was checking for `\\` for win32. 

The fix is to recognise both forward and backward slashes as file separators on windows.

Fixes #4284
2018-08-12 23:47:38 +01:00
peterbell10
950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10
7b431bed51
cIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258)
This allows threads to be restarted after stopping.

Fixes #4257
2018-07-22 22:35:58 +01:00
peterbell10
a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.

reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-05-02 08:50:36 +01:00
peterbell10
1ea36298d2
Fix cUrlClient leak (#4125)
Fixes #4040
* The TCP connection is now shutdown after OnBodyFinished
* Any open connections are closed when cNetworkSingleton::Terminate() is called.
* Removed ownership cycles in cUrlClientRequest
* Added a check to the test to ensure there are no leaks.
2018-02-20 17:08:46 +00:00
peterbell10
757231cc6e
Add the fmt library (#4065)
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
2018-01-03 17:41:16 +00:00
Mattes D
01322cb1b0 NetworkLookup: Added "virtual" keyword to overridden dtor. (#4100) 2017-12-21 13:31:20 +00:00
bibo38
532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* Fixed Clang 5.0 compile errors

* Fixed wrong comment

* Only disable warnings in Clang 5 or higher

* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning

* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00
Lukas Pioch
c5f590d460 Removed UTF-8 BOM (#4033) 2017-09-19 10:34:08 +02:00
peterbell10
84941bcc9f Update mbedtls to 2.5.1 (#3964)
* Renaming changes:
  * macro prefix "POLARSSL" -> "MBEDTLS"
  * functions now prefixed with "mbedtls_"
  * rename PolarSSL++ -> mbedTLS++
  * rename polarssl submodule

* Use mbedtls' AES-CFB8 implementation.

* Add cSslConfig to wrap mbedtls_ssl_config

* Update cTCPLink and cBlockingSslClientSocket to use cSslConfig

* Use cSslConfig in cHTTPServer

* Use cSslConfig for cMojangAPI::SecureRequest

* CI Fixes

* Set -fomit-frame-pointer on the right target
2017-08-30 15:00:06 +01:00
mathiascode
02775e52c4 Minor changes (#3909) 2017-08-24 11:19:40 +02:00
Lukas Pioch
07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
peterbell10
759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
peterbell10
5a5297974b Remove alignment macros 2017-07-21 14:41:51 +01:00
peterbell10
a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
Mattes D
ea6660721b NetworkSingleton: Fixed a throw warning in VS2017. (#3792)
Also fixed the misleading name.
2017-06-22 21:10:41 +02:00
Mattes D
7ac3b0fa0b Removed the LeakFinder for Windows. (#3777) 2017-06-19 11:05:19 +02:00
Mattes D
bb020bbe78 NetworkSingleton: Fixed an object leak upon termination. 2017-06-17 07:14:20 +02:00
peterbell10
705132011a Change error no data to no name 2017-06-16 14:06:27 +02:00
peterbell10
035ecdc9e2 Replace evdns with getaddrinfo and getnameinfo (#3766) 2017-06-15 11:03:49 +02:00
Lukas Pioch
e35ac1bfb9 Clang 5.0 fixes
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Lukas Pioch
4b1bc1cc5c Removed unnecessary check for lower and upper folder 2017-03-16 17:50:19 +01:00
Mattes D
7cc3fb098d DeadlockDetect now lists some tracked CS's stats. 2017-01-18 09:03:05 +01:00
Mattes D
8dd1e56515 TCPLink: call networking callbacks with LibEvent unlocked. (#3515) 2017-01-03 21:20:01 +01:00
mathiascode
efc7fed05b Updated links and docs (#3488) 2016-12-19 17:08:19 +01:00
Tiger Wang
8c6d0b51c7 Use CMake's Android generators to crosscompile 2016-12-12 14:32:32 +00:00
Mattes D
5ca371bb9a cUrlClient: Exported to Lua API. 2016-08-23 13:20:43 +02:00
Mattes D
641cb063bc cTCPLink supports TLS out of the box. 2016-08-22 23:44:36 +02:00
Mattes D
dd5567a90c IPLookup: Fixed a soft memory leak when looking up invalid IPs. 2016-08-13 21:16:21 +02:00
Mattes D
876496c953 Removed "." and ".." from cFile:GetFolderContents(). (#3301) 2016-08-07 12:50:19 +02:00
Mattes D
8eaa8613da CMake: Remove needless minimum version specifications. 2016-07-18 22:11:42 +02:00
Mattes D
1462e4f70e Self tests (#3242)
* SelfTests: Added a cEvent stress-test.

* cNetwork: Fixed startup event hang.

The original code used to hang with a ~ 1:50000 chance, because on Linux the cEvent was destroyed before its "Set()" returned.
2016-06-26 14:51:12 +01:00
Mattes D
8610083a8e cNetwork: Fixed possible hang when terminating immediately after init. 2016-06-18 13:12:12 +02:00
Mattes D
36eefbf0f2 SelfTests: Removed the unneeded cSelfTests class. 2016-06-18 13:12:10 +02:00
Mattes D
3184433756 Moved NetworkInterfaceEnum test to a separate test project. 2016-06-18 13:12:06 +02:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D
80e1eb37dd Renamed leftover strings to Cuberite / Server, as needed.
Also upgraded the user setting file for MSVC to 2013.
2016-01-01 21:05:09 +01:00
tycho
d01562cb7d Use atomic bool for isthread terminate 2015-12-19 19:29:06 +01:00
Alexander Harkness
8b851d5048 Added HTTPS links wherever they are supported. 2015-12-19 14:30:32 +00:00
Lukas Pioch
d620dcdd08 Moved variables into scope, removed unused variables and fixed variables 2015-12-17 10:48:36 +01:00
Mattes D
03a972ec55 Use C++11 auto instead of per-platform types.
Closes #2686.
2015-12-03 14:39:36 +01:00
Thomas Boerger
ffed489156 Include execinfo.h only on __GLIBC__ 2015-11-19 22:46:47 +01:00
Thomas Boerger
a16a9eab4f Define stacktrace functions only if __GLIBC__ is defined 2015-11-19 22:46:47 +01:00
Thomas Boerger
8f3f91d3db Check for __GLIBC__ to detect correct strerror_r version 2015-11-19 22:23:47 +01:00
bibo38
ec5c38761f Changed for-loop iterator in File.cpp to a reference type to reduce object copying and fix the clang build.
Fixes #2580
2015-10-30 20:16:45 +01:00
Tiger Wang
4ddff15710 Merge pull request #2498 from cuberite/UnicodeOnWindows
Enabled Unicode support for Windows
2015-09-28 09:14:09 +01:00
Tiger Wang
803c0c6965 Added the _UNICODE flag on Windows 2015-09-26 22:19:29 +01:00
Mattes D
ad57ce5f99 Extended and fixed the cFile API. 2015-09-26 22:54:18 +02:00
Mattes D
9871c0b073 Added CircleCI for stylechecking.
This will allow us to remove the stylecheck from Travis builds, making them a bit faster, and having fast style checks
2015-09-17 11:20:10 +02:00