summaryrefslogtreecommitdiffstats
path: root/src/OSSupport (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-08-23cUrlClient: Exported to Lua API.Mattes D1-0/+5
2016-08-22cTCPLink supports TLS out of the box.Mattes D3-2/+397
2016-08-13IPLookup: Fixed a soft memory leak when looking up invalid IPs.Mattes D1-1/+7
2016-08-07Removed "." and ".." from cFile:GetFolderContents(). (#3301)Mattes D1-0/+14
2016-07-18CMake: Remove needless minimum version specifications.Mattes D1-2/+0
2016-06-26Self tests (#3242)Mattes D2-6/+3
* 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-18cNetwork: Fixed possible hang when terminating immediately after init.Mattes D2-2/+27
2016-06-18SelfTests: Removed the unneeded cSelfTests class.Mattes D1-1/+0
2016-06-18Moved NetworkInterfaceEnum test to a separate test project.Mattes D1-28/+0
2016-02-05Bulk clearing of whitespaceLogicParrot11-81/+81
2016-01-01Renamed leftover strings to Cuberite / Server, as needed.Mattes D1-1/+1
Also upgraded the user setting file for MSVC to 2013.
2015-12-19Use atomic bool for isthread terminatetycho1-1/+2
2015-12-19Added HTTPS links wherever they are supported.Alexander Harkness2-10/+2
2015-12-17Moved variables into scope, removed unused variables and fixed variablesLukas Pioch1-1/+1
2015-12-03Use C++11 auto instead of per-platform types.Mattes D1-8/+1
Closes #2686.
2015-11-19Include execinfo.h only on __GLIBC__Thomas Boerger1-1/+3
2015-11-19Define stacktrace functions only if __GLIBC__ is definedThomas Boerger1-5/+7
2015-11-19Check for __GLIBC__ to detect correct strerror_r versionThomas Boerger1-1/+1
2015-10-30Changed for-loop iterator in File.cpp to a reference type to reduce object copying and fix the clang build.bibo381-1/+1
Fixes #2580
2015-09-26Added the _UNICODE flag on WindowsTiger Wang1-1/+1
2015-09-26Extended and fixed the cFile API.Mattes D2-95/+186
2015-09-17Added CircleCI for stylechecking.Mattes D2-502/+0
This will allow us to remove the stylecheck from Travis builds, making them a bit faster, and having fast style checks
2015-08-27Small fix for cEventTiger Wang2-8/+13
Don't bother using atomics since a synchronisation primitive is already being used.
2015-08-20Fixed and improved restartingTiger Wang2-27/+37
Restarts are now an actual, close-as-possible to application exit+reopen.
2015-08-18Some warning fixesJulian Laubstein1-1/+3
2015-07-31Unified the doxy-comment format.Mattes D3-26/+25
2015-07-31Moved AString reading hack to cFile.Mattes D2-8/+32
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney3-8/+8
2015-07-23Fixed cNetworkSingleton's HasTerminated flag.Mattes D1-1/+4
Should fix random failures in Google-test.
2015-07-07Network: Fixed ServerHandle's address formatting.Mattes D1-2/+2
2015-06-22Fixed minor errors in Tycho's codeTiger Wang4-46/+40
Everything should work now :)
2015-06-11SelfTests are registered and executed after logging framework init.Mattes D1-3/+10
Fixes #2228.
2015-06-04Skip unknown cflag for Apple clang & remove cSemaphoreCengiz Can4-128/+2
2015-05-30Fix FreeBSD/clang errors caused by -Werrorlinnemannr1-1/+8
With FreeBSD/clang, -Werror combined with the configured warning flags yields some fatal errors, specifically related to signed conversion, 64 to 32 bit conversion, and tautological compares. CONTRIBUTORS Add myself to the contributor list src/Generating/FinishGen.cpp In cFinishGenPassiveMobs::GetRandomMob(), change the type of RandMob from size_t to the difference_type of the ListOfSpawnables iterator MobIter. Using size_t triggers a 64 bit to 32 bit conversion if the difference_type of the iterator class is 64 bit Also explicitly cast the noise expression to unsigned long so we don't get a signed conversion warning from the modulo against ListOfSpawnables.size() src/OSSupport/StackTrace.cpp FreeBSD 10 and above includes a non glibc implementation of benchmark() for which size_t, not int, is the return type. To account for this and prevent a signed conversion warning, abstract the type for numItems with a macro btsize src/StringUtils.h In StringToInteger(), correct a tautological compare warning for unsigned types with the template. If T is unsigned, comparing std::numeric_limits<T>::min() to the unsigned result is always false. That control can enter this branch in an evaluated template with an unsigned type T may also permit a signed number to be parsed and erroneously stripped of its signedness at runtime. To guard against this and avoid the warning in the case that the number parsed from the string is non-positive, return false and don't try to parse if T is unsigned and control enters the non-positive branch
2015-05-25Support building on FreeBSDlinnemannr1-1/+1
SetFlags.cmake Add -lexecinfo to linker flags for FreeBSD to resolve backtrace() lib/sqlite/CMakeLists.txt Define _XOPEN_SOURCE to 600 instead of __POSIX_VISIBLE to 200112 for POSIX 1-2001 support. For POSIX standards, the _XOPEN_SOURCE define controls the eventual value of __POSIX_VISIBLE. _XOPEN_SOURCE is defined to 500 in sqlite.c if not already defined, which sets up _POSIX_C_SOURCE and __POSIX_VISIBLE to the 199506 for POSIX.1c lib/tolua++/CMakeLists.txt src/CMakeLists.txt Add /usr/local/lib to the library search path for FreeBSD builds src/OSSupport/Errors.cpp Correct the strerror_r() implementation determination to check whether _GNU_SOURCE is defined, not what it evaluates to
2015-05-24Made -Weverything an error.tycho2-2/+2
2015-05-23Fix teststycho1-0/+4
2015-05-19Finish fixing windowstycho1-2/+2
2015-05-19Properly fix cFile Warningstycho2-11/+11
2015-05-19Fixed a lot of warningstycho2-10/+22
2015-05-09CheckBasicStyle: checks spaces around * and &.Mattes D1-1/+1
2015-05-09More style checking.Mattes D3-3/+3
Spaces around some operators are checked.
2015-04-30Fixed bindings for cFile:ReadWholeFile().Mattes D1-1/+6
Fixes #1914
2015-04-21Network: fixed excessive debug logging.Mattes D2-7/+1
2015-04-11cFile:ChangeFileExt now accepts extensions with leading dot, too.Mattes D1-2/+14
2015-04-11Added more cFile API functions.Mattes D2-2/+66
GetLastModificationTime, GetPathSeparator() and GetExecutableExt()
2015-04-10Added proper implementation of cFile::ChangeFileExt().Mattes D1-2/+17
2015-04-06Added cFile:ChangeFileExt() function.Mattes D2-0/+27
2015-03-22Unified cPacketizer across all protocols.Mattes D1-6/+6
2015-03-18Network: Close the UDP endpoint in destructor.Mattes D2-0/+11
2015-03-10Use std::memcpy to fix alignmentTiger Wang1-2/+8
As suggested by @madmaxoft
2015-03-08Potential Linux implementationTiger Wang1-4/+54
2015-02-22Network: Replaced magic number with named constant.Mattes D1-1/+1
2015-02-22cNetwork: Added EnumLocalIPAddresses() function.Mattes D3-0/+133
2015-02-20UDPEndpointImpl: Fixed clang warnings.Mattes D1-3/+3
2015-02-20cNetwork: Added UDP API.Mattes D5-1/+780
2015-02-18NetworkSingleton: LibEvent thread is joined properly on server exit.Mattes D2-7/+5
2015-02-18Network: Fixed two-socket servers.Mattes D1-1/+1
2015-02-14Fixed TCP link shutdown.Mattes D2-9/+68
The shutdown is postponed until there's no more outgoing data in the LibEvent buffers.
2015-02-08ServerHandle: Fixed socket reuse.Mattes D1-10/+30
Fixes CID 104670, CID 104670 and CID 103724.
2015-02-07Use evutil_make_listen_socket_reuseableHowaner1-16/+6
2015-02-07Set reuse flag to socketsHowaner1-1/+24
Should fix #1726
2015-02-04Exported cServerHandle and cNetwork:Listen to Lua.Mattes D1-0/+3
Also added an example to the NetworkTest plugin.
2015-02-04cTCPLink: Fixed missing addresses on link connection.Mattes D1-2/+2
2015-01-29Fixed missing LibEvent reference in OSSupport.Mattes D1-1/+1
2015-01-27Fixed listening ports not closed on cServerHandle::Close.Mattes D1-0/+3
2015-01-27Added network termination called at app exit.Mattes D2-12/+43
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2015-01-27cTCPLinkImpl: Added the BEV_OPT_THREADSAFE flag.Mattes D1-2/+8
2015-01-27ServerHandleImpl: Removed needless diagnostic output.Mattes D1-4/+0
2015-01-27Removed cFile::ReplaceFileNameInvalidChars().Mattes D2-26/+0
Its only usage in cProtocol18 has been changed to a simple string replace - only the IPv6's colons were causing problems.
2015-01-27Removed ListenThread and SocketThreads.Mattes D5-1225/+0
They have been replaced by the cNetwork API. Socket.cpp is still used by RCONClient.
2015-01-27cNetwork: Fixed IP address reading for incoming connections.Mattes D1-1/+2
2015-01-27cFile: Added ReplaceFileNameInvalidChars().Mattes D2-0/+26
2015-01-27Fixed missing LibEvent reference in OSSupport.Mattes D1-1/+1
2015-01-23cNetwork: Added self pointers to keep objects alive for callbacks.Mattes D5-17/+39
Ref.: http://forum.mc-server.org/showthread.php?tid=1700&pid=17947#pid17947
2015-01-22cNetwork: Renamed callback to OnConnected()Mattes D2-3/+6
2015-01-22cNetwork: Added link creation callback.Mattes D4-15/+42
This allows the callback classes to store the link inside them and use it internally later on, mainly for sending data.
2015-01-22cNetwork: Changed listening API.Mattes D4-29/+51
The link-callbacks for each new accepted link are now received from the OnIncomingConnection listen-callback.
2015-01-22cNetwork: Added error message to error callbacks.Mattes D5-13/+20
2015-01-22cTCPLinkImpl: Fixed type conversion warning.Mattes D3-5/+5
2015-01-22cNetwork: Fixed race conditions with lookups; proper shutdown.Mattes D6-82/+123
2015-01-22cNetwork: Split the main cpp file into several files.Mattes D13-1050/+1148
2015-01-22cNetwork: Fixed WinXP dualstack listening.Mattes D1-21/+42
2015-01-22cNetwork: Split cNetworkSingleton to a separate file.Mattes D4-325/+430
2015-01-22cNetwork: Fixed WSAStartup()-not-called error in Listen().Mattes D1-0/+3
2015-01-22cNetwork: Handle WSA initialization failures.Mattes D1-1/+7
2015-01-22cNetwork: Added an OnError callback for listening servers.Mattes D2-0/+8
The callback receives the error details.
2015-01-22cNetwork: Rewritten server listen into a factory method.Mattes D1-88/+102
2015-01-22cNetwork: Removed unneeded dependency.Mattes D1-1/+0
2015-01-22cNetwork: Refactored cTCPLinkImpl::Connect into a factory.Mattes D1-41/+48
2015-01-22cNetwork: Cosmetics.Mattes D1-6/+10
2015-01-22cNetwork: Fixed compilation.Mattes D1-9/+8
2015-01-22Wrap debug variable in ifdef worktycho1-0/+2
avoidss unused variable error in clang
2015-01-22cNetwork: Added error logging to server socket creation.Mattes D1-6/+24
This is mainly for WinXP and RasPi testing.
2015-01-22cNetwork: Added multithreading protection.Mattes D2-3/+28
2015-01-22cNetwork: Implemented connection shutdown and close.Mattes D2-17/+59
2015-01-22cNetwork: Fixed Linux compilation.Mattes D1-5/+23
2015-01-22cNetwork: Implemented link address getting.Mattes D1-57/+117
2015-01-22cNetwork: Implemented basic server functionality.Mattes D1-122/+215
2015-01-22cNetwork: Implemented IP-to-hostname lookup.Mattes D1-8/+114
2015-01-22cNetwork: Implemented HostnameToIP lookups.Mattes D2-6/+141
2015-01-22Extracted Google connection testTycho1-74/+3
2015-01-22cNetwork: Linux compilation fix.Mattes D2-4/+23
2015-01-22Implemented LibEvent-based client connections.Mattes D3-0/+1027
2015-01-18Fixed various warnings.Mattes D1-1/+1
2015-01-17Fixed CppCheck: (performance) Possible inefficient checking for emptiness.Kirill Kirilenko1-2/+2
2014-12-25cIsThread: Fixed a race condition on thread start.Mattes D2-7/+30
2014-12-11Cosmetic touchups.Mattes D1-1/+1
Removed trailing whitespace, added cast to remove warning, added file seeking in case of corrupt files.
2014-12-09Added a RemoveIf() function to cQueueMattes D1-0/+23
2014-12-07Fixed integer overflow problems.Mattes D2-4/+4
The event would overflow when requesting a 60 minute timeout.
2014-12-07Fixed c++11 branch issues.Mattes D1-10/+10
2014-12-05BasicStyle: Added missing braces to control statements.Mattes D1-1/+10
2014-12-05Fixed reported parentheses around comparisons.Mattes D1-1/+1
2014-12-04Fixed trailing whitespace.Mattes D1-5/+5
2014-12-03Fixes socket leak in HTTP server.Mattes D1-3/+11
Fixes #1643.
2014-11-30Fixed compiling on linux.Howaner1-0/+1
2014-11-29Added a basic stacktracing for assert and signal failures.Mattes D3-2/+64
2014-11-23Compilation fixesTiger Wang1-2/+2
2014-11-04cEvent: Changed chrono duration resolution.Mattes D1-1/+1
2014-11-04cEvent: Changed steady_clock to system_clock.Mattes D1-2/+2
2014-10-24Moved the chrono include into Globals.Mattes D1-1/+0
2014-10-24Added a missing chrono include.Mattes D1-0/+1
2014-10-24OSSupport/CMakeLists.txt: fixed indentationarchshift1-3/+3
2014-10-24SuggestionsTiger Wang3-6/+46
2014-10-24Fixed potential linker errors with mingw, as it isn't MSVC and it isn't APPLE.archshift1-4/+4
2014-10-23Fix linking on OS X, which does not have librt.archshift1-2/+6
2014-10-23Reimplemented cEvent using C++11 primitives.Mattes D2-136/+51
Fixes #1523.
2014-10-23En masse NULL -> nullptr replaceTiger Wang9-35/+35
2014-10-21Compile fix?Tiger Wang1-2/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang9-35/+35
2014-10-20Use std::recusive_mutexTiger Wang3-52/+9
2014-10-20Migrated cSleep and cTimer to std::chronoTiger Wang6-98/+1
2014-10-19Use std::threadTiger Wang7-339/+34
2014-10-12convert old style casts to fix warningsSteven Riehl1-20/+16
2014-10-06Update CMakeLists.txtworktycho1-1/+1
2014-10-05Added a cEvent::Wait() with timeout.Mattes D2-0/+51
2014-09-14OSSupport: Fixed UNICODE Windows builds.Mattes D2-8/+8
The files now compile even inside UNICODE applications.
2014-08-28Fixed spaces after "template" keyword.Mattes D1-1/+1
2014-08-15Removed an unneeded cast.madmaxoft1-1/+1
2014-08-12Fixed windows compilation and style issues.madmaxoft1-4/+4
2014-08-10First Implementatation of new Loggin frameworkTycho2-3/+5
2014-07-24Removed redundant semicolons and re-added warningarchshift1-2/+2
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft8-44/+44
2014-07-21Style: Normalized spaces after if, for and while.madmaxoft3-13/+13
2014-07-19Socket: removed unused Socket destructorarchshift2-10/+0
2014-07-19Fixed style: spaces after commas.madmaxoft2-5/+5
2014-07-19Subdirs: Only add_library if not using MSVCarchshift1-3/+5
2014-07-19OSSupport/CMakeLists.txt: Replaced glob with list of filesarchshift1-5/+32
2014-07-17Fixed tabs used for alignment.madmaxoft3-19/+35
2014-07-17Basic style fixes.madmaxoft4-7/+7
2014-07-17Normalized comments.madmaxoft7-18/+18
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-01Fixed printf formats for Win buildsmadmaxoft2-4/+4
2014-06-30Fixed cFile compilation under MinGW.madmaxoft1-0/+3
2014-06-19Nullify deleted pointers.archshift3-0/+4
2014-06-08Fixed deadlock when moving players to other worlds.Mattes D2-3/+22
Fixes #1039, fixes #851
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D4-8/+8
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D4-8/+8
2014-05-02Open files in shared mode on windows, so that other tools may read them.madmaxoft1-2/+2
This was the behavior before fopen_s() was used for implementation; unlike fopen(), fopen_s() opens the file in exclusive mode.
2014-05-01Fixed crashes in the SSL HTTP connection.madmaxoft1-2/+4
2014-04-30Removed the unused cBlockingTCPLink class.madmaxoft2-170/+0
2014-04-28Template MagicTycho2-4/+4
Removed need to allocate a fake meta block by using templates to provide a version of the code that does not use metas. Also changed the function to a template argument to make sure that the compilier is able to inline it.
2014-04-27cSocket creates the socket in Connect if no socket is present yet.madmaxoft1-2/+8
2014-04-26Fixed unitialized member in gZipFile (CID 43673)jfhumann1-1/+1
2014-04-26Fixed mobs that don't naturally spawn.archshift1-5/+5
2014-04-25Cmake generated projects for IDEs include headers in project files.archshift1-0/+1
2014-04-11Fixed issues with 64-bit MSVC compilation.madmaxoft3-21/+35
2014-04-02Fixed All signedness warnings in HTTPServer.cppTycho1-1/+1
2014-04-01More cFile warning fixes.madmaxoft1-1/+1
2014-04-01Fixed clang warnings in cGZipFile.madmaxoft1-2/+2
2014-04-01Fixed clang warnings in cFile.madmaxoft1-10/+10
We only support 32-bit filesizes (files < 2 GiB).
2014-03-28Fixed non-virtual destructors warnings.madmaxoft1-9/+11
2014-03-25More fixes to get it to compile for me on Mac 10.9. Mostly just newline additions, but some of the unused variables were causing errors, so I wrapped them in #ifndef __APPLE__ calls, since I didn't know if they were going to be used in the future.Samuel Barney1-1/+1
Also had to undefine TOLUA_TEMPLATE_BIND a couple of times.
2014-03-25Added newlines. Without them, the files would not compile.Samuel Barney2-2/+2
2014-03-18Fixed cGZipFile::ReadRestOfFile returning incorrect value.madmaxoft1-1/+4
2014-03-14Fixed xofts issuesTycho1-1/+1
2014-03-12Added additional macros to support the MSVC size_t format and changed all formats to use the macrosTycho1-1/+1
2014-03-11Fixed a load of format string errorsTycho1-1/+1
2014-03-11Added macros to follow format string checking through wrappersTycho1-1/+1
2014-03-10Fixed cast to type with different alignment in BlockingTCPLinkTycho1-1/+1
2014-03-10Fixed cast between types of different alignment in cSocketTycho1-1/+2
2014-03-09Fix IsThread destructorTycho1-1/+1
2014-03-07Fixed warningsTycho1-1/+1
2014-02-28Fixed multiple gcc warnings about unused params.madmaxoft1-0/+4
2014-02-23fixed globals.h warningsTycho1-1/+5
2014-02-03Fixed #491Tiger Wang1-2/+14
2014-02-03Fixed socket leaking.madmaxoft1-0/+5
2014-02-03SocketThreads: Fixed sending to closed socket.madmaxoft1-1/+6
2014-01-28Fixed timing on *nix.madmaxoft1-1/+1
2014-01-27Squashed common code.madmaxoft1-14/+7
2014-01-27Fixed Linux compilation.madmaxoft1-1/+2
2014-01-27Rewritten networking to use non-blocking sockets.madmaxoft4-62/+176
This fixes #592.
2014-01-25Added cFile::Flush().madmaxoft2-20/+34
This is useful when using cFile as a log file and we know the server may crash after a specific write, so we flush the file before continuing.
2014-01-25Switched cEvent to GetOSErrorStringTycho3-18/+14
2014-01-25Extracted cSocket::GetErrorString into GetOSErrorStringTycho6-59/+62
2014-01-23Switched cEvent to use strerror_r for error messagesTycho1-6/+18
2014-01-19Rewritten SocketThreads for proper shutdown scenario.madmaxoft4-158/+182
This fixes #560 and #390.
2014-01-19SocketThreads: Removed unused code.madmaxoft2-53/+3
2014-01-16Fixed SIGPIPE on cSocket::Send().madmaxoft3-12/+13
2014-01-16Another VarArgs fix.madmaxoft1-4/+2
This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
2014-01-15Using a 2nd argument instead of va_copy().madmaxoft1-2/+4
This seems to be the only reasonable C++03-only solution.
2014-01-13Removed shutdown() from socket closing.madmaxoft1-4/+0
It's not there for Windows and everything seems fine, the client doesn't shutdown either, so why should we be polite. Fixes #537.
2014-01-05Added fake functions into cCriticalSection because of the change to ASSERTDiusrex1-0/+5
2014-01-05Fixed a race condition in the cQueue class.madmaxoft1-59/+86
Fixes #505.
2014-01-03Fixed DocumentationTycho1-4/+2
2014-01-03derpTycho1-1/+1
2014-01-03actual fixTycho1-2/+9
2014-01-03fixed failure to return a value from RemoveTycho1-1/+1
2014-01-03implement xsofts recommendationsTycho Bickerstaff1-9/+15
2014-01-02added documentationTycho Bickerstaff1-7/+45
2014-01-02rewrote queue not to use promises for waitsTycho Bickerstaff3-105/+11
2013-12-31fogot to add promise classesTycho Bickerstaff2-0/+92
2013-12-31clean up code for patchingTycho Bickerstaff2-3/+4
2013-12-31refactored chunk Queue to seperate classTycho Bickerstaff4-26/+95
2013-12-22fixed rdynamic as its not acctually needed a cmake handles it, looks like the problem was caused by the linux linker accepting the option twice and the os x linker notTycho Bickerstaff1-0/+31
2013-12-28Fixed a (valid) warning in RCONServer.madmaxoft1-0/+3
2013-12-21basic threadsafe queue interfaceTycho Bickerstaff2-0/+34
2013-12-20Fixed the rest of constructor reorders.madmaxoft1-2/+2
2013-12-19added pthread linking code to OSSupportTycho Bickerstaff1-0/+4
2013-12-10added tolua++ command and removed stackwalker from buildTycho Bickerstaff1-1/+0
2013-12-10more cmake changesTycho Bickerstaff1-2/+4
2013-12-10more cmakeTycho Bickerstaff1-1/+3
2013-12-10fixed comparison of thread handle to Null point rather than null handleTycho Bickerstaff1-1/+1
2013-12-10started work on cmakeTycho Bickerstaff1-0/+7
2013-11-27Fixed the remaining derpsAlexander Harkness1-1/+1
2013-11-25Further attempts to fix compileTiger Wang1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness26-0/+3573