Commit Graph

9988 Commits (master)

Author SHA1 Message Date
proller 367d394cc5 update submodules 2016-06-03 23:29:22 +03:00
proller faa45a8014 update submodules 2016-05-29 02:28:48 +03:00
proller fc5877ffa2 fix merge 2016-05-29 02:17:19 +03:00
proller 78d54d7d6c update submodules 2016-05-28 02:56:53 +03:00
proller 5c88135607 update submodules 2016-05-27 20:21:19 +03:00
proller 0492fe3d8b Merge remote-tracking branch 'minetest/master' 2016-05-27 20:19:18 +03:00
proller 6a46f674b0 Merge remote-tracking branch 'origin/master' 2016-05-27 13:51:03 +03:00
proller 1bad52b6d8 Merge commit '725edc7' 2016-05-27 13:50:51 +03:00
est31 fa6b21a15b Tell irrlicht if we handle a key or not.
We can remove the function in MtNativeActivity now
as it serves precisely that purpose: to tell irrlicht
that we handled the esc key.

TODO for later:
 * Perhaps try to find a more performant container than KeyList
2016-05-26 20:33:33 +02:00
proller 0c93a2e238 update submodules 2016-05-25 16:17:55 +03:00
ShadowNinja ef100f12a1 Fix rollback.txt migration
Broken by b1965ac209.
This also prepares the begin and commit statements only once.
2016-05-23 11:48:30 -04:00
Craig Robbins 22f78ea38e Fix irrlicht version checking macro for tooltip_height calculation 2016-05-24 00:27:11 +10:00
Ekdohibs 725edc78b2 Move updateTextures and fillTileAttribs to ContentFeatures 2016-05-23 12:46:45 +02:00
proller b6784e006c update submodules 2016-05-23 12:45:35 +03:00
proller a2354d3485 update submodules 2016-05-22 21:58:04 +03:00
proller d603c25e5b Merge remote-tracking branch 'minetest/master' 2016-05-22 21:54:26 +03:00
est31 423d8c1b0d Tolerate packet reordering in the early init process
Fixes a bug where packet reordering made the server give the
client two peer ids instead of one. This in turn confused
reliable packet sending and made connecting to the server fail.

The client usually sends three packets at init: one "dummy"
packet consisting of two 0 bytes, and the init packet as well as
its legacy counterpart. The last one can be turned off since commit
af30183124, but this is of lower
relevance for the bug. The relevant part here is that network
packet reorder (which is a normal occurence) can make the packets
reach the server in different order.

If reorder puts the dummy packet further behind, the following
would happen before the patch:

1. The server will get one of the init packets on channel 1 and
   assign the client a peer id, as the packet will have zero as
   peer id.

2. The server sends a CONTROLTYPE_SET_PEER_ID packet to inform
   the client of the peer id.

3. The next packet from the client will contain the peer id set by
   the server.

4. The server sets the m_has_sent_with_id member for the client's
   peer structure to true.

5. Now the dummy packet arrives. It has a peer id of zero, therefore
   the server searches whether it already has a peer id for the
   address the packet was sent from. The search fails because
   m_has_sent_with_id was set to true and the server only searched
   for peers with m_has_sent_with_id set to false.

6. In a working setup, the server would assign the dummy packet to
   the correct peer id. However the server instead now assigns a
   second peer id and peer structure to the peer, and assign the
   packet to that new peer.

7. In order to inform the peer of its peer id, the server sends a
   CONTROLTYPE_SET_PEER_ID command packet, reliably, to the peer.
   This packet uses the new peer id.

8. The client sends an ack to that packet, not with the new peer id
   but with the peer id sent in 2.

9. This packet reaches the server, but it drops the ACK as the peer
   id does not map to any un-ACK-ed packets with that seqnum. The
   same time, the server still waits for an ACK with the new peer
   id, which of course won't come. This causes the server to
   periodically re-try sending that packet, and the client ACKing it
   each time.

Steps 7-9 cause annoyances and erroneous output, but don't cause
the connection failure itself.
The actual mistake that causes the connection failure happens in 6:
The server does not assign the dummy packet to the correct peer, but
to a newly created one.
Therefore, all further packets sent by the client on channel 0 are
now buffered by the server as it waits for the dummy packet to reach
the peer, which of course doesn't happen as the server assigned
that packet to the second peer it created for the client.
This makes the connection code indefinitely buffer the
TOSERVER_CLIENT_READY packet, not passing it to higher level code,
which stalls the continuation of the further init process
indefinitely and causes the actual bug.

Maybe this can be caused by reordered init packets as well, the only
studied case was where network has reliably reordered the dummy
packet to get sent after the init packets.

The patch fixes the bug by not ignoring peers where
m_has_sent_with_id has been set anymore. The other changes of the
patch are just cleanups of unused methods and fields and additional
explanatory comments.

One could think of alternate ways to fix the bug:

* The client could simply take the new peer id and continue
  communicating with that. This is however worse than the fix as
  it requires the peer id set command to be sent reliably (which
  currently happens, but it cant be changed anymore). Also, such a
  change would require both server and client to be patched in order
  for the bug to be fixed, as right now the client ignores peer id
  set commands after the peer id is different from
  PEER_ID_INEXISTENT and the server requires modification too to
  change the peer id internally.
  And, most importantly, right now we guarantee higher level server
  code that the peer id for a certain peer does not change. This
  guarantee would have to be broken, and it would require much
  larger changes to the server than this patch means.

