Commit Graph

63865 Commits

Author SHA1 Message Date
Niels Sascha Reedijk
2b4cd81ff3 NetServices: add support for receiving incoming chunked messages
Change-Id: I1bfe22a7959c7a5fc7dc644e4e3941965edafb65
2022-07-19 06:29:36 +01:00
Niels Sascha Reedijk
826afd9616 NetServices: Refactor the parsing code into a HttpParser helper class
Change-Id: Ib03aacc36d46318c8870554f794ff66db4cce063
2022-07-17 15:54:54 +01:00
Niels Sascha Reedijk
a1e7583626 NetServices: add HttpBuffer to encapsulate buffered reading
Change-Id: I7ec3189c3cf459fccae4ffac44702fd6b8c12ac9
2022-07-03 12:17:10 +01:00
Niels Sascha Reedijk
6cf088266f NetServices: When the response Content-Length is 0, do not expect a body.
Change-Id: Ia715b44289dc3c64c2b834f954421413cbc3593c
2022-06-26 16:04:58 +01:00
Niels Sascha Reedijk
92357c131e NetServices: Add support for an input body in a request and handle this with redirects.
Change-Id: Id2399d49aa673469c8c04ebd13884cdbcb24112d
2022-06-23 21:13:35 +01:00
Niels Sascha Reedijk
6cbbd9bf4e NetServices: Implement BHttpSession::Cancel()
Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
2022-06-03 13:38:28 +01:00
Niels Sascha Reedijk
2f3b9b18ac NetServices: Add/rework the MaxRedirections, Timeout and StopOnError options
Change-Id: I4e59b51c16c6777941dc92ce02505386257dad03
2022-06-03 09:40:42 +01:00
Niels Sascha Reedijk
f9d9d20245 NetServices: Add support for Basic authentication
Change-Id: I304104f7096fd935212e1bfa3e988e7945cb5cec
2022-05-29 15:13:54 +01:00
Niels Sascha Reedijk
f751534257 NetServices: add optional fields to BHttpRequest
Change-Id: I6228419a55c81203ce2c26827d17ff6a402d86c5
2022-05-15 16:43:07 +01:00
Niels Sascha Reedijk
46b7da1f4f Merge branch 'master' into dev/netservices
Change-Id: I1eb6c2ea2fd0d794ad6378eab8bbb80ce46dfbb8
2022-05-08 09:00:42 +01:00
Niels Sascha Reedijk
929355add7 libroot: return error on partial match in strptime()
The previously implemented behavior of strptime() allowed for partial matches
of strings. For example, if the format string was "%a, %d %b %Y %H:%M:%S", it
would successfully parse "Sun, 07 Dec 2003" as input. This is inconsistent with
the standardization in POSIX.1-2001 (and later).

This change makes strptime() return an error if there is no more data in the
buffer and not the entire format string is parsed.

Change-Id: If066c49fb7fc094f8ccd56703cd01903a0e40cb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5298
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-08 07:58:05 +00:00
Niels Sascha Reedijk
cf54474e38 NetServices: Implement BHttpTime, parse_http_time() and format_http_time().
These utilities convert timestamp strings that are formatted according to
the HTTP RFC into BDateTime objects, and vice versa.

Change-Id: Ia2498944fb63d09233839f19d08f15d82a0a9685
2022-05-08 06:59:51 +01:00
Jérôme Duval
7ff9722ae3 intel_extreme: reuse DpAux code for DisplayPort
the code is moved in the Port class.

Change-Id: I3beb337e29b26ee4732224723c5b76b5f415a248
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5291
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-05 16:26:03 +00:00
Jérôme Duval
1c23e6bcf1 intel_extreme: leverage VBT device type for internal panel
* also handle dp aux on PCH.
* tested on Gen7, should work from Gen6.

