Commit Graph

62167 Commits

Author SHA1 Message Date
Murai Takashi
c3427db750 audio/null: Fix null pointer dereference
Fix possible null pointer dereference at line 350-354
when 'device' is NULL at line 347.
Pointed out by cppcheck.

Change-Id: I25a090172a0d17ef3cb1fe607f70a31e579d13b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3498
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-12 13:53:56 +00:00
Sean Long
151de9ff9b BHandler documentation: Fix typo
Change-Id: Ia533d028163248f37ff3c92a8aa981d28b47e34c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3497
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-12 08:55:41 +00:00
Autocomitter
7c8377101f Update translations from Pootle 2020-12-12 08:45:25 +00:00
Jérôme Duval
116794af63 ipv4: reenable multicast
tested between two Haiku VMs with iperf.

Change-Id: Id9d3865f2c9f8ed6c79d0ece53f51c781c77b771
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3453
Reviewed-by: Rene Gollent <rene@gollent.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-11 11:45:46 +00:00
Pawan Wadhwani
3e4b663667 Updated Readme.Compiling.md according to hrev54611
Updated commands to compile build tools

fixes #16566

Change-Id: I3ef4d253dc45e0bb92e4c13164c7fac2127a5a94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3495
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-11 11:45:12 +00:00
Murai Takashi
6182c5ad27 fontdemo: Fix null pointer dereference
Fix possible null pointer dereference at line 314
when 'submenu' is NULL at line 297.
Pointed out by cppcheck.

Change-Id: I054f63d574f4a9608df49d48ee74b87cd0116f69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3492
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-11 08:55:35 +00:00
Adrien Destugues
5b627acb33 Build fix.
Desynchronisation between fs_shell and normal autodeleter files
2020-12-10 18:01:22 +01:00
Murai Takashi
efc042ff48 Window: Fix dead assignment
Fix value stored to 'maxWidth' or 'maxHeight' is never read
when maxWidth > fMaxWidth or maxHeight > fMaxHeight.
Pointed out by Clang Static Analyzer.

Change-Id: I2bd0b8712d47e64298c0f915f24f7f1c87f4362e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3474
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-10 11:40:20 +00:00
X512
6467297a1b simplify AutoDeleter code by using typedef
Change-Id: I726c3aee794b91ed51970853db3921d17a5f795e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3462
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
36aafa560b fix build after CObjectDeleter interface change
Change-Id: I76e217abcd13c22c4d68170e07333cdde4d7a891
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3461
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
71e79db9b8 fix build after AutoDeleter change
Change-Id: Id6ffc8d58821159b1d570bf5ac17d8347d88f7f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3459
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
76ab85671d AutoDeleter: fix AutoDeleter size
C++ don't allow zero size class fields. If field with empty class field
is used, it's size will be 1 byte.

Create DeleteFunc instance as local variable at each use instead.

Fixes #16638.

Change-Id: Ifb76c45ea02e9fed014751542ee5f16f41e11d15
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3458
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
ab57ee42cb fix build after MethodDeleter interface change
Change-Id: Iadb9e37772fd6588636085944c1455249ac0f926
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3457
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
aecba91311 AutoDeleter: move destructor function in MethodDeleter from constructor to template argument
The same as CObjectDeleter.

Change-Id: I85c4cb3635f01f13e529ca087324cc2fcb42cfc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3456
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
X512
7d775e7925 AutoDeleter: move destructor function in CObjectDeleter from constructor to template argument
It allows to make typedef of pointer types and declaring pointers in headers.

Store of destructor function pointer in CObjectDeleter is no longer needed.

Change-Id: Ic629fd10b28b09f4190edf8ba6b911ca3108ab0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3455
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
Augustin Cavalier
6f243905bf kernel: Allow usage of magic team constants in create_area_etc.
All other functions that support these handle them specifically,
so vm_create_anonymous_area must do so as well.

Change-Id: I7233770926b718936baeff10ef73668ac15c5201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3477
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-12-10 03:04:52 +00:00
Adrien Destugues
369abf3be4 Have a minimum size for scrollbars
With small font sizes, the scrollbars don't need to get smaller than 14
pixels. So, don't allow the scaling to go below 1.
2020-12-09 21:57:31 +01:00
Murai Takashi
b9e10b0796 Expander: Fix dead nested assignment
Fix value stored to 'status' is never read.
Pointed out by Clang Static Analyzer.

