Commit Graph

59249 Commits

Author SHA1 Message Date
Barrett17
1f2ddf2fd0 Codec Kit: Initial BMetaData implementation 2018-11-18 16:57:12 +01:00
Barrett17
b4d8bbd540 Codec Kit: Move Managers to private headers
* Those classes are not ready for public consumption. Ideally,
I'd add a well designed BCodecRoster wrapping them. This is part
of the general cleanup I am doing to get the code in a good state
before going to finalize the design.
* I don't plan to reintroduce BMediaFile in the media2 API, and
I'd like to remove any (explicit) usage of entry_refs and things
like that.
* I plan to introduce BMetaData and BMediaFormat which is going
to be different than what we do now.
* We need to explicitly use the mime type when it's available and
it is another design consideration when CodecRoster will be introduced.
2018-11-18 13:15:35 +01:00
Barrett17
3fe994ba28 MediaExtractor: Move stream_info to private 2018-11-18 12:53:14 +01:00
Barrett17
121db87f5f Revert "codec_kit: Remove Perform"
This reverts commit a9ccd74af7.
2018-11-18 12:06:14 +01:00
Augustin Cavalier
041a1f3639 userlandfs: Only add kernel flags in RequestAllocator in _KERNEL_MODE.
Otherwise, create_area fails with "Invalid Argument." Should fix the
"empty directory in userlandfs mount" bug that has been appearing
since the cloneable-area fixes.

Change-Id: I26e73539a9f345e76b22a34a68fe4b49c63683c2
Reviewed-on: https://review.haiku-os.org/707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 05:09:13 +00:00
Jérôme Duval
8c053e955e vfs: fail write_stat() on file descriptors opened read-only.
Change-Id: I20d586c606c47df6625cc9272f153250a5a621d6
Reviewed-on: https://review.haiku-os.org/706
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 00:04:26 +00:00
Augustin Cavalier
9cc0f06a01 kernel: Remove the B_KERNEL_AREA protection flag.
It is now no longer used.
2018-11-17 16:46:49 -05:00
Augustin Cavalier
04f1a9beae vm: B_EXECUTE_AREA should not imply B_KERNEL_EXECUTE_AREA.
Trying to execute user-mapped areas in kernel space should trigger
a fault with SMEP enabled anyway (and we have not seen any thus far.)
2018-11-17 15:24:59 -05:00
Augustin Cavalier
d12a2ff55c vm: Block userland from modifying any area owned by the kernel.
Previously this protection was possible via the opt-in B_KERNEL_AREA flag,
however, almost nothing used that, so in practice these protections were
rarely enforced.

Userland can still access kernel areas according to the protection flags
(and due to SMAP, these have been refined and reduced as appopriate)
and clone them (according to B_USER_CLONEABLE_AREA flag, which has
been required since August of this year), but they can no longer
resize them (something no in-tree application does on any shared area),
set protections (otherwise they could add B_USER_CLONEABLE_AREA...),
unmap them, or essentially do anything else besides get their
information (and even that we should restrict to uid 0, in the future.)

From my testing, this does not introduce any issues, and no applications
nor drivers should have been relying on the previous behavior (unlike
SMAP or the clone-area changes, which did affect applications.)
2018-11-17 15:11:12 -05:00
Augustin Cavalier
a54cdaa07a idualwifi7260: Fix a different instance of memset(NULL). 2018-11-17 14:57:50 -05:00
Augustin Cavalier
01304f19fd idualwifi7260: Don't memset NULL. 2018-11-17 14:05:14 -05:00
Barrett17
a9ccd74af7 codec_kit: Remove Perform
* Undocumented and apparently unuseful pattern.
2018-11-17 18:42:50 +01:00
Barrett17
9d90a8381d StreamerPlugin: Add ctor 2018-11-17 18:39:39 +01:00
Kacper Kasper
35dbbd990c ProcessController: fix replicant for 12 CPUs
* Slightly change the formula for bigger sizes (use real width).

Change-Id: I66204c2727f30e3f139b506174e287811c258fa9
Reviewed-on: https://review.haiku-os.org/704
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2018-11-17 16:30:45 +00:00
Peter Kosyh
a6a1266240 mail: IMAP fix deadlock when connection failed
fLocker must be released in IMAPConnectionWorker::_Worker() before WorkerQuit() call.

Change-Id: I1e622a711fa3349986560af1118b158696025844
Reviewed-on: https://review.haiku-os.org/705
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2018-11-17 16:26:35 +00:00
Adrien Destugues
a4ba432352 Fix line counting in StringView.cpp
- if fText is an empty string, we would start searching past its end,
  possibly leading to a crash (noticed this in HaikuDepot).
- if fText is NULL, BString would report a size of 0 lines, it makes
  more sense to report a size of 1 line.
2018-11-17 14:12:25 +01:00
Alexander von Gluck IV
53ce162d3d Revert "RepositoryRules: Use absolute output path for bootstrap package,mimeset,mimedb"
* Nope.  Double generated directories when bootstrap run from HAIKU_TOP
* Third time's a charm?

