Commit Graph

4745 Commits

Author SHA1 Message Date
Mikkel Krautz
e5ff9c5225
Merge PR #3310: Correctly handle ServerResolver errors, with dedicated signal and slot 2018-01-21 17:09:53 +01:00
davidebeatrici
6bd9bc9c9d Correctly handle ServerResolver errors, with dedicated signal and slot
This commit adds a signal to ServerResolver and a slot to MainWindow to handle ServerHandler errors, in order to start the reconnection timer after the first connection attempt.

Fixes #3220.
2018-01-21 14:29:31 +01:00
Mikkel Krautz
97d776aef1 ServerHandler: use ping interval and connection timeout duration from Settings instead of magic numbers. 2018-01-14 23:20:29 +01:00
Mikkel Krautz
5d4a7d3bc9 Settings: implement settings for ping interval and connection timeout duration.
This commit implements (hidden, for now) settings for setting the
ping interval and connection timeout duration.
2018-01-14 23:20:29 +01:00
Mikkel Krautz
d1888619f4 ServerHandler: do not send pings unless the TLS handshake has completed.
sss123next in mumble-voip/mumble#3294 reports that the current ping
timer logic causes problems with slow TLS handshakes, such as when
connecting to servers with large DH parameters.

This commit ensures pings are not sent before the TLS handshake has
completed.

This was tested against a Grumble instance built against a modified
crypto/tls package that sleeps during the handshake. I verified that
isEncrypted() returns false when the handshake has not finished, and
returns true when the handshake has completed.
2018-01-13 21:53:05 +01:00
Jonas Herzig
fb4451da7a GRPC: fix deadlock in removeChannel
Server::removeChannel already acquires the voice threads lock where
necessary, doing so before calling it will result in a dead lock.
2018-01-09 12:57:24 +01:00
Jonas Herzig
27edcd4b66 GRPC: remove unsafe calls to IsCancelled
Since AsyncNotifyWhenDone has been added to gRPC, IsCancelled is
never safe to call with the async API unless the done tag has arrived.
Now that AsyncNotifyWhenDone is used to clean up cancelled streams,
calling it isn't needed anyway as any cancelled streams are cleaned
up right after they're known to be cancelled.
2018-01-07 23:13:55 +01:00
Jonas Herzig
76a17577f6 GRPC: fix flipped logic in removeTextMessageFilter 2018-01-07 23:13:41 +01:00
Jonas Herzig
92cd615281 GRPC: use AsyncNotifyWhenDone instead of cleanup timer 2018-01-07 23:13:41 +01:00
Mikkel Krautz
28f55afc34 TestServerResolver: reference upstream WineHQ bug in tests skipped on Wine. 2018-01-04 22:53:46 +01:00
Mikkel Krautz
3dd8f1d980 PlatformCheck: add a reference to the Wine wiki for our Wine detection code. 2018-01-04 16:58:02 +01:00
Mikkel Krautz
159be4bc4c PlatformCheck: do not assign QLibrary::resolve() retval to variable for wider compatibility.
Qt 4 uses 'void *' for this, Qt 5 uses QFunctionPointer -- a typedef to
'void (*)()'.
2018-01-04 12:09:39 +01:00
Mikkel Krautz
f0c2d8b1fc TestServerResolver: skip SRV tests when running on Wine. 2018-01-04 11:21:44 +01:00
Mikkel Krautz
5192831bc6 src/tests: update .pro files to append to SOURCES and HEADERS instead of overwriting them.
Now that test.pri adds source files and headers by default, the .pro files
of our tests need to append to SOURCES and HEADERS to ensure everything
test.pri adds to SOURCES and HEADERS are kept around.
2018-01-04 11:21:44 +01:00
Mikkel Krautz
29ebd2beff Build PlatformCheck into all test binaries. 2018-01-04 11:21:43 +01:00
Mikkel Krautz
3c400f4f02 Add PlatformCheck class, for runtime platform detection. 2018-01-04 11:21:23 +01:00
Mikkel Krautz
d007191a57 Re-generate MurmurIceWrapper.cpp via scripts/mkwrapper.pl. 2018-01-01 23:30:18 +01:00
Mikkel Krautz
acb43a24c8 Update copyright years in about dialogs for Mumble and Murmur. 2018-01-01 23:10:54 +01:00
Mikkel Krautz
cc88443d6c Update src/licenses.h via scripts/mklic.pl. 2018-01-01 23:10:04 +01:00
Mikkel Krautz
23261e2959 Update copyright years in .plist and .rc files. 2018-01-01 23:09:16 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
6ca110a222 src/tests: add TestStdAbs test.
This adds a 'just-in-case' test for correct runtime behavior of std::abs's
float overload.
2017-12-31 13:19:59 +01:00
Mikkel Krautz
a221fedfd3 mumble_pch.hpp: explicitly include <cmath>.
Previously, we implicitly relied on <cmath> being included
by some other header.