Change-Id: I0bbeafb74168d566128b53f8ad40e71218c78c45
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3473
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-09 20:38:41 +00:00
Adrien Destugues
5d1042057b Add Noto Sans Symbols2 to font fallbacks
Also use the correct symbol for the return key (we were using another
similar arrow because this one was not available in DejaVu Sans).

Fixes #14034.

Note that build/jam/repositories/HaikuPorts ships an old version of the
Noto package that does not include the Symbols2 font. It should be
updated. Adding this to the pile of lagging behind packages, alongside
icu, mawk/gawk, and tnftp. Can anyone take care of it?
2020-12-09 20:00:26 +01:00
Murai Takashi
2c08d25325 bin/media_client: Fix memory leak
Fix leak of memory allocated to 'app'.
Pointed out by Clang Static Analyzer.

Change-Id: I59d39b76a18893bd284db1d75e40620bb1aee9e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3480
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-12-09 16:12:43 +00:00
Jérôme Duval
65b3fe452a GameKit: give up default template parameter for gcc2 2020-12-08 15:46:55 +01:00
Murai Takashi
2db8ba2c8d Menu: Fix dead store
Fix value stored to 'flags' is never read.
Pointed out by Clang Static Analyzer.

Change-Id: Ia154fbdd4dd5fb10716cf9079625ca65e2f58122
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3472
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-08 13:46:51 +00:00
Jérôme Duval
6336b86ab8 GameKit: gcc2 build fix 2020-12-08 14:39:56 +01:00
Máximo Castañeda
fb6ee7844d GameSoundBuffer: avoid buffer copy
Change-Id: Ibffe80ebe5e8205e853e09b6ebb9ba65b53d83e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3475
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 12:33:22 +00:00
Máximo Castañeda
cfe72209cf U8 sound format
U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.

Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 12:33:22 +00:00
Murai Takashi
6cd9975b85 bin/keymap: Fix memory leak
Fix leak of memory allocated to 'app'.
Pointed out by Clang Static Analyzer.

Change-Id: I2cbd005d42d4747937ee4b6e12ccf409f122ea24
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3478
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 12:27:40 +00:00
Máximo Castañeda
8e9d64f0d6 FileGameSound: fix stuck in pause when ramped
Change-Id: I346d7b93fa8507451ee46856ad6618acd6e2d609
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3469
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 04:32:56 +00:00
Máximo Castañeda
15de111dcf FileGameSound: fix buffer advance accounting
Change-Id: I15bb2b1e703cad955544a1151adc6a1277b077a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3467
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 04:32:56 +00:00
Alexander von Gluck IV
9293eadbda opengl/glinfo: Fix broken GLinfo app
* Can't call InfoView() with an unlocked BGLView.
* If unable to obtain to glGetString, show some "unknown" messages

Change-Id: I17d8ff84feed166644d54b0e19e0ef1fce202a74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3476
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-12-08 00:25:45 +00:00
Alexander von Gluck IV
9adc70887e efi: Call console-control to enter text mode
Change-Id: Ife1df3415bc5a31801bcb3d925f1b7c3a105f51b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2250
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-07 11:32:28 +00:00
Máximo Castañeda
8eafd6cd04 GameKit: use more than 1 sec precision ramping
Change-Id: I015f116239fad5dd48f7f4509db503dc8f60c0d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3468
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-12-06 18:17:55 +00:00
Augustin Cavalier
10bc5b6e2f Tracker: Increase the readability threshhold to 50%.
nephele is working a more comprehensive fix to this code, but for now,
this seems to be sufficient for the time being.
2020-12-05 15:23:14 -05:00
Autocomitter
e46d640063 Update translations from Pootle 2020-12-05 08:43:08 +00:00
Lt-Henry
e6bb814359 acpi_thermal: some style corrections
Change-Id: I7194be3b284e2de839afb53037b26fc691984dd7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3442
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-04 07:29:11 +00:00
Lt-Henry
3d0f2eea4f acpi_thermal: get the driver working
Change-Id: Ib0b7de56ef35092da93cc5fa61bdf0cfef41c042
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3440
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-04 07:29:11 +00:00
X512
d99d8dbdd2 app_server memory management: use ObjectDeleter to mark ownership
Make object ownership explicit by use of ObjectDeleter where possible.

Change-Id: I499a00aa3390d1510ae284419e73faffa5166430
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2695
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-12-03 18:45:14 +00:00
Adrien Destugues
a959262cd0 implement mlock(), munlock()
Change-Id: I2f04b8986d2ed32bb4d30d238d668e21a1505778
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-03 07:58:05 +00:00
CruxBox
0dc6805e00 xfs: Read Leaf Directories
We can read leaf directories now.