This reverts commit 3db452372c.
2018-11-16 20:49:36 -06:00
Alexander von Gluck IV
3db452372c RepositoryRules: Use absolute output path for bootstrap package,mimeset,mimedb
* First re-fix of what was reverted in 85f8e7001
* haikuporter calls these during bootstrap and needs absolute paths

Change-Id: I40f1b15ffd474d3286356f3151eacd9a4a09add2
2018-11-16 20:05:07 -06:00
Michael Lotz
d69baff8cc virtio_net: Align transfer buffers, check get_memory_map result.
The buffers were allocated with B_ANY_KERNEL_ADDRESS and the buffer plus
header block would produce uneven sizes. This lead to some buffers
crossing page boundaries. The call to get_memory_map() is only supplied
with a single entry, which in such a situation may not be enough if the
physical pages are not contiguous. Due to missing result checks this was
not noticed.

Use B_ANY_KERNEL_BLOCK_ADDRESS and align the size of the total buffer
to avoid such page boundary crossing.

Fixes randomly truncated frames in the receive path.
2018-11-17 00:34:49 +01:00
Michael Lotz
15a0bc24cc virtio_net: Use proper frame length in receive path.
Previously the frame length was set to the allocation size of the buffer
itself, which is constant. Use the length returned on dequeing instead,
which tells how much of the buffer was actually filled.

Fixes overly long frames that lead to various problems along the receive
path.
2018-11-17 00:34:49 +01:00
Michael Lotz
2f211cce6d virtio: Replace size return with usedLength in queue_dequeue.
The size was in fact the count of physical entries that were used. That
number must necessarily be the same as the number given when adding to
the queue, so that number isn't really interesting. Consequently none
of the users of that API made use of it.

Return the used length instead, which is the way virtio signals how much
valid data resides in the dequeued buffer. This is for example important
to know the frame length of incoming packets in virtio_net.
2018-11-17 00:34:49 +01:00
Michael Lotz
14b0498cfa arp: Trim the reply buffer to the filled length.
We reuse the incoming request buffer to send our reply. We did however
not trim that buffer to the length we actually filled out, allowing
any extraneous incoming data to remain in that buffer and be sent back.
2018-11-17 00:34:49 +01:00
Alexander von Gluck IV
76392ecac7 3rdparty/configure.py: Add warning to generated BuildConfig
Change-Id: I00110260efebf07aef81bc618d7e07c73aa07fa4
2018-11-16 16:19:28 -06:00
Humdinger
1eb0122fc7 pkgman: a bit more detail on usage
I forgot that there are special usage texts for the individual
pkgman commands. Make that a bit clearer in the usage text now.

Change-Id: Ia6641b2aa20d03a67d9dedddabf3a1f34d324322
Reviewed-on: https://review.haiku-os.org/702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-16 16:11:50 +00:00
Augustin Cavalier
a5297c5905 build: Add SYS:NAME attribute to all folders handled by Tracker.
Mail and Deskbar folders are still TODO.
2018-11-15 22:36:35 -05:00
Augustin Cavalier
9283f47bec ImageRules: Fix adding directory attrs.
There is no variable "dir" in this rule, only "directory".
2018-11-15 22:23:06 -05:00
Augustin Cavalier
795f1571b3 Move data/image_directories to src/data/directory_attrs.
These data files are used in the generation of build targets,
so moving them to src/data alongside the package_infos & etc.
makes more sense.

They don't seem to be activated properly though (I added some tracing
to try and figure out why they aren't used but haven't gotten to the
bottom of that yet.)
2018-11-15 21:20:24 -05:00
Augustin Cavalier
ee355c32c7 packages/Haiku: Remove liblocale.so -> libbe.so symlink.
It has not been in /system/develop/lib for a long time, and all
applications have been rebuilt multiple times since PM, so this
isn't needed anymore.
2018-11-15 20:43:42 -05:00
Augustin Cavalier
17640964db build_haiku_image: Remove obsolete copyright concatenator.
All third-party software is now packaged and we ship the licenses
directory.
2018-11-15 20:32:22 -05:00
Augustin Cavalier
a4dcbfcef1 Mail: Detect URLs by parsing ahead instead of checking every character.
This is a *massive* performance improvement; some longer emails that
took 45+ seconds to load before now take < 1 second, at the cost
of a completely rewritten URL detector. This means some URLs that
were detected before (e.g. anything starting with "www", emails
without "mailto:", etc.) are now not detected, though support
for detecting them could be reinstated in the future.

Fixes #4816.
2018-11-15 20:21:35 -05:00
Alexander von Gluck IV
4d182b9b57 3rdparty/configure.py: Allow infinite architecture additions
Change-Id: Icdc2cb6cd63a1cd425f71d05d2f6dec72c0a3a07
2018-11-15 16:32:22 -06:00
Alexander von Gluck IV
cf62f22ad0 3rdparty/configure.py: Fill out BuildConfig and Jamfile
Change-Id: I57eb5081710b0b8b596a997a460d4d607e97d543
2018-11-15 14:45:30 -06:00
Alexander von Gluck IV
535dbc1368 3rdparty/configure.py: Experimental python configure script
Change-Id: I91c3fc194ca8e8c870f6f1b27c747d9e4d468ecc
2018-11-15 13:36:29 -06:00
Murai Takashi
f54b080275 fwcontrol: Fix PVS 1655
Fix char pointer *nodestr was compared with the '\0' value.

