summaryrefslogtreecommitdiff
path: root/src/network
Commit message (Collapse)AuthorAge
* Hide minimap if it has been disabled by serverest312015-09-01
|
* Change i++ to ++iDavid Jones2015-08-25
|
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Remove unused function from connection.{cpp,h}nerzhul2015-08-15
|
* Make NetworkPacket respect serialized string size limitskwolekr2015-08-10
|
* Fix BufferedPacket race condition (fixes #2983)kwolekr2015-08-06
| | | | | This was caused by the use the non-threadsafe SharedBuffer in a threaded context.
* Fix critical vulnerabilities and bugs with NetworkPacketkwolekr2015-08-06
|
* connection: Make assertions non-fatal for received datakwolekr2015-08-05
|
* src/network/connection.h: Fix race conditionBřetislav Štec2015-08-01
|
* Fix srp.cpp:815 leakest312015-07-27
| | | | Thanks @Zeno-
* Bump protocol to 26est312015-07-24
| | | | | | | This was needed due to the TileDef serialisation changes. Originally it has been planned to also add utf-8 based chat to 26, but chat changes aren't final yet, so they are done in one change, after the release, and not two small ones, causing us having to be compliant to three versions of the packet.
* Optional reconnect functionalityest312015-07-23
| | | | | | Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
* Ask auth handler to create auth when a default password is setest312015-07-21
| | | | | -> Fix server crash with protocol >=25 if a default password is set. -> Remove some useless and possibly confusion causing code for the TOCLIENT_FIRST_SRP packet handler
* Fix relief mapping issuesRealBadAngel2015-07-16
|
* connection.cpp: remove unused constructorLoic Blot2015-07-14
|
* Remove raw message output on AOM deserialization failurekwolekr2015-07-13
| | | | Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
* Fix damage flash when damage disabledkwolekr2015-07-10
|
* Use UTF-8 instead of narrowest312015-07-08
| | | | | Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places. Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
* Client: better m_proto_ver initialisationest312015-07-07
| | | | | | | | Previously, m_proto_ver was set to the serialisation version inside the legacy init packet. Now, if the server doesn't send a protocol version (protocols < 25), we set m_proto_ver to some value < 25 and > 0.
* Typo fix on previous @est31 commitLoic Blot2015-06-23
|
* Small TOCLIENT_HELLO logging fixest312015-06-23
| | | | | Fix grammar error and missing number conversion for version. Also add deployed protocol to log line.
* Use actionstream instead of errorstream when failing to emerge playerCraig Davison2015-06-23
|
* Generic CAO cleanups and renames for clarificationest312015-06-20
| | | | | | | | * Use enum for GENERIC_CMD_* * Rename m_attachements to attachement_parent_ids (public member and clearer name) * Rename GENERIC_CMD_SET_ATTACHMENT to GENERIC_CMD_ATTACH_TO * USHRT_MAX + 1 buffer sizes to prevent overflows as @kahrl suggested * Remove unneccessary m_id from GenericCAO (shadowing protected superclass member for no reason) as @kahrl suggested
* Deny empty username early in the protocolest312015-05-22
| | | | Thanks to @UltimateNate for pointing this out :)
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-19
| | | | | | Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
* Lower log level for unexpected behaviourest312015-05-19
| | | | | Its a possible mistake to log in to a server with twice the same name. Before, it triggered a server wide error message, now it logs to actionstream.
* Fix build since last commitest312015-05-16
| | | | Also rename method to better match what it does.
* Finalize init packets and enable protocol v25est312015-05-16
| | | | This enables srp.
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
| | | | | | | Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
* Stop NetworkPacket methods from producing bloated packetsJay Arndt2015-05-05
|
* Protocol 25: wstring -> string for custom access denial reasonsest312015-04-22
| | | | Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
* Refactor around translatePasswordest312015-04-17
| | | | | | | Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
* Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY renameest312015-04-07
|
* TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD can be unreliable, catch PacketError ↵Loic Blot2015-04-05
| | | | | | exception. Also set the packet size at creation not when pushing rawString, no functional change
* Fix uninitialized variabled in ConnectionEventLoic Blot2015-04-05
|
* Remove errorstream logging on password changeest312015-04-03
| | | | This seems to be a debug message which has been forgotten to be removed.
* Create PacketError exception and use it with ACTIVEOBJECT_REMOVE_ADD handler ↵Loic Blot2015-04-03
| | | | which can be unreliable
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
* NetworkPacket: reading outside packet is now clearer.Loic Blot2015-04-01
| | | | Use a common function to check the reading offset
* Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot2015-03-31
| | | | | | | Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing This remove a long existing memory copy Also check the packet size directly into Connection::Receive instead of packet processing
* RunCommandQueues: little optimizationLoic Blot2015-03-31
| | | | remove command from queue on success, else do nothing, instead of remove command from queue and push it front on success
* Typo in getOutgoingSequenceNumber => successfull to successfulLoic Blot2015-03-31
|
* Use Buffer not SharedBuffer in NetworkPacket::oldForgePacketLoic Blot2015-03-30
|
* queued_commands must be a std::deque. RunCommandQueues needs to push packet ↵Loic Blot2015-03-29
| | | | on front, not back
* Change error_message from wstring to stringShadowNinja2015-03-27
| | | | This removes a lot of narrow/wide conversions where a wide string was never used.
* Clean up and tweak build systemShadowNinja2015-03-27
| | | | | | | | | | | | | | | | * Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
* Don't send an InventoryAction at each setInventoryModified, we only need one ↵Loic Blot2015-03-24
| | | | | | | | SendInventory per inventory modification Client doesn't like to receive multiples SendInventory for one action, this can trigger glitches on clients (sometimes due to incorrect UDP packet ordering due to UDP protocol) This fix issue #2544
* Remove unused ConnectionCommand::sendToAll function. ↵Loic Blot2015-03-22
| | | | | | NetworkPacket::oldForgePacket returns Buffer instead of SharedBuffer and is used in ConnectionCommand instead of Connection::Send This remove the NetworkPacket buffer => SharedBuffer => Buffer copy. Now NetworkPacket => Buffer
* SendInventory when handleCommand_Interact is a use.poet-nohit2015-03-21
| | | | This call was missing when change looping to triggering SendInventory: 1b2f64473ed4f222d3b7f02df853730d4382105e
* ServerpacketHandler: spelling fixesLoic Blot2015-03-18
|