Make it explicit.
2017-12-31 13:19:59 +01:00
Mikkel Krautz
ea861fe867 AudioOutput: do not use non-existant template version of std::abs.
This change fixes AudioOutput to use the float overload of std::abs:

    float std::abs(float);

instead of a non-existant template version.

Fixes mumble-voip/mumble#3281

Needs-Backport: 1.2.x
2017-12-31 13:19:59 +01:00
Mikkel Krautz
7ed03e686f OSInfo: ignore deprecation warnings for Gestalt.
Since we now build with a macOS target of 10.8 when
building against Qt 5.10, we get deprecation warnings
when calling gestalt.

The fix, for now, is to ignore deprecation warnings in
OSInfo on macOS.

This should be addressed in a better way in the future.
For that, mumble-voip/mumble#3290 has been filed.
2017-12-31 11:43:57 +01:00
Mikkel Krautz
53912f6d56 GlobalShortcut_win: fix std::/boost:: confusion in comment.
The comment block that justifies the use of Boost in GlobalShortcut_win
accidently stated that MinGW "does not support
boost:future/boost::promise", which is incorrect.

Fix the comment to say what was intended: that MinGW doesn't
support std::future/std::promise.
2017-12-02 21:40:44 +01:00
davidebeatrici
60d18cde32 ManualPlugin.cpp: "MublePluginQt" -> "MumblePluginQt" 2017-11-29 17:47:29 +01:00
Mikkel Krautz
3125439740
Merge PR #3168: Log: remove support for external images.
This change remove support for loading external images.
That is, this change ensures Mumble doesn't load images from  tags in text messages,
comments and channel descriptions via HTTP or HTTPS.

With this change in place, Mumble only supports images that are embedded
in the message via data URLs.
2017-11-26 23:46:47 +01:00
Mikkel Krautz
b65b55c659 mumble.pro: add correct Boost libraries to LIBS, now that we use boost_thread in GlobalShortcut_win. 2017-11-26 22:29:00 +01:00
Mikkel Krautz
fa981e52ab os_early_win: make compat_layer_env const to avoid GCC writable strings error.
GCC is concerned that we'll be writing to the memory of compat_layer_env
after we've assigned a string literal to it.

We won't, but make compat_layer_env const to soothe the compiler.
2017-11-26 21:33:13 +01:00
Mikkel Krautz
ba2a2023a0 os_early_win: use 0 instead of NULL for ulOptions DWORD parameter in RegOpenKeyEx. 2017-11-26 21:31:45 +01:00
Mikkel Krautz
e91f282aeb GlobalShortcut_win: use boost::future/boost::promise instead of std:: variants for better MinGW compatibility.
Fixes mumble-voip/mumble#3239
2017-11-26 21:29:32 +01:00
Mikkel Krautz
7acf687b24 ConnectDialog: use port from ServerResolverRecord instead of original port from ServerResolver::port().
This caused the ConnectDialog to show the wrong resolved port
for servers resolved using SRV records.
2017-11-26 15:51:37 +01:00
Mikkel Krautz
04a8a5db81 ServerResolver: fix bug where ServerResolver_qt5 would always pass on the original port given to the resolver.
Instead of using the port from the QDnsServiceRecord, the
srvResolved() slot used m_origPort. Oops.

Fixes mumble-voip/mumble#3267
2017-11-26 12:33:38 +01:00
Davide Beatrici
3eae0dc667
Merge PR #3182: Allow Prefilling Add Server Dialog With HTTP URLs 2017-11-11 18:40:55 +01:00
Jan Klass
2a4413ea0c Do not update fill suggestion on clipboard changes
This means the user can not copy a Mumble URL while the dialog is open
and fill in the data from it. Instead, he will have to close and reopen
the dialog.

This change is to prevent potential confusion in case the user reads the
fill suggestion, (briefly) switches tasks, and then has different data
in their clipboard. This would also change the suggested fill data,
potentially without the user noticing the change, and then confusion
about the filled data.
2017-11-11 17:26:24 +01:00
davidebeatrici
1121ef91d1 ServerHandler.cpp: Remove "Qt::QueuedConnection" attribute for connection between "readyRead()" and "udpReady()"
It causes Mumble's UDP system to not work properly on Linux, for a currently unknown reason.