Change-Id: I8d99bcdc10c817e66441a6a644df490dd988a74d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5290
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-05 16:26:03 +00:00
Augustin Cavalier
d98fcb7db6 HID: Return ENODEV instead of B_ERROR if the device was removed.
This should help with diagnosing problems in some failure conditions.
2022-05-03 16:59:19 -04:00
milek7
42c53fc8b8 arm64: Fix ELF relocations.
Change-Id: Icc48649d6a3a8c6b5b5ab845e9025352c1e77dfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5260
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-03 20:27:18 +00:00
milek7
8417420441 arm64: Do not misalign kernel stack.
AAPCS64 requires stack to be aligned to 16 bytes.
Additionally alignment might be enforced by hardware for every sp-relative
access depending on configuration in SCTLR.

Change-Id: Idd4756dd19386eb491d926b8a9862fa7fa48e506
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5259
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-03 20:27:18 +00:00
milek7
7c69ebda17 arm64: Add mapping of all memory in kernel virtual space at KERNEL_PMAP_BASE.
Change-Id: I828b1ba8c0add614e9df6bba1e14c5e514ec1bad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5258
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-03 20:27:18 +00:00
Lt-Henry
2684c64083 usb_hid: Update HID Consumer usage page constants to 1.3 spec
Change-Id: I5ffbcda41547b1a31049b5d7ba73f7327bb8cf04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5288
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 19:04:30 +00:00
Jérôme Duval
459f1bcd8d intel_extreme: irq hotplug support for IceLake and newer PCH.
we enable every port interrupt instead of relying on the ports found in the VBT.
ATM only log the plug state when it changes.

Change-Id: I5175fb137d11f0114beb2915a4f363341cfe8e36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5287
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 18:15:48 +00:00
Jérôme Duval
46bbf334f6 intel_extreme: parse VBT device configs, use this to skip unused ports
* BDB version from 111
* for DDI from Gen9
* for HDMI and DisplayPort from Gen6
* use the first port to create the mode list
* also probe DDI Port A
* the aux channel helps to select the correct dp aux registers.

Change-Id: I80549a6ec0477bed768cc5f388959b606d50c1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5286
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 08:48:34 +00:00
Autocomitter
2aac05508f Update translations from Pootle 2022-04-30 08:15:54 +00:00
Jessica Hamilton
2798df0e80 HaikuDepot: fix build rules
* Fixes a couple issues with independent target warnings, causing
  parallel build problems.

Change-Id: Id968709094c9d5efa4cb443c62c41c83c9622355
2022-04-29 15:24:03 +00:00
David Karoly
83f755b5d8 kernel/arm: add memory barriers for page table ops
Introduce memory barriers according to ARMARM,
section G.5.3 TLB maintenance operations and barriers

Sequence for mapping memory in (both L1 and L2):
* DSB
* Invalidate i-cache (TODO)
* Insert new entry in page directory / page table
* DSB
* ISB

Sequence for mapping memory out:
* Remove page table entry
* DSB
* Invalidate TLB entry
* DSB
* ISB

Sequence for updating a page table entry:
* Update page table entry
* DSB
* Invalidate TLB entry
* Invalidate branch predictor (TODO)
* DSB
* ISB

Note: i-cache invalidation and branch predictor invalidation is
not implemented yet as this commit focuses on implementing memory
barriers.

Change-Id: I192fa80f6b43117236a4be6fa8c988afca90e015
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5241
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-28 19:57:49 +00:00
Jérôme Duval
cf5f513b3b file_systems: add entry_cache_(add/missing) in btrfs,ext2,exfat lookup methods.
Change-Id: I77857421a65f371bc885f1d4eb66ef2ab4376e56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5252
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-28 19:16:48 +00:00
Mashijams
2cecdeed2e xfs : fix build with trace enabled, improve error checks
- Remove referencing an undeclared identifier

    - Instead of an assert, just log an error for XFS V5 filesystems
      and don't try to mount them