Change-Id: Ie6b0beb8b94b35d6824ab205688ce1a54bcd6a74
Reviewed-on: https://review.haiku-os.org/688
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-15 19:14:19 +00:00
Murai Takashi
63757dbb24 TGATranslator: Fix PVS 2332-2337, 2341-2346
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).

Change-Id: Ida53be936d14ce63b3bc60442408ec5044df5344
Reviewed-on: https://review.haiku-os.org/699
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-11-15 08:22:48 +00:00
Peter Kosyh
e0dbea8a60 mail: use MAIL:status instead of deprecated MAIL:read to query new e-mails
Change-Id: I758cb2b4c3111a300500976d7711e93f9d838a0b
Reviewed-on: https://review.haiku-os.org/687
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-14 00:34:47 +00:00
Peter Kosyh
239566d908 mail: simpler query for new e-mails
Before this patch, the BEOS:type was used in query. But in Haiku
the BEOS:type index is not created by default. So, this feature
dis not work.

Change-Id: Ib57b528eb852d256b7e0b7d203659af01e077801
Reviewed-on: https://review.haiku-os.org/684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:31:53 -05:00
Peter Kosyh
1f41c99ffa mail: IMAP inbound protocol destructor fix
This should fix crashes of mailer_daemon in IMAP workers.
This patch makes IMAPConnection destructor wait for all working threads to finish.
Also, do not call _Connect for QuitCommand (it speedups shutdown procedure).

Change-Id: Idffcc00d3459a96a85a8a073a343bcf4cd4984be
Reviewed-on: https://review.haiku-os.org/686
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-13 19:31:23 -05:00
Murai Takashi
71103e733c StyledEdit: Fix PVS 1167
Use new(std::nothrow) so that NULL check for allocated memory makes sense.

Change-Id: I6c0e66c63adda430686727a4085132c4e40c7530
Reviewed-on: https://review.haiku-os.org/692
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
82bbd737a1 sis7018: Fix PVS 1617
Use new(std::nothrow) so that NULL check for allocated memory makes sense.

Change-Id: Iab5efa869b83f5a312a1eaf8851a9e99888ff075
Reviewed-on: https://review.haiku-os.org/691
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
6c8b0b3724 PNGTranslator: Fix PVS 2237-2241
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).

Change-Id: I23df98e58ea1960463e86a75ff69d67855f59074
Reviewed-on: https://review.haiku-os.org/690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
99b0a7e0ed OpenSound: Fix PVS 2232, 2233
Use new(std::nothrow) so that NULL check for allocated memory
makes sense.

Change-Id: I690a796ac5a9a7a61440ccccf19f93fc6bf2d328
Reviewed-on: https://review.haiku-os.org/689
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Augustin Cavalier
05f730b0f8 More WriteAttr -> WriteAttrString cleanup across the tree.
Some of these were correct as they were ... but most weren't.
There are a variety of other correct ones I didn't change over yet
that someone else probably should (GCI task?).
2018-11-11 16:22:10 -05:00
Augustin Cavalier
5f5cc39c2c STXTTranslator: Fix truncated "be:encoding" attribute write.
Same issue as the mail_util fix.

Also while I'm here, alter behavior so that the Be-style attribute
gets overwritten with the Haiku-style one, instead of getting left
as is.

Should potentially help with #14674.
2018-11-11 15:58:45 -05:00
Peter Kosyh
398bb93961 mail: fixes of default notifier (reset)
This fixes POP3 notification messages.

Change-Id: Ic7d9c0bb23c4dc9814f6c4bade0aba367fa28db1
Reviewed-on: https://review.haiku-os.org/685
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-11 20:36:28 +00:00
Peter Kosyh
fea29e79c7 write_read_attr: fix truncated B_MAIL_ATTR_STATUS
This fix garbage attributes on e-mail messages on status changes.

Change-Id: I5293a0e71a1b84c04889fa3375488b0075aad12e
Reviewed-on: https://review.haiku-os.org/682
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-11 14:26:55 +00:00
Augustin Cavalier
23623eee9a registrar: Remove now-unused non-Haiku code. 2018-11-10 15:16:25 -05:00
Augustin Cavalier
387609c3be shortcuts: Remove #if __INTEL__.
This isn't true on x86_64 (so we were displaying the wrong key names there).
The actual names of the keys should probably be fetched from the selected
keyboard.
2018-11-10 15:02:04 -05:00
Augustin Cavalier
3bf15c7f86 shortcut_catcher: Remove non-Haiku code. 2018-11-10 15:01:45 -05:00
Augustin Cavalier
231ee3b8ad mail: Remove regex match limitation from the BeOS days.
It was still enabled on 32-bit x86...
2018-11-10 15:00:49 -05:00