We need to store the isGlobal value, so that the destructor
can take care of unsetting the glibc locale properly.
It seems this has been broken since d338200e2b.
Fixes #18344 and probably #18336.
Change-Id: Idb9b33cd1416969e01b73012de059ff051b76e74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6373
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
tcp_segment_header.advertised_window is 16 bits.
Previously, instead of using the maximum window, zero would be sent, thus
the partner wouldn't send anything.
fix #18337
Change-Id: Ibff98ee58b84bdf52527a7821648a5faf20c5589
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6359
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
(cherry picked from commit 7c58a5a3fb)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The current version expects the first box to be exactly 32 bytes, but some
files found in the wild only have 28 bytes, so we now ignore the first four
bytes and it works.
Change-Id: I4c304bd6385bffd15f4adbb99cbf464f9767f7bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6302
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6320
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
BitmapStream creates a BBitmap without specifying a bytes per row, but
then check the bytes per row matches the header. It is better to ask
BBitmap for the desired bytes per row to avoid any difference in
padding.
Change-Id: Ie1facfd423ad888a14757a0fffc9e8cdf72ef832
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6301
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6319
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
The code is endian-dependant because the alpha channel is not at the
same place. This resulted in transparent white in icons being converted
to partially transparent yellow when attempting to darken the icons, for
example.
Change-Id: I57916139ba37b8d7ae0f9e9ba9e74c1d496d7b05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6077
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 3cc1da2b77)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6096
* Added APIs for file and memory font loading that return B_NOT_SUPPORTED
when called, as requested in #16101 for forwards-compatibility with
r1beta5.
* changed uint32 size and offset arguments to size_t
Change-Id: I3dc39c233c00c05a34439e7d02cf2a4e41b97e63
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6004
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The function returns a positive nonzero value when it works.
Change-Id: Ib5852ec1d71e44b67309f3b955b888708f2ba1cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6020
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
ffmpeg API reference does not allow to allocate AVFrame on the stack,
and especially not without initializing anything in the frame. Calling
av_frame_unref then attempts to free some non-existing data, and
crashes.
The code for video was already using a correctly allocated frame, which
we can reuse here.
Fixes #17415
Probably fixes #16831
Change-Id: I91054dc41f0a91be9c585ec927e77bfc874a37ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6019
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Solves some insecure permission errors with
sshd subprocesses.
* More secure I guess not letting "anyone" write to /
Change-Id: I1bb31ff0142585639369f7b3d15cf9a2d5755598
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5962
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
(cherry picked from commit 151482229c)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5927
Just like the one for HTML, we have to do a bit of guessing since there
is no easy structure. We can extend it with more keyowrds or remove some
if we find some problems with other files.
Tested so far with the Be Book and Haiku user guide CSS files.
Fixes #18144.
Change-Id: If04fba18846d17ba0eb28dd0bd12787f1fe32028
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5948
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele <nep@packageloss.eu>
(cherry picked from commit 4562b1727c)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5926
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The _Setup method can be called several times if the parameters are
changed (for example when calling SetQuality). But it always allocated a
new context without freeinthe previous one, resulting in a leak.
Part of #9458, it fixes the largest leak there (10K bytes for each loop
of the provided test) but there are other leaks left as well, some of
which apparently need an update to a newer ffmpeg version removing some
deprecated fields.
Change-Id: Iad119dbda9cff1ce023b602a1978b100a1263f7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5953
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit beff8fa729)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5925
This work-arounds the issue of the VirtualMemory preflet showing
RAM FS volumes as valid storage options for the swap file.
Removing B_FS_IS_PERSISTENT didn't work as I originally expected,
causing problems when attempting to write/delete entries on RAMFS
mounts after that.
Kudos to waddlesplash for the B_FS_IS_REMOVABLE alternative.
Change-Id: Id5ba1fa192b63b944cf59413a7f580ebb608e50d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5911
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1cae9edcc7)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5920
* aborted transfers will release the notify semaphore when the cancel is notified.
* the allocated buffer would be freed on return, while the usb stack eventually copied
data in the buffer in our back, leading to KDL crashes, because the freed buffer would
be right reallocated for some kernel team structures.
* regression introduced by hrev55806, the transfers didn't need to be cancelled before.
Change-Id: Ifb6e941f71d05c37c36f878059c33883bb72a67c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5905
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 76ddb69a3a)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5919
On 32bit x86 gcc11, allocations should be aligned to 16 bytes, but the
block header (which is stored before the allocations) contains two
pointers, which on a 32bit system results in 8 bytes. Add some padding
to make this header 16 bytes, guaranteeing that the data area is
actually aligned.
Fixes #18111.
Change-Id: Id23f8c0272d75090710f872b728852cd0fcb19ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5916
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This makes sure that apps get access to these variables regardless if
they are started from a shell or from GUI (double-click from Tracker,
desklink, etc).
Fixes #18130.
Change-Id: I82e2884e460fad7d6ec16e7b624c5cd2fcf807df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5897
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
(cherry picked from commit 3af8011358)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5918
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We need O_CLOEXEC here, not FD_CLOEXEC (which is equal to 0x1, which
in openflags is O_WRONLY and thus leads to the conflicts caught by
the previous commit.)
Fixes haikuports/haikuports#7524.
Otherwise we will have open modes that could have both and lead to
confusion in code that presumes only one will be set.
This catches the cause of some ported software (e.g. Wayland layer)
misbehaving with ramfs mounted in /var/shared_memory: the ramfs does not
properly handle both flags set, and due to another bug, they are for
shm_open'ed files.
This will allow proper operation of POSIX SHM API (shm_open etc.).
Now memory files are stored fully in memory and do not affect disk
storage (except swap if enabled).
Change-Id: Iae3ce1afa968df72e82198e598a273cbf7cb0269
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5802
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit bf2786efae)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5851
This saves 16 bytes in the class vs. the old size, but more importantly
allows us to avoid allocating VMCaches and wasting an entire page for
any attribute larger than 32 bytes; instead, attributes can be up to
1024 bytes before we allocate a full page for them.
Unfortunately small files cannot take advantage of this optimization
right now as the cache is always used for them. I added a TODO about
this.
(cherry picked from commit 396e3dfb9c)
Change-Id: I6c939565dd577cb86aeb7b518a219da01cb313a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5849
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As, of course, we are deleting it. This problem was obscured by the
one fixed by the previous commit.
(cherry picked from commit 4e742d81ab)
Change-Id: I071b6356d85fb4e834125fa4a453b8ebf206510a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5848
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* RemoveReference() could delete us immediately, thus we must do
all important work before invoking it.
* Add assertions about fRefCount and remove a spurious add.
* Do not use Link but PublishVNode on the root, as we manually manage
when this object is published/deleted.
Fixes #18032.
(cherry picked from commit 605ecac1ee)
Change-Id: I696e652bc4094baacb5336b1180d8b90f3f0f864
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5847
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* We do not want to set fNode in the constructor but let the invocation
of Link() take care of doing so instead.
* Link/Unlink manipulate linked-lists. Thus it is dangerous to use them
in tandem on the same Node object. Add a check for this.
* Minor cleanup.
(cherry picked from commit 6a8bb0562e)
Change-Id: Iec3c8596d4b8fa24be94247a1f29b9cbdf9909fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5846
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
remove the yarrow module. the hardware modules can push entropy with queue_randomness().
virtio_rng will now push entropy every 300 seconds.
helps with #14937
Change-Id: If76c5deabf61dc616a0e051332f44b89deb6b8a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5824
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 34e9243872)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5843
Spotted while investigating #18111, but likely does not fix it.
This matches the existing behavior of the runtime_loader heap.
(cherry picked from commit 5f40b96c35)
Change-Id: I85a60309585ffeec8ab558b899a7782e8da5a413
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5841
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The files and formats are different for libnetservices and curl
backends, but now they are under the same directory whatever the
installed haikuwebkit version uses.
Change-Id: Iab87d5fd27ebea1fa0a8967a9802dfa2fb11240a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5835
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 753349fb2e)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5839