Change-Id: I4276c264f9e72013fa99c898a8332cb363e9ab3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3035
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-03 07:57:15 +00:00
CruxBox
bd0708fd41 xfs: Attempt at reading Leaf Directories
We can read leaf directories now but I've only checked for a single
block working right now. I might make a few more changes in an upcoming
patch.

Change-Id: I325de8a6fad4ef9298e7810256cba47a87c45187
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3027
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-03 07:57:15 +00:00
CruxBox
a20b880907 xfs: Renaming variables and bug fix in read_dir
Main issue was use of sizeof(dirent) instead of sizeof(struct dirent).
It didn't cause any issue before but I found it ambiguous. Also, renamed
the dirent variable to buffer to remove any ambiguity.

Change-Id: I36ab40eea354424a4fddc3292ee7e1aaed446859
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3198
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-03 07:57:15 +00:00
Jérôme Duval
00866cc149 IOCache: adjust the last iovec when the capacity isn't multiple of B_PAGE_SIZE
Patch by mark_mcs, edited by me
this fixes #16030

Change-Id: I9255fe960f73cdfc3fd2668cdaf7db19fedd70f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3451
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-12-02 23:48:32 +00:00
Adrien Destugues
5f51a74f1a Build fix.
Some code in a just merged patch needs another one that's still being
discussed on Gerrit. Extract just the parts we need to get things
building again.
2020-12-02 20:05:20 +01:00
X512
60d3078585 app_server memory management fixes: use BReference
Use BReference for more automated reference counting in app_server,
fixing some use-after-free and other problems.

Extracted from https://review.haiku-os.org/c/haiku/+/2695

Change-Id: I141bb248229405896b29feff3338447f7257b0b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3175
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-02 17:59:06 +00:00
John Scipione
30ecf636e0 Tracker: Scroll text to beginning on edit name
... so that the full file name is shown.

Center the file name in the edit box a bit better, the edit box is still
off compared to the non-editable file name by a pixel sometimes.

Use be_plain_font instead of getting the font from the PoseView since
the PoseView font is set to be_plain_font.

Fixes #16476

Change-Id: Ibda9341593163cdde898a83c98bf5ccea37126be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3399
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-02 17:58:47 +00:00
Jérôme Duval
b943b993c7 freebsd_network: Use user_memcpy() for ETHER_ADDMULTI/ETHER_REMMULTI
Change-Id: Id0a7e50f9ae38bff42faf1d6c4a62f702347bda3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3446
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-12-02 07:40:16 +00:00
Máximo Castañeda
a1c9aa9d90 Get a fallback font for each missing character
Make the glyph layout engine look for a suitable font fallback for each
missing character, instead of using the first one found for all of them.

Solves #16404, #16213, maybe other garbled text issues.

Does not solve similar issues of getting slightly different positions and
widths for a whole string than for the sum of its parts due to subpixel
rendering (cf #15007 comment 2).

Change-Id: I40664e32c8ecd5f09e10aa7a60fcdaec230471b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3273
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-01 11:45:27 +00:00
Mitsunori YOSHIDA
bca2f73564 nfs: Fix panic occurs when creating a file
Fix an issue #5496 where panic occurs when creating a file with nfs v2
due to the newly generated vnode of the file is not published
and is still busy.

Change-Id: I490a10d4c7de6c87e309a21da575d6cc1a521974
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3436
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-01 07:23:55 +00:00
Fredrik Holmqvist
cb26d04e81 arm: kernel link cleanup and fixes
* Removes several previous hacks, and makes kernel loading
  by our bootloader more reliable.
* Long list of "Couldn't find both text and data" errors
  no gone in our bootloader as it loads our kernel

Change-Id: Ic9f5ed44975d41fb22d7ab19536261432abe84ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3444
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-30 22:08:32 +00:00
Máximo Castañeda
64fc5a66b1 DefaultMediaTheme: fix Slider scale
Values are using a scale of 1000, but limits are set 0..100. Very
visible in media preferencies when using balance controls for stereo
connections in the mixer: the control is shown full right at first and
the moment you touch it and the gain is updated, you only get sound from
the left channel.

Probably the root cause of #15836 and #16070.

Change-Id: I31d3b6b11a57ca99a1cc8373d9fb003f21b192b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3445
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-30 20:06:16 +00:00
Jérôme Duval
b6e85f802d ipv4 & ipv6: remove_trailer() uses a positive size as parameter
Change-Id: Id7d009cfee7727afb8267703c22c467e5f636070
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3438
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-30 15:02:46 +00:00