Murmur uses the saiTcpLocalAddress field of ServerUser to determine
the correct source address of outgoing UDP packets. On some systems,
such as multi-homed setups, this is important for correct datagram
delivery.
The saiTcpLocalAddress field is initialized when the client first
connects. Its value is extracted from QHostAddress, and then
converted to a sockaddr struct via our own HostAddress class's
toSockAddr method.
HostAddress::toSockAddr is implemented such that any IPv4 address
(including IPv4-mapped IPv6 addresses) will always cause a sockaddr
struct belonging to the AF_INET (IPv4) family to be output. Pure IPv6
addresses will be output as an AF_INET6 sockaddr.
The code that this change touches assumed that it could use the
value of saiTcpLocalAddress directly as the source address in UDP
packets.
This is not always the case. On most systems, Murmur will listen on
[::]:64738 by default, and as such, the address of the server's UDP
socket will be in the AF_INET6 family. Attempting to send packets
with a source address in the AF_INET family using that socket will
cause sendmsg() to return EINVAL on some systems, if not all.
The new code for the sendmsg() code path converts the ServerUser's
saiTcpLocalAddress back into a HostAddress, which, internally, is
fully IPv6. If the input address is IPv4, HostAddress will convert
it to an IPv4-mapped IPv6 address.
When the client's UDP socket is of the AF_INET6 family, we can now
trust that the HostAddress, 'tcpha', is either a real IPv6 address,
or an IPv4-mapped IPv6 address. This allows us to use the 'tcpha'
address regardless of the address family of the saiTcpLocalAddress.
We can simply memcpy it in place.
When the UDP socket is of the AF_INET family, we can only set the
source address if the saiTcpLocalAddress is also AF_INET, or if
it is of the AF_INET6 family and its address is an IPv4-mapped IPv6
address. When a pure IPv6 address is encountered in that path, it is
simply dropped.
QPixmap::toMacCGImageRef seemingly returns an NSImage that is still backed
by the QPixmap. With semantics like that, our usage doesn't make much sense.
For now, use the private QtGui symbol qt_mac_create_nsimage() to create
a fully standalone NSImage.
* Low impact fix for RC. Directly set VERSION in overlay.pro
* Currently the version is set multiple times
in different .pro/pri files. This should be refactored to come from
a single .pri file (similar to /macx/common.pri) used in all locations.
* Should probably use an RC file to be able to set more information
* Can't use os_win.cpp versioning code as global settings singleton
is initialized before os_init() routine populates variables.
* For now went with the option with least code impact. This should
be revisited after release.
* NULL plugins have a shortname of L"Retracted" which excludes them
from being listed as a plugin in Mumble >= 1.2.4
* NULL plugins are valid plugins that always return false on trylock
so Mumble <= 1.2.3 gets behavior close to what recent Mumble has.
* NULL css, dods, tf2 and hl2dm plugins as they have been replaced by link support in the source engine.
When our WH_KEYBOARD_LL hook suppressed keypresses, DirectInput couldn't
read them.
Let's revisit this optimization for 1.2.5. We can always refer users
having issues with hook timeouts to the registry hack.
This change switches GlobalShortcutWin over to a slightly different model
in an attempt to combat the WinHook timeouts users have been reporting.
Previously, the DirectInput poller and the WinHooks event handling lived in
the same high-priority thread, and both of them processed all incoming button
events. Since both of them processed all events and emitted them using
GlobalShortcutEngine's handleButton method, they had to live in the same
thread in order for us to control the order of the signal dispatch.
Having the WinHooks live in the same thread as the DirectInput polling meant
that the hooks could potentially be blocked every 20 ms by the DirectInput
poller's timer event, which wasn't really desirable.
This new model splits up the DirectInput poller and the WinHooks event handling
into two separate, high-priority threads, each with different responsibilities.
The DirectInput poller is now the main source of events. This is where the actual
global shortcut presses are handled. Having DirectInput responsible for all
global shortcut buttonUp and buttonDown events allows us to use the WinHooks
thread *just* for filtering suppressed keys.
This design allows our WinHooks to have their own thread and event loop, meaning
they won't have to fight the DirectInput polling timer. Also, since the WinHooks
now have a more restricted set of tasks, they're able to do less work, hopefully
making it harder to trigger a timeout.
* VirtualBox stripped those keys from dialogs that are universally dismissed by ESC. Without those we do
not get matching translations for those buttons though.
* Added locales not shipped with Qt (qt_it.ts, qt_nl.ts, qt_tr.ts)
taken from the VirtualBox (https://www.virtualbox.org/ticket/2018)
* Extended mklic.pl to be able to add guards to only include certain
3rd party licenses if a define is set during build.
* Made mach_override specific to OSX
* Integrated new translations into the bundled qt translations build.
* A new define USING_BUNDLED_QT_TRANSLATIONS is now set when building
with bundled translations. It is used to guard the 3rd party license
entry for the new translations.
* See mumble/qttranslations/LICENSE for more information on the
licensing of the new translations.
* Consistently refer to Mumrur as 'Murmur'.
* Consistently end comments with a period.
* Update the comments for logfile and pidfile
to reflect what actually happens in practice.
* Implementation relied on local static variable initialization being
threadsafe which is not the case before C++11.
* To retain lazy initialization now using boost::call_one() to force
thread-safe first get()
* This adds a non header dependency to boost::threads for the windows
build.