Fixes issue #3256.
2017-10-28 02:05:59 +02:00
Stefan Hacker
12de49ebb4 Switch client DB to sqlite synchronization mode NORMAL
In a userbase of primarily gamers system instabilities aren't
that uncommon. Without synchronization of the user-db this can
lead to corruption of our client database storing the
user-certificate. We have had various reports of such issues
over time.

The current mode was set in 2010 in commit 9fee66e8 to speed
up the client-db "even more" though it is unclear whether we
actually had performance problems that required this step.

This patch switches the client synchronization mode from OFF
to NORMAL which according to the sqlite documentation will
leave a "very small" chance for database corruption but is
than the default FULL sync mode.

This commit should partially address issue #3254 by making
database corruption much more unlikely but detecting
corruption and/or handling DB backups are further possible
approaches if this change turns out to have unacceptable
performance or we get further reports of durability issues
with the clientside DB.
2017-10-22 22:37:31 +02:00
Davide Beatrici
d2943a5f01 Merge PR #3250: Fixed crashing on disconnect 2017-10-17 20:22:38 +02:00
pchk
c45957d340 Fixed crashing on disconnect 2017-10-17 21:10:47 +03:00
pchk
86f7815471 Check ClientUser pointer before dereference 2017-10-17 21:00:45 +03:00
Jan Klass
264d1edd9e Replace obsolete Ice statements for Ice >= 3.7
The Exceptions method ice_name() has been replaced by the new method
ice_id().

The Communicators method stringToIdentity has been made obsolete in favor
of a static function in the Ice namespace.

https://doc.zeroc.com/display/Ice37/Ice-Communicator#Ice-Communicator-stringToIdentity
https://doc.zeroc.com/pages/viewpage.action?pageId=18255295
https://doc.zeroc.com/pages/viewpage.action?pageId=18255344
2017-10-02 02:12:00 +02:00
Jan Klass
387fc014b1 Fix Travis OSX build - add keg slice subpath
Our OSX build uses brew to install dependencies, among which is Ice[1].

The brew keg (=package) `ice` was updated from 3.6 to 3.7 (with [2] and [3]).
With the update, the slice file path changed to
`/usr/local/opt/ice/share/ice/slice` (where `/usr/local/opt/<keg-name>`
is the symlinked path to the currently installed keg files.

* Use `share/ice/slice` as a possible subpath for slice file inclusion
when running slice2cpp to compile Ice cpp files.
* Replace method calls that were marked obsolete in Ice 3.7.

[1] http://formulae.brew.sh/formula/ice
[2] 4707f7e525 (diff-217324a0837e089e3f019178b405b2b9)
[3] 9e9babcc47 (diff-217324a0837e089e3f019178b405b2b9)
2017-10-02 02:12:00 +02:00
Alexis Jeandeau
ba6d829b10 MurmurGRPCImpl.cpp: fix typo 2017-08-24 08:22:01 +09:00
Jan Klass
c33f5de83c Fix code formatting 2017-08-19 00:23:59 +02:00
Mikkel Krautz
9ff823241b GlobalShortcutWin: fall back to 'Unknown' for unknown DirectInput buttons.
When a lookup in qhNames fails, it returns a default-constructed (null and
empty) string.

Do not update the name variable if the result of the lookup is empty.

This ensures we fall back to 'Unknown' when we encounter an unknown
button.

For now, this means that "F13-F24" are shown as K:Unknown instead of just
"K:".
2017-08-12 17:20:48 +02:00
Mikkel Krautz
9709ed89e6 ConnectDialogEdit: layout updates.
Ensure the paste notice label is set to expand vertically, and align
its text at the top.

Promote the qlActions layout to a QWidget, and ensure its margins are
set to 0. Its new name is qwActions.

Apply a horizontal stretch of 4 to the qlPasteNotice label, and a
horizontal stretch of 1 to the qwActions container.

Set the horizontal size policy of both qbDisard and qbFill to be
Expanding, ensuring that the buttons have the same size.

Remove checkmark and cross glyphs from the qbDiscard and qbFill
buttons. They aren't the same size on Windows, which looks odd.
Also, using such glyphs in buttons is not something we usually do,
so I would rather be without it.
2017-08-12 14:45:05 +02:00
Jan Klass
cea70646ed ConnectDialog: Show fill suggestion for current server 2017-08-07 11:44:03 +02:00
Jan Klass
2758a7c028 ConnectDialog: Try to disable vertical resizability 2017-08-07 11:44:03 +02:00
Jan Klass
2f609a22e9 ConnectDialog: Update prefill-ability notice on clipboard changes 2017-08-07 11:44:02 +02:00