Change-Id: I67303aff89b81a28b7333569fea8113b6020dc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5204
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-28 19:16:12 +00:00
Jérôme Duval
1d2cf139a8 strace: trace fcntl and wait_for_child syscalls parameters
Change-Id: I774e8343139a2bdb3c2f60f37cab3a7207739c7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5251
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-27 06:00:58 +00:00
Augustin Cavalier
68d1b97e4f Clean up mouse functions in InterfaceDefs.
* Fully remove unused and deprecated functions.
 * Comment as to which functions are deprecated.
 * Rename _by_name functions to be without the suffix, as this is C++
   and there's no reason not to use overloads here.

Change-Id: I4e2152f17806605eb965795417013cea800e661e
2022-04-26 19:59:01 -04:00
Augustin Cavalier
467ffecdbb HaikuDepot: Temporarily disable viewing usage statistics.
It causes crashes (see #17689) and I was unable to determine the cause;
and it causes very noticeable lag (see #16879.) It can be reinstated
once those problems are fixed.
2022-04-26 17:51:51 -04:00
Augustin Cavalier
7d7de13527 HaikuDepot: Fix leak of ProcessCoordinators.
This function is supposed to take ownership of the coordinator item,
but it didn't do that in all cases. Use a BReference(..., true)
to do that.
2022-04-26 17:50:53 -04:00
Augustin Cavalier
a173592b40 Tracker: Fix memory leak in IconCache::SetIcon.
How often this would have occurred before thumbnail support I'm not sure,
but at least now that we have thumbnails, the icons are changed out
with not insignificant frequency, especially on read-only filesystems.
2022-04-26 15:03:01 -04:00
Augustin Cavalier
a64cdd1dcc Tracker: Overhaul thumbnail generation logic.
* Use a JobQueue and BJobs to generate the thumbnails, instead of
   spawning a potentially unlimited number of threads (which can
   of course rapidly exhaust resources.) Use two threads: one for
   smaller files, and another for larger files.

 * Directly insert the new thumbnails into the icon cache once they
   have been generated, avoiding the port-search dance on filesystems
   that do not support writing attributes (or at least large ones.)

 * Skip calling mimeset, is it not needed after the previous commit.

 * Combine all the duplicated image-scaling logic into one function.

May help with or fix #17225, #17619, and other thumbnail-related matters
e.g. #17557. Also addresses comments from the mailing list last summer.
2022-04-26 14:55:12 -04:00
Augustin Cavalier
6750cef9ca Tracker: Thumbnail attribute changes should cause an icon refresh.
This way, a full mimeset need not be run to trigger an icon update,
and also other applications can write thumbnails and trigger updates.
2022-04-26 14:44:12 -04:00
Augustin Cavalier
5192c3bfff Tracker: Move thumbnail-manipulation code to its own file.
Preparatory work for refactoring thumbnail generation to not use
so many resources (threads, ports, etc.)
2022-04-25 23:10:03 -04:00
Augustin Cavalier
457d8a9282 Tracker: Remove unused rgb_color creation function.
Nothing seems to use it. make_color should be used instead.
2022-04-25 22:28:46 -04:00
Augustin Cavalier
c6b6adc407 Tracker: Replace custom LooperAutoLocker with AutoLocker<BLooper>. 2022-04-25 22:28:45 -04:00
Jessica Hamilton
a43a4e9fbf Terminal: fix missing attribute state for the history buffer.
* This presented itself as 24-bit colour rendering as white on black
  when scrolling through the history.
2022-04-26 13:24:02 +12:00
Augustin Cavalier
07b83028cd emulex_oce: Remove.
It doesn't seem to work anymore, and it doesn't look to be particularly
maintained on FreeBSD's side of things. I think kallisti5 was the only
person who ever even attempted to use it.
2022-04-25 19:26:10 -04:00
Augustin Cavalier
acfde4597c kernel/condition_variable: Downgrade another panic into a debug print.
Fixes #17686.
2022-04-25 19:20:31 -04:00
Augustin Cavalier
acdd772db0 DiskProbe: Check we actually have a buffer before computing the offset.
Fixes #17709.
2022-04-25 19:16:28 -04:00
Augustin Cavalier
925b83a85a HaikuDepot: Fix scrolling the list triggering "looping."
If two PACKAGE_SELECTED messages were queued at once, then we would
wind up in a loop between the two, triggering the "looping" behavior.
Instead, do not send a PACKAGE_SELECTED message when programatically
changing what package is selected, which is more efficient anyway.

Fixes #11732.
2022-04-25 18:59:55 -04:00
Augustin Cavalier
a386685453 HaikuDepot: Cause and wait for the package-populator thread to exit on window close.
May help with #17689.
2022-04-25 18:46:13 -04:00
Augustin Cavalier
4e16be4fa0 kernel: Do not invoke memalign with 0 as the alignment argument.
The memalign() function has special semantics for its arguments
even when -fno-builtin is enabled, it seems (that may be a problem
on Clang's part, however.) The alloc_align attribute, which we apply
to the memalign_etc function, does not seem to have the same problems;
at least its documentation at GCC gives no indication that 0 is not a
legal value to pass.

Change-Id: Ie5ba090b924ac3577775165d20f11f9696be97f3
2022-04-25 18:14:44 -04:00
Augustin Cavalier
8f68daed84 kernel: Make use of the new ConditionVariable lock-switching APIs in a few places. 2022-04-25 17:59:50 -04:00
Augustin Cavalier
8af7b72d8d OS.h: Remove set_timezone function from header, place behind _BEOS_R5_COMPATIBLE_.
Long ago deprecated, not used in the tree.
2022-04-25 17:25:55 -04:00
Dale Cieslak
d39b5bfd0c DeskCalc: make input Locale-aware
Accepts input with separators based on user's Locale.  For example,
with a European locale, "1.234,56" is valid input. With a US locale,
"1,234.56" is accepted.  The grouping separator is ignored and
removed, and the decimal separator is kept.

Supports multi-byte decimal separator and grouping separators.

The keypad localization is based on the user's Language setting,
but the separators come from the Formatting. Thus if the Language
is set to English, but the Formatting is set to, for example,
German, the keypad will show '.', but when pressed it will emit
',' to match the number Formatting. Otherwise the keypad breaks
the localized formatting.

Fixes #8503

Change-Id: I0d112bdca67a4e4898e37062102343194ed47f8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4965
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:57:20 +00:00
Adrien Destugues
cda13c638d ARM: add support for Allwinner A10 interrupt controller
Untested so far.

Change-Id: I3453115599cf2112858a194173212401ae4ac1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5104
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:50:04 +00:00
David Karoly
41ed7a1ed6 boot/efi/arm: use GICv2 driver for GIC-400
The GIC-400 is compliant with Version 2 of the ARM GIC Architecture Specification.

Untested.

see:
* ARM Generic Interrupt Controller Architecture Specification
* CoreLink GIC-400 Generic Interrupt Controller Technical Reference Manual

Change-Id: I4e062173c56dddcc579c04050ca62cb341b60959
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5240
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:49:48 +00:00
Jessica Hamilton
914b10c17e wait_for_thread_etc: expose as syscall/make public.
* This will be needed for the following commit that implements
  `pthread_tryjoin_np` and `pthread_timedjoin_np`.

Change-Id: Idccb1aa588d6d10825294d14925d9bd046b65f19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5098
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-25 19:47:26 +00:00
Jérôme Duval
f123acc1d9 Terminal: COLORTERM=truecolor to mean 24 bit color support
this fixes mc support for 256-color skins.
bug #17719

Change-Id: Ifead9fc3acf396cada6f9ce4d83579657b74c86f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5249
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 19:27:21 +00:00