Commit Graph

8702 Commits

Author SHA1 Message Date
Robert Adam
668cd3768a
Merge pull request #4625: DOCS: Dependencies for Cent OS 8 2020-12-13 14:29:10 +01:00
Benson Muite
3b1289a2b7 DOCS: Dependencies for Cent OS 8
Implements suggestions in #4598
2020-12-13 15:27:12 +03:00
Davide Beatrici
0af10cdd95
Merge PR #4619: MAINT/FIX(server): Fix systemd murmur.service 2020-12-10 07:09:57 +01:00
Robert Adam
d8f09572e3
MAINT: Link commit guidelines in README
Fixes #4622
2020-12-09 19:43:59 +01:00
WGH
b55874d99f MAINT/FIX(server): Fix systemd murmur.service
As things are now, 'systemctl start murmur' hangs and eventually times
out.

The problem is that in the unit file, both Type=forking and
PIDFile=/run/murmur/murmur.pid are specified. In this scenario systemd
will wait for the PID file to appear. However, it will never appear
there, as murmur does setuid on its own before writing the pid file,
and thus lacks the rights to write to /run, and even if it had the rights,
it doesn't try to create a missing directory anyway.

Switch to Type=exec and foreground mode to fix this. systemd services
don't really need forking behaviour anyway, and in fact handling
forking servers requires some extra hoops to jump through on the
systemd side.

This change also makes murmur (when run with murmur.service) to log
to the systemd journal instead of log files.

Although the unit file has been broken for a long time, Debian-based
distros still use the /etc/init.d/mumble-server wrapped with
systemd-sysv-generator, and haven't noticed the problem.
2020-12-09 14:49:21 +03:00
Robert Adam
f8f9442fe9
Merge pull request #4611: FIX(client): Respect unlimited imagemessagelength
When you set the imagemessagelength to 0 on the server and paste an
image into the client chat no error should pop up that the image is too
large.
2020-12-09 10:36:47 +01:00
Robert Adam
dc99acc82b
Merge pull request #4616: FIX(server): Prevent listeners from hearing all shouts
Before this commit, the code on the server made sure that a
ChannelListener would always receive audio that was being shouted to a
channel. It didn't respect though if the shout was actually restricted
to be received by only a specific group.

This patch now makes sure that listeners are also checked for their
group so that a listener that doesn't belong to the target group (if one
is set) won't receive the audio either.
2020-12-08 19:45:33 +01:00
Robert Adam
687e6982b3
Merge pull request #4617: FIX(client): Crash due to race-condition in TalkingUI
The race condition was that the channel of a user could be modified
and before it gets updated in the TalkingUI as well, the talking state
of that user changes. Then inside the talkingStateChanged function the
code would assume that the TalkingUIUser is in the container representing
the current channel of that user but in fact in the TalkingUI this user
is still in its own channel, causing the user-search to return nullptr
which then yields a SegFault as soon as the returned pointer gets
dereferenced.
2020-12-08 12:46:33 +01:00
Robert Adam
85850d5a63 FIX(client): Crash due to race-condition in TalkingUI
The race condition was that the channel of a user could be modified
and before it gets updated in the TalkingUI as well, the talking state
of that user changes. Then inside the talkingStateChanged function the
code would assume that the TalkingUIUser is in the container representing
the current channel of that user but in fact in the TalkingUI this user
is still in its own channel, causing the user-search to return nullptr
which then yields a SegFault as soon as the returned pointer gets
dereferenced.
2020-12-08 09:37:29 +01:00
Robert Adam
bbdfd10430 FIX(server): Prevent listeners from hearing all shouts
Before this commit, the code on the server made sure that a
ChannelListener would always receive audio that was being shouted to a
channel. It didn't respect though if the shout was actually restricted
to be received by only a specific group.

