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>
To avoid dstcheck appearing on Deskbar's Recent applications menu
right after boot.
Noticed that /bin/fortune was also missing this flag.
Change-Id: I18e166d83d85613a99903b0805565647b7d4d001
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5949
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Copying an entry_ref is not cheap since the "name" field needs to be
allocated and copied separately everytime. Here it is not needed at all,
so let's just use a reference instead.
Change-Id: I1e572b69569cbb7437db147b483779245ec5e180
Fixes a memory corruption: the ffmpeg plugin has a LOT of file
extensions, which goes way past the 8 allowed characters and even past
the 88 reserved bytes at the end of the structure. As a result, memory
after the structure is overwritten, resulting in heap corruption and
crashes.
This is immediately detected by using the guarded heap.
As a short term measure, use strlcpy to avoid overwriting memory, but
now the ffmpeg plugin will be unable to provide any useful info. It
would make sense to make media_format_info store a pointer to a string
instead (similar to entry_ref), but this requires more changes and will
create some incompatibility with existing apps if they use the field.
Change-Id: I8d2b567a179e9f7816b72f48aedac4e8534bc044
The root node does not come from any package, so it shouldn't have the
SYS:PACKAGE_FILE attribute. Remove it from there.
Fixes#12453
Change-Id: Icb695bb90644753d4af1c4215c4ad3c2dd9c5e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5951
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
for now the hexadecimal code will be displayed.
Change-Id: Id5594f2d806cbd391ece8740332947e92814e238
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5915
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Move "Create" as default button to the right, "Cancel" to
the left.
* Fix ESC triggering "Cancel" instead of "Create".
* Use B_INFO_ALERT when asking to create a folder.
* Use "OK" instead of "Cancel" for acknowledgement.
Change-Id: I15ab52ea9abc9c977f757efd27fa0e2232cf74f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5946
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Uses the same format as the Terminal settings file
* Adds an additional key, "Theme name", to settings for themes,
which needs to be present for a theme to be loaded, else it
will be skipped
* Loads themes from Terminal/Themes in the data and settings
directories, searching data first, then settings second,
allowing a theme to be tweaked by putting a copy in a
settings folder
Change-Id: I8cadf98151459c1ae6098c38481b16eb3f2cf952
also set the background flag
Change-Id: Ie198476d666a0cd290520d15534afa3a73cf8a1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5936
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This patch adds an API call to BFont, called LoadFont, that
takes a string path to a font file. The user fonts are managed
via a new class called AppFontManager that inherits from the base
class FontManagerBase but adds the methods to add and remove user
fonts from disk or memory. There is also a new method called UnloadFont
to remove a user font, but on exit of an app all user fonts should be
automatically cleaned up.
Global/system fonts are managed by the GlobalFontManager, which is
a new class that also inherits from the base class FontManagerBase,
replacing the old "FontManager" class.
A maximum of 128 user fonts may be loaded, and memory fonts
may not exceed 20MB.
There's also an overloaded version of LoadFont that accepts
an area_id and loads the font from memory. A size and offset may
optionally be provided to allow for an area that contains more
than just a font.
Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Shortcuts was a bit overzealous while filtering out modifiers on
B_KEY_DOWN message handling.
This allows to enter keys regardless of the state of caps, scroll, or
num-lock modifiers.
Change-Id: Ie204f8e7938214ca68f45404026c7959216e0fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5943
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
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>
The API allows a user to end parsing responses earlier if the response has a
client (4xx) or server (5xx) error code. The end user should still be notified
of this result, so that they can act.
Change-Id: I11f2ab296658f767b5b34e10badb54de27aab494
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5910
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* 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>
* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff
Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Contributes a lot of spam to syslog on non-x86
Change-Id: Ia22a1f6d167b9a9576cca6694dca99d853dad2d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5902
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
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/+/5885
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
... even when the "Generate image thumbnails" setting is off.
This allows applications to generate thumbnails for 'non-media' files.
For example I use this in the ACE Amstrad CPC Emulator, to add a
thumbnail to emulator savestates (snapshots) with a screen capture of
the machine.
Change-Id: I95b0e4c64f5b1ffa779512755f70cfd9c1881661
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5768
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
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.)
Fixeshaikuports/haikuports#7524.
(cherry picked from commit 59e09f7beb)
Change-Id: I5751822ac48ae7a865755494da241e4bfd34c45f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5853
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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.
(cherry picked from commit 9bc250e28d)
Change-Id: I9e98be89b6d4a2da90f74c048b4f762ca9cf8738
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5852
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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>
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.
we detect basically the cpu info before loading the microcode,
to be able to detect the vendor, and avoid any update on hypervisor.
I couldn't test because my cpu doesn't have any update available.
Change-Id: I6aea830158423b3ee13b640be8a788fc9041e23c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5859
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@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.
* 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.
No functional change as-is, but this is necessary with some experimental
patches I am testing which add a lot more assertions to DoublyLinkedList,
which thus require it to have constructors/destructors for the Link class.
Previously it was spread all around the tree, and was not defined
consistently for all boot objects (there were a number of boot modules
which did not define it, but did include headers which checked for it.)
Now, as it is handled in SetupBoot which is invoked for all boot objects,
it will be applied consistently throughout. We can thus drop the manual
additions of it from all Jamfiles.
This can happen if we are already at the largest or smallest size.
Fixes#18066.
Change-Id: Icf68627ea51a054dac806ec0c9258bc80c869483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5840
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>
the entropy source is read every second and pushed to the PRNG.
the PCI device is tested, not the ACPI.
Change-Id: I9bb6b21c7189b28a1d8a624d83b33ff6682152dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5825
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
tested on Zen2 (Ryzen 3 5300U)
This support was submitted in October for inclusion in Linux.
Haiku supports only two profiles. We could probably add some more, and let the driver says which it supports.
Change-Id: Id7754b445bc32a691d58a1e4af630351562abc22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5826
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
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>
The rest of the code does a memcpy(..., ..., min(11, strlen(...))
so clearly no NULL terminator is needed and 11 is the real limit.
Should fix#18074.
Change-Id: I6aea166899eab2bab9511ca52981ccc9172b6c17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5823
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Invalidating the layout may not be enough for an update.
Fixes: #18069
Change-Id: I93f6b0feb043c7f317a9ff1e7af11b2047fc7cd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5821
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
the dependency is optional, only the device modules depend on it.
should fix#18075
Change-Id: Ifddb9814ff5ff59ee7d80d06b14ba9fded04cd56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5822
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.
Handle other spaces too, for good measure.
Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... even if no icon is present. Draw stripe w/o icon.
"After ... hrev56382 alerts ... with no icons appears without a
gray stripe, causing it to jump left and right."
Fixes#18033 for R1B4 Release Milestone.
Change-Id: I35acc07411cadd4b394d6dfa1957049280b6f4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5810
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes#18046. Ideally app_server would just use
this to pick the size of corners...
Change-Id: I2dc243d55321b3fc0fa90faf415d9b04abf9c376
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5780
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This was initially added so users on the nightlies would not wind up
with no translators installed on updates. It has been long enough
that we can probably remove this in master. (I will re-add it
in the beta4 branch for users upgrading directly from beta3 -> beta4.)
This breaks ABI as we forgot to do this originally and a lot of apps
implicitly use symbols from libbe or elsewhere that are imported from
libshared, but we are about to branch beta4, so now is the time to
change this.
Fixes#17256.
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].
The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.
The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.
The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.
The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.
[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2
Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
* Nothing in the tree and few things outside it used BIG_{SPACING|INSETS};
it seems a value of 15px (at default font size) is not that useful.
There are, however, a lot of things around the tree that use multiples
of 20px. So, make BIG be that, with the intent to replace those
with BIG directly.
* Introduce CORNER_{SPACING|INSETS}. There are a lot of applications
(e.g. Tracker, Terminal, Debugger etc.) which use scroll bar width/height
to metrically align controls with the window frame or with some other
control which contains scroll bars. Rather than have to invoke
BScrollBar or BControlLook directly to get the value, we should just
derive the size of scrollbars from a spacing constant instead
and get rid of the custom function. (For now it is just replaced.)
This reuses the old values for BIG, as it is equal to 14px at default.
* Introduce BORDER_{SPACING|INSETS}. This is equal to the typical border
size of 1px at default font size (or lower) and uses floor() instead of
ciel() to compute what the size should be (i.e. it will remain 1px
at 150%/18pt and only go up at 200%/24pt.) This will allow a lot of
the hardcoded border sizes around the tree and elsewhere to use
ComposeSpacing() instead.
Change-Id: Iaea3fa30364859888e816a9d61ac156268d70758
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
While calculating buffer size for IN reports, only "Input" report type
should been taken in account. Complex HID devices, such as "Gaming"
keyboards and mice, often have "Feature"-reports declared (with size way
bigger than "typical" kbd IN report) for vendor-specific device
configurations.
But "Feature"-reports are sent over control channel only and can't
appear on interrupt channel.
Should fix#14919, #17937, #17699
Change-Id: I4b9eb51938ca4aba2bc34247d00ae164eb2c19fc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5771
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
The last thttpd update was less than perfect. A bad format string was
causing crashes on directory listings, and some of our changes were
removed, like PoorMan's setting for directory listings, leaks and thread
safety.
Fixes: #17329
Change-Id: I84d9862a0ebd5492a2542cf9776462e7fe7dbe77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5772
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Not particularly high priority (this being a test) but... I came across
these while searching for code still needing updates after the changes
on BPartition::ContentName().
Change-Id: I05e8d6c02ba34688cee4f0b55e4e782243b0af4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5769
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
system_time returns the number of microseconds since booting. This is
not what's needed for the thumbnail generation timestamp attribute, as a
result the attribute was always considered out of date and the stored
attribute would never be used.
Change-Id: I3728077c484f341b765700532d3f986e64f165ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5767
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
This commit formats all the netservices2 code with the `haiku-format` tool from
https://github.com/owenca/haiku-format (commit aa7408e), with the following
customizations:
* SpaceBeforeRangeBasedForLoopColon is set to false
* Braces before a catch block are not wrapped
* Most headers, except for ExclusiveBorrow.h, have been manually reformatted
to adhere to Haiku's header format (issue #19 in the repository)
Change-Id: I693c4515cf26402e48f35d1213ab6d5fcf14bd1e
vnode deletion is prevent either by owning a reference to the node,
or by being at least a reader of the vnodes lock. Thus, in acquire_vnode,
we have to inc_ref_count while still holding the lock in order to prevent
a race.
This function is used so rarely and quite deep inside FS drivers that
I'm not sure this race would ever have been a problem. Nonetheless
the old code was incorrect.
Most of the time, that is harmless and will just cause a slight delay
before the vnode is removed and we return NULL instead of finding it.
However, in rare circumstances involving renames, we can wind up in
a deadlock with the thread that is trying to remove the vnode, and
would have to wait all the way to the timeout (a full ten seconds!).
The only vnodes not about to disappear from the table that can be both
"removed" and "busy" seem to be special vnodes like pipes, which will
be in an "unpublished" state while they are initially "busy" which we
can check for, in case something wants to wait for them.
The "dirconc" test readily triggered a pathological case of this behavior.
Before this commit, it ran for over 15 minutes before I killed it (and
it was not close to done at that point, either.) After this change,
it completes successfully in around 3 minutes or so on my test VM.
Thanks to mjg@freebsd.org for pointing out this testcase and its
misbehavior on Haiku!
Change-Id: Id1accf0aaf0724e1aec927a437d3a2ac1596cd98
Generate a name indicating the volume size and filesystem.
Remove code that was doing that or similar things in various
filesystems.
Change-Id: I6b993735e58cdfaf1f19af575e918614c7fe5679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5381
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
When parsing a raw HTTP body without a known size, whether or not a request is complete depends on the
end of the connection. Make sure that the parser updates to complete when all the bytes in the buffer have
been read and the connection closed.
Change-Id: I6f055b43ffe4a44da65da85c19b71304d804c800
Directory Iterator class represents one instance which could be Short, Extent, Leaf, Node or B+Tree, a good case for making it an abstract class
Change-Id: I925255caf4c4f8bc01a975740ef2ebf0bb2e1b49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5764
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Opening and closing a file from the results window with Pe, for
example, was triggering unnecessary new grep searches, when only
the attributes or other metadata on the file got changed (and
not its content).
That new search was also changing the focus from the results view
to the search field (making one lose the position on that list,
specially annoying with large number of results).
Avoid that by not monitoring/reacting to B_ATTR_CHANGED, and not
reacting to B_STAT_CHANGED if the only flag is B_STAT_CHANGE_TIME.
Change-Id: I56d34c93da94acf36890abe458da45d26a334593
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5763
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The GetNextNetwork() method is really inefficient: it fetches all the
networks at once from the kernel every single time and then winds
up returning only one of them. In parts of the GUI that iterate over
all networks more than once per refresh (sometimes within a loop, even!)
this was often a noticeable lag on the GUI, especially with OpenBSD
drivers which have extra overhead to do struct translation in the
ioctl handler.
Now, we have a way to fetch all scan results at once and just iterate
over them as many times as we need, and this is what NetworkStatus
and Network preferences now do, saving lots of time and effort.
These were not maintained here, merely mirrored from the Userguide Translator,
and rather infrequently at that. But as they were built with Haiku,
that meant new versions of these packages were built every hrev,
which meant a lot of wasted space and bandwith for updates.
Now there is a separate "userguide" repository which will collect the
files exported from the Translator, and recipes at HaikuPorts to build
the packages, instead, so we can delete these files from this repo.
This is normally done just after init, but in the case of deferred init,
there will be nothing to print at that point.
Currently, there is no way to access that info after the system has
booted. listdev should be extended, or the info should be published in
PCI device nodes to view in the Devices app.
Change-Id: Id89377ccf8bb967abae96194e503fffc06477acf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5758
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This change refactors various parts of the HTTP parsing. The HttpParser now
tracks what part of the message needs to be received next, and throws an error
if the object is used in the wrong way (when the caller requests to parse the
wrong part of he message).
The metadata about the transmission is now also saved in te parser. There is
partial work in there to start exposing the 'bytes written', which in
compressed streams is expected to differ from the bytes read. This is not
used yet.
This also simplifies the state tracking done by BHttpSession::Request.
Change-Id: I8532c6a5c8776456ea8bbccd6df7a44bac92b60d
- Made GetNext() function in Node Attributes efficient by reducing disk seeks to number of Node entries
Change-Id: I4e2bf8fb1898676c30eca2c6d6f39dc1999ae2f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5612
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Before implementing interrupts, all I/O was polled.
Now we only use polling as fallback if interrupts mode
does not work for some reason.
Should fix#17484.
* Set only a minimum width and then resize to preferred on window.
* Set a minimum height for the text view itself.
* Use the new TextView controls instead of the old BTextView.
* Adjust other size constraints as needed.
Fixes#17998.
- These two functions imported for Linux/BSD compability.
Signed-off-by: Han Pengfei <pengphei@qq.com>
Change-Id: I3e9cada26f1ed043bfaed83e8185dcfff3bd71e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5746
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
for legacy and new drivers.
This is an opcode for ioctl that can be used on almost any device entry found in /dev.
When used, ioctl will fill a buffer with the absolute path to the driver file that is
being used by the device.
This opcode was available in BeOS R5, though remained unimplemented in Haiku since
the introduction of the Device Manager almost two decades ago.
Original change by Jacob Secunda.
Change-Id: Ic49141b677b4158a63918459d4048450c825447c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5078
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Not perfect, but does give some nice data on what makes the most
"error noise" on boot
* We should eventually make this a ruby or python script to do
better reporting
Change-Id: I831af05520a95ffba492c068c105f93ff2c31a2d
The window was changed to be larger and completely fill he screen at
640x480, this does not look right. Restore the previous 500x300 size
constraint.
Fixes#17952.
Change-Id: I7d60253b7304ede788e064adf2bad20168393a33
* This seems to be required when building the DriveEncryption kernel
driver with gcc 11.2 on x86-64, at least.
Change-Id: Ie1ae09435dd912021957e64d4b9a3e7b05913c33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5742
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Extracted a _GetOSVersion() function, and used that to get the value
for version text, and to update it at replicant instantiation time.
Should fix#17957.
Change-Id: Ifc964c3646743a503fd756c902d102977e35e73d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5724
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This avoids using them while uninitialized (as could happen when
using the archive constructor.
Fixes#17955.
Change-Id: If75354216b9731b3273d79aec787cd0140a6175e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5723
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tried to match the USB classes to categories.
Change-Id: Id021730755060ab6a5149eea87f5e25370c67e1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5738
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
the device identifier is the USBID. no actual interface to be used by drivers.
Change-Id: I9fd1fdab0d02f1b82380c619b39bc3a12a9e2333
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5736
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>