* One could stop sending the dummy packet. One may be unsure whether
  this is a good idea, as the meaning of the dummy packet is not
  known (it might be there for something important), and as it is
  possible that the init packets may cause this problem as well
  (although it may be possible too that they can't cause this).

Thanks to @auouymous who had originally reported this bug and who
has helped patiently in finding its cause.
2016-05-22 15:56:54 +02:00
Loic Blot f64a6259b2 Fix a m_camera not used warning fix pointed by clang 2016-05-22 13:31:41 +02:00
Loic Blot ce42ff9cf7 Implement a PostgreSQL backend 2016-05-22 11:34:47 +02:00
HybridDog 0f184d77c8 Gitignore: ignore idea and ninja files 2016-05-22 08:22:37 +01:00
paramat 643ac9dd7a Item entities: Don't show description as infotext
Partially reverts #3547
Infotext remains optional for objects, empty by default
2016-05-22 08:21:44 +01:00
proller 0af32e7eac update submodules 2016-05-21 17:40:05 +03:00
proller dbd2f816fb arm64: fix defaults 2016-05-21 17:39:13 +03:00
proller d338681f65 Merge remote-tracking branch 'minetest/master' 2016-05-21 01:25:10 +03:00
Craig Robbins 88acda0256 Fix tooltip height for versions of irrlicht < 1.8.2
Version 1.8.2 of irrlicht changed the way that IGUIStaticText::getTextHeight() works and since that release properly deals with newlines.

From irrlicht changes.txt for 1.8.2, "IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set."
2016-05-21 00:26:04 +10:00
proller af9e05169e update submodules 2016-05-19 15:01:20 +03:00
proller 53af56146c update submodules 2016-05-18 17:10:15 +03:00
proller 6b06bf433d Merge remote-tracking branch 'minetest/master' 2016-05-18 16:38:10 +03:00
nerzhul 8ba6d9f227 Implement DatabaseException for databases 2016-05-17 14:36:51 +02:00
Wayward One 8b940c005f Add on_punchnode callback 2016-05-17 22:16:21 +10:00
Loic Blot 143401451c DB::loadBlock copy removal & DB backend cleanup
* Remove the copy from db::loadBlock by using a pointer to the destination
* cleanup db backend, the child backend doesn't have to set their functions as virtual
2016-05-17 06:52:16 +02:00
sfan5 decbd396df Really fix ncurses lookup on Arch Linux
Commit 27ee8d8943 forgot to add the paths
without ncursesw/ to the find_path() call
2016-05-16 12:43:50 +02:00
est31 7a828de1bc Android: enable parallelism for main target too
This adds to the changes that commit

98d16e0d9a "Android: Tell make about sub-makes to speed up build"

did, and enables parallel builds for minetest
itself as well.
2016-05-16 05:14:25 +01:00
paramat 01a784bd11 Documentation: Remove incorrect and excessive mapgen flags text 2016-05-16 05:14:15 +01:00
proller 3dc3370f72 Release 0.4.14.8 2016-05-16 00:53:39 +03:00
proller e476052694 update submodules 2016-05-16 00:49:48 +03:00
proller be428cca9d android: move patches to patches/ , merge mt 2016-05-16 00:14:43 +03:00
proller ffb4243a79 Merge commit '854d9e3' 2016-05-16 00:06:33 +03:00
sfan5 fb31bd3806 Continue with 0.4.14-dev 2016-05-15 14:49:15 +02:00
sfan5 854d9e3745 Bump version to 0.4.14 2016-05-15 14:49:15 +02:00
est31 c65e7a9b3e Android: Re-add button to remove singleplayer world
Fixes #4120.
2016-05-14 22:25:58 +02:00
est31 b25554c8d7 Fix android build by fixing patch line endings 2016-05-14 16:46:46 +02:00
Maksim Gamarnik b906ed4e59 Fix locked hardware buttons on Android
Fixes #2122
Fixes #1454

Addendum (est31)
According from its docs in android_native_app_glue.h (from the NDK), the
onInputEvent should "Return 1 if you have handled the event, 0 for any
default dispatching". Before, we always returned 1, meaning we blocked
all hardware keys to be given to the OS.
This broke the volume keys and has caused #2122 and #1454.

Although it bases on lots of guesswork, it can probably safely be said that
CGUIEnvironment::postEventFromUser returns true if the event was handled,
and false if not. Therefore, set the status variable depending on what
postEventFromUser returned.
2016-05-14 23:42:36 +10:00
proller 48c7c108bd Merge remote-tracking branch 'minetest/master' 2016-05-13 23:47:40 +03:00
est31 ec15e35ad7 Mainmenu: don't show change keys dialog on android
The change keys dialog can't be left. It doesn't make
much sense to show it on Android in the first place,
therefore disable it, just like commit

aed70cb0b6 'Disable sound and key binding settings in "pause" menu on android'

has disabled it for the esc menu.

Fixes #4115.
2016-05-13 17:30:53 +01:00
proller 2d20f51702 update submodules 2016-05-12 19:16:24 +03:00
proller 8f04392004 Merge remote-tracking branch 'minetest/master' 2016-05-12 19:16:06 +03:00
Rui 9d3d43f334 Fix #4111 ("Provided world path doesn't exist" if choosing singleplayer on first run")
Bug and whitespace error fixed (Zeno)
2016-05-13 01:41:16 +10:00
proller 3ebe3f4872 Merge remote-tracking branch 'minetest/master' 2016-05-12 12:46:59 +03:00
est31 997002703b Android: download deps using https
Its more secure, and some pages even redirect to the https version.
2016-05-12 05:03:15 +02:00