This patch now makes sure that listeners are also checked for their
group so that a listener that doesn't belong to the target group (if one
is set) won't receive the audio either.
2020-12-08 09:33:26 +01:00
Robert Adam
919f1f7a3f
BUILD: Fix Debug flags not set
We used EQUAL to compare the option's value to a String. This however does not work as according to
the cmake documentation on EQUAL says
"True if the given string or variable’s value is a valid number and equal to that on the right."
As we are not comparing numbers but "real Strings", we have to use STREQUAL instead.
2020-12-06 08:48:02 +01:00
Meru Alagalingam
8f2903eeba FIX(client): Respect unlimited imagemessagelength
When you set the imagemessagelength to 0 on the server and paste an
image into the client chat no error should pop up that the image is too
large.
2020-12-04 23:06:21 +01:00
Robert Adam
c97c15059d
Merge pull request #4593: MAINT: Reduce Docker size image
Running rm [...] in a separate RUN command inside the Dockerfile does
not have the desired effect due to the way Docker layers work (see
https://cloud.google.com/solutions/best-practices-for-building-containers#reduce_the_amount_of_clutter_in_your_image)
2020-12-02 15:35:54 +01:00
Justin Goette
d45b8d1e38 MAINT: Reduce Docker size image
Running rm [...] in a separate RUN command inside the Dockerfile does
not have the desired effect due to the way Docker layers work (see
https://cloud.google.com/solutions/best-practices-for-building-containers#reduce_the_amount_of_clutter_in_your_image)
2020-12-02 09:31:09 +01:00
Robert Adam
d083d2ce9d
Merge pull request #4597: MAINT: Fix PR template not working 2020-12-01 18:07:41 +01:00
Robert Adam
4b2d346515
MAINT: Fix indentation in GitHub Actions script 2020-12-01 10:02:22 +01:00
Robert Adam
bc76ecbd1a
Merge pull request #4606: FIX(plugin): initialize array to prevent warning
When building on CentOS 8 with default flags which includes Wall flag,
build stops because array n[3] is not initialized. Initialize it to have all
values to be zero.
2020-11-30 19:41:28 +01:00
Robert Adam
2ba3c354c2 MAINT: Fix PR template not working 2020-11-30 07:51:18 +01:00
Robert Adam
c3cf53364b
Merge pull request #4605: CI: Introduce GitHub Actions
Now that Travis CI decided to stop offering their services for free, we
had to look for an alternative solution. GitHub Actions seems to fit the
picture really well and has the benefit of being tightly integrated into
GitHub (obviously).

For now only shared builds for Ubuntu 18.04 and 20.04 are included. The
scripts and the framework for also including static builds is part of
this commit as well but as it stands the static build always failed and
therefore it was given up upon for now.

Adding support for other OS will require a few tweaks and a couple of
new scripts but in general the framework was built with this kind of
extension in mind.
2020-11-29 19:48:52 +01:00
Benson Muite
71645e4c8c
FIX(plugin): initialize array to prevent warning
When building on CentOS 8 with default flags which includes Wall flag, 
build stops because array n[3] is not initialized. Initialize it to have all 
values to be zero.
2020-11-29 20:19:32 +03:00
Robert Adam
c03521593c CI: Introduce GitHub Actions
Now that Travis CI decided to stop offering their services for free, we
had to look for an alternative solution. GitHub Actions seems to fit the
picture really well and has the benefit of being tightly integrated into
GitHub (obviously).

For now only shared builds for Ubuntu 18.04 and 20.04 are included. The
scripts and the framework for also including static builds is part of
this commit as well but as it stands the static build always failed and
therefore it was given up upon for now.

Adding support for other OS will require a few tweaks and a couple of
new scripts but in general the framework was built with this kind of
extension in mind.
2020-11-29 17:40:15 +01:00
Robert Adam
e324c8b9f3
Merge pull request #4604: MAINT: Fix Dockerfile
Part 1

The Dockerfile contained instructions at the wrong position causing it
to not work properly (it didn't install the necessary dependencies).

Fixes #4600
Part 2

Don't install qtcreator via Dockerfile

The Qt Creator IDE should not be needed in the Docker image at all.
2020-11-29 17:31:36 +01:00
Robert Adam
6439b6d9c5 MAINT: Don't install qtcreator via Dockerfile
The Qt Creator IDE should not be needed in the Docker image at all.
2020-11-29 12:20:43 +01:00
Robert Adam
32dfd08721 MAINT: Fix Dockerfile
The Dockerfile contained instructions at the wrong position causing it
to not work properly (it didn't install the necessary dependencies).

Fixes #4600
2020-11-29 12:20:35 +01:00
Robert Adam
916f8ed0a7
Merge pull request #4599: DOCS: Add link to cmake download page 2020-11-27 09:16:24 +01:00
Benson Muite
1b12795f01 DOCS: Add link to cmake download page
Add a link to the cmake download page where various options for installing cmake can be found.
2020-11-27 09:02:53 +03:00
Robert Adam
bf28ee261c
Merge pull request #4596: @ancarda @Krzmbrzl DOCS: Made dependence on g++-multilib more explicit
By default this library is needed as the option overlay-xcompile
defaults to ON. Therefore we should list g++-multilib as a dependency
directly and only mention how to get rid of this dependency, not the
other way around.

This will probably avoid some confusion on the reader's side.
2020-11-24 20:08:12 +01:00
Robert Adam
9ce724656b DOCS: Fix typo in build_linux.md 2020-11-24 10:00:02 +01:00
Mark Dain
deecd17069 DOCS: Made dependence on g++-multilib more explicit
By default this library is needed as the option overlay-xcompile
defaults to ON. Therefore we should list g++-multilib as a dependency
directly and only mention how to get rid of this dependency, not the
other way around.

This will probably avoid some confusion on the reader's side.
2020-11-24 09:57:46 +01:00
Davide Beatrici
0464d605f0
Merge PR #4588: MAINT: Potentially Reduce Docker Container Size 2020-11-22 07:25:21 +01:00
Justin Goette
156eecd7ae MAINT: Potentially reduce Docker container size
Add "--no-install-recommends" and "rm -rf /var/lib/apt/lists/*" for
potential image size reduction.

See:
https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends
https://cloud.google.com/solutions/best-practices-for-building-containers#reduce_the_amount_of_clutter_in_your_image
2020-11-21 20:14:07 +01:00
Robert Adam
f4a1e0ed7e
MAINT: Update PR template
The previous version only contained a comment and would therefore effectively be empty.
2020-11-21 19:31:47 +01:00
Robert Adam
08d3d42fb9
Merge pull request #4590: MAINT: Create PR template
The template includes a link to our commit guidelines as this seems to
be something a lot of people don't know about.
2020-11-21 15:38:20 +01:00
Robert Adam
96173413c9 MAINT: Create PR template
The template includes a link to our commit guidelines as this seems to
be something a lot of people don't know about.
2020-11-21 08:44:41 +01:00
Robert Adam
0d005c6e17
Merge pull request #4587: DOCS: Overlay xcompile dependency 2020-11-20 17:54:31 +01:00
Robert Adam
409b0c15bb
Merge pull request #4586: DOCS: Note about selecting OpenSSL directory
The issue of cmake finding an incompatible OpenSSL version was
encountered on macOS in #4486, which is why the problem is also
explicitly mentioned in the macOS instructions.
2020-11-20 15:09:19 +01:00
Robert Adam
5a515aa1ac DOCS: Overlay xcompile dependency 2020-11-20 14:10:43 +01:00
Robert Adam
da9517e7cc DOCS: Note about selecting OpenSSL directory
The issue of cmake finding an incompatible OpenSSL version was
encountered on macOS in #4486, which is why the problem is also
explicitly mentioned in the macOS instructions.
2020-11-20 13:55:37 +01:00
Robert Adam
2ab1eb92ee
Merge pull request #4582: FIX(talking-ui): Context-menu z-index issues
In cases where the TalkingUI was overlaying the MainWindow, it could
happen that a context menu triggered from the TalkingUI would actually
be created using another element (listener, channel, user) as the
context for that menu. This would happen because in these cases there is
an entry below the cursor (behind the TalkingUI) that would
automatically be recognized as the desired target.

The fix works by explicitly disabling the position-dependent target
search and using explicitly defined targets instead.
2020-11-16 13:19:35 +01:00
Robert Adam
26cad606f0
Merge pull request #4581: MAINT: Ignore compile commands DB 2020-11-16 10:06:38 +01:00
Robert
c322a8e0f2 FIX(talking-ui): Context-menu z-index issues
In cases where the TalkingUI was overlaying the MainWindow, it could
happen that a context menu triggered from the TalkingUI would actually
be created using another element (listener, channel, user) as the
context for that menu. This would happen because in these cases there is
an entry below the cursor (behind the TalkingUI) that would
automatically be recognized as the desired target.

The fix works by explicitly disabling the position-dependent target
search and using explicitly defined targets instead.
2020-11-16 07:59:59 +01:00
Robert Adam
07fae5fcb7 MAINT: Ignore compile commands DB 2020-11-16 07:58:14 +01:00
Davide Beatrici
cc84e4f09d
Merge PR #4571: FEAT(positional-audio): Add plugin for Among Us 2020-11-11 19:30:12 +01:00
Davide Beatrici
2feebe6801 FEAT(positional-audio): Add plugin for Among Us
Tested with v2020.10.22s and v2020.09.22s.

Unless the pattern we're searching for becomes invalid or the structures we're using change, the plugin should keep working.
2020-11-11 05:25:56 +01:00
Davide Beatrici
8542c9a857 FEAT(positional-audio): Add searchInBuffer() and findPattern()
searchInBuffer() searches for the specified pattern in the specified buffer. "?" is used as wildcard.

findPattern(), given a start address and the size of the area, reads memory in chunks of 32 KiB.

It stops when a match is found, the end is reached or an error is encountered (peek() fails).

There's also an overload which iterates through the specified module's readable regions.
2020-11-11 05:25:52 +01:00
Davide Beatrici
04faa58008
Merge PR #4572: FIX(positional-audio): Fix Source Engine plugin using wrong player ID on Linux 2020-11-09 19:34:37 +01:00
Davide Beatrici
5cbd01f984 FIX(positional-audio): Fix Source Engine plugin using wrong player ID on Linux
The code was retrieving the wrong offset (GetLocalClient).

As a result, peek() always returned 0 and the player ID was always 1.

The plugin appeared to be working fine because the player ID is always 1 when playing locally.
2020-11-09 06:32:15 +01:00
Davide Beatrici
dd154ba431
Merge PR #4568: REFAC(positional-audio): Proper functions/classes for module-related operations 2020-11-07 19:38:22 +01:00
Davide Beatrici
988b8417ac REFAC(positional-audio): Proper functions/classes for module-related operations
Previously, only module() was present: it retrieved the base address of the specified module.

It worked fine, but it iterated through the process' modules every time it was called.

This commit replaces it with modules(), which returns an std::unordered_map containing all modules.

The map uses the module name as key and Module as value.

Aside from the performance improvement, the new code also provides info for each module region:

- Start address.
- Size.
- Whether it's readable, writable and/or executable.
2020-11-06 21:37:06 +01:00
Davide Beatrici
a3480a2a6b
Merge PR #4565: FIX(positional-audio): Wrong character size used for wide strings 2020-11-04 21:38:48 +01:00