Commit Graph

59369 Commits

Author SHA1 Message Date
Murai Takashi
ab6bcb08bc Roster: Fix PVS 456-459
Remove unneed if condition, since 'error' is initialized to B_OK.

Change-Id: I2fd0edb99a3d055beafaf15f1140071a31140892
Reviewed-on: https://review.haiku-os.org/798
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-12-25 17:49:46 +00:00
Murai Takashi
09a5380d0c CharacterSetRoster: Fix PVS 528-530
Remove unneed if conditions, since unsigned type value is never < 0.

Change-Id: I76621f79883752cd3560c6e02f18384b1ddd9cf3
Reviewed-on: https://review.haiku-os.org/797
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-12-25 17:49:36 +00:00
Murai Takashi
12dba4e70f poorman: Fix PVS 922
Remove unneed appending a null character, since inet_ntop() adds null to 'addr'.

Change-Id: I21f5be7f737badd388f36a6dcf56a3b446b5d91c
Reviewed-on: https://review.haiku-os.org/795
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-12-25 17:49:30 +00:00
Murai Takashi
26c68df839 MediaDefs.cpp: Fix PVS 593
Remove unneed if condition, since 'size_t size' is unsigned.

Change-Id: I283afe6c1c24713b8efa21bd70747293fbc61899
Reviewed-on: https://review.haiku-os.org/796
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-12-25 12:36:42 +00:00
Barrett17
df580f53de ArchitectureRules: Cleanup deprecated plugins defs 2018-12-25 11:36:01 +01:00
Barrett17
3d26587adf Media plugins are not BeOSCompatible anymore 2018-12-25 11:29:50 +01:00
Barrett17
ba5c9689e1 Remove old deprecated plugins from addons/media/plugins 2018-12-25 11:29:01 +01:00
Augustin Cavalier
179e86d1db ipro100: Clean up Jamfiles. 2018-12-24 21:10:08 -05:00
Augustin Cavalier
9c8a78130b broadcom570x: Clean up Jamfiles. 2018-12-24 21:06:41 -05:00
Augustin Cavalier
7f601aefb4 broadcom440x: Clean up Jamfiles. 2018-12-24 21:06:28 -05:00
Augustin Cavalier
c6759927e3 attansic_l2: Clean up Jamfiles. 2018-12-24 20:06:37 -05:00
Augustin Cavalier
48ce31d137 attansic_l1: Clean up Jamfiles. 2018-12-24 20:06:24 -05:00
Augustin Cavalier
e153b204d9 atheros813x: Clean up Jamfiles. 2018-12-24 20:01:34 -05:00
Augustin Cavalier
24c8f452c0 ar81xx: Clean up Jamfiles. 2018-12-24 19:57:59 -05:00
Augustin Cavalier
31888b8cd8 net_server: Do not add the FreeBSD compat headers to the include path.
This was already done for libbnetapi and ifconfig, but apparently
net_server was missed.
2018-12-24 19:52:33 -05:00
Augustin Cavalier
dba28784c2 freebsd11_network -> freebsd_network.
FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.
2018-12-24 19:49:35 -05:00
Humdinger
16e5086044 Keymap: remove item from user list, if the keymap isn't found
Fixes #4022.

When a user keymap was deleted in Tracker while the Keympas prefs
are open, the map is still visible in the list of user maps. It
just doesn't react on a click.

With this change, we just silently remove the item from the user map
list when it's clicked. Not totally nice (should I add a BAlert?),
but the suggested node monitoring for this seldomly encountered
situation is overkill, I think.

Change-Id: I5ea6dd2aa117f30a7be348a005a10f3757d52459
Reviewed-on: https://review.haiku-os.org/794
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-23 18:10:02 +00:00
Humdinger
54782f4255 Mail: fixing unicode for szlig;
The unicode for szlig ("ß") when filtering HTML tags was wrong, showing
"ö" instead. Discovered by miqlas, pin-pointed by PulkoMandy.
2018-12-23 10:57:13 +01:00
Augustin Cavalier
52a022f201 BMenu: Accept any alphanumeric ASCII character on the first trigger pass.
Since we use sentence-cased menus, there is probably only one capital
letter in the line, so looking for only capitals won't be very useful.
Instead, accept any ASCII character (< 255) which is alphanumeric,
as these are more likely to be command-able in any given keymap.

(IsAlNum returns true for accented Latin characters also, which may
be un-command-able if they require dead keys to type.)
2018-12-22 00:36:30 -05:00
Adrien Destugues
588a0c9f67 BMenu: Use BUnicodeChar for unicode char manipulation.
It is not allowed to use isspace, tolower, etc, on character outside of
the char type range (and EOF). Use BUnicodeChar instead to avoid out of
bound accesses.

Fixes the second crash in #14753.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Some changes by me to make "index" a byte instead of character index
as it needs to be.
2018-12-22 00:25:10 -05:00
Augustin Cavalier
c1917899cd drivers/network: Remove dp83815.
Never included in the build, and superseded by the sis900 driver from FreeBSD.
2018-12-21 14:26:24 -05:00
Augustin Cavalier
2dd61eb019 sis900: Import from FreeBSD 11.2.
This replaces the old Haiku-native driver that was removed in the last commit.
It should support all the same chips that one did, in addition to the SiS 7014,
and the DP83815 also.

I don't have this hardware, so for anyone who does, please test.

Fixes #1657.
2018-12-21 14:22:32 -05:00
Augustin Cavalier
57910e89b8 freebsd11_network: Update miidevs. 2018-12-21 14:09:31 -05:00
Augustin Cavalier
c09ed858e0 drivers/network: Remove the old sis900 driver.
As axeld said 8 years ago in #1657, it can be replaced with
FreeBSD's sis driver.
2018-12-21 13:47:27 -05:00
Augustin Cavalier
a380bb0236 drivers/rtl8169: Remove.
Has not been included in the image for a long time; all the devices
it supported are handled by the "rtl81xx" FreeBSD driver.
2018-12-21 13:16:13 -05:00
Augustin Cavalier
1ac98e3ab4 BWindow: Prevent CenterIn from moving the decorator bar offscreen.
The MoveTo() call is not restricted in any way; it can easily move the
window's titlebar offscreen, which is very confusing for users as if
they don't remember the window manipulation keyboard shortcuts,
dealing with such windows is often very tricky (or impossible
if the window is actually larger than the screen.)

Now we also call MoveOnScreen with DO_NOT_RESIZE and
MOVE_IF_PARTIALLY_OFFSCREEN set, which will simply get the size of
the decorator bar and then ensure it is entirely on-screen.

Fixes #11763.
2018-12-21 12:37:10 -05:00
Augustin Cavalier
5e54f6d4f9 tests/kits/net: Move libnetwork-related tests to tests/system/network. 2018-12-21 12:26:38 -05:00
Murai Takashi
8a8e01bf41 strfmon.c: Fix -Wpointer-compare
Fix comparison between pointer and zero character constant.
Pointed out by gcc7.

See also: 3d4c1b73b9

Change-Id: I917ceefce69e269fbaa12a3ae60f0702f5c5d4a7
Reviewed-on: https://review.haiku-os.org/782
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-12-21 17:10:24 +00:00
Murai Takashi
be27cf7649 accelerants/common: Fix PVS 1116, 1117
Fix there are two 'if' statements with identical conditional expressions.

Change-Id: I3396d4e34b70dd293957a892cd603033d6664699
Reviewed-on: https://review.haiku-os.org/789
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-12-21 17:09:42 +00:00
Axel Dörfler
949a1ff7cc net_server: Documented suggested interface behavior
* Also simplified updating the interface message with SetString().

Change-Id: I29635cba5ddde693f6b7b97b8bd01769b02919d5
Reviewed-on: https://review.haiku-os.org/788
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-21 08:30:25 +00:00
Axel Dörfler
a0efb75a5c net_server: Configure devices not found in settings
* Previously, the assumption was that your settings would configure
  all devices.
* Now, all devices that are not covered by the "interfaces" settings
  file will be automatically configured.
* This fixes ticket #6423.

Change-Id: Ib1e0c70314dc27cde14a00601fc8045d32937dfd
Reviewed-on: https://review.haiku-os.org/787
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-12-21 08:29:04 +00:00
Murai Takashi
cdb7e8177d media-add-ons/multi_audio: Remove unneed menset()
Remove unneed menset(), since media_format already use memset()
in its constructor.
Also fixes -Werror=class-memaccess pointed out by gcc8.

Change-Id: I3283417323550492799a34a2d29cdad03a82a2d5
Reviewed-on: https://review.haiku-os.org/783
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-12-20 09:00:31 +00:00
Augustin Cavalier
a62458c79c runtime_loader: Export the correct reinit_after_fork.
Forgot to add this change in my last commit. Whoops.
2018-12-19 21:43:11 -05:00
Fredrik Holmqvist
08c9948c20 Upgrade ACPICA to 20181213: a lot of bug-fixes 2018-12-19 21:19:25 +01:00
Axel Dörfler
339eef5131 Revert "net_server: Add (more) missing devices even if one has already been found."
This reverts commit def61273ed.

This isn't a fix for the issue, it will just throw away all settings.

Change-Id: I2979c02c54f9379f25dc5d41d3a6085c09e87ac3
Reviewed-on: https://review.haiku-os.org/785
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2018-12-19 12:35:15 +00:00
Augustin Cavalier
3256001041 runtime_loader: Reinit the heap lock after fork. 2018-12-18 18:01:09 -05:00
Murai Takashi
296120e005 MediaPlayer: Fix -Werror=format-truncation=
Increase size of text[], since snprintf() write to it max 66 bytes.
(sizeof(positionText)-1 + sizeof(" / ") + sizeof(durationText)-1 + 1 = 66)
Pointed out by gcc8.

Change-Id: Ic6ce221edb4ceff4b63c7b30d26c52d613cbb35e
Reviewed-on: https://review.haiku-os.org/779
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-12-18 18:37:14 +00:00
Humdinger
947124d152 Mail: Add queries for same subject, sender, recipient
In the "Queries" menu, add three items at the top to start a query
for the same recipient/sender/subject as the current email. Move the
separator and "Edit queries..." item to the bottom of the menu.

The temporarily created queries are put into B_USER_CACHE_DIRECTORY/Mail/.
The data in those queries might be private, therefore not in system /tmp.

The queries use the DefaultQueryTemplates for x-email, if that exists. This
is done by copying all the template's attributes. Code for that borrowed from
'copyattr'.

When creating a query for the same subject, use the MAIL:thread text for
the search, as that doesn't contain stuff like "Re: Re: Fwd: Re...". Do
the query for MAIL:subject though, because sent emails don't have a
MAIL:thread attribute.

Change-Id: I23b46f3ec07760d17b076d8b8aa8839c5f88963f
Reviewed-on: https://review.haiku-os.org/768
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-12-18 05:45:13 +00:00
Augustin Cavalier
5e621d3edd tests/posix: Add tls_concurrency_test.
From #14342. Crashed before the last commit, now works. Disabled because
it won't build under GCC2.
2018-12-17 20:09:27 -05:00
Augustin Cavalier
df3de4792e runtime_loader: Make the heap thread-safe.
Previously we didn't need to care about threading in here, as it
was used only up to the point where the application's _start was called
and then libroot's heap would take over. But with the introduction of TLS
support by pdziepak in 2014, we also handle TLS bookkeeping inside
runtime_loader, and so this heap needs to be thread-safe.

Properly fixes the JVM crashes korli was attempting to fix in hrev52658,
and fixes #13154, #14129, #14304, #14342 for real.
2018-12-17 20:03:47 -05:00
Augustin Cavalier
e7d37c7e08 Revert "runtime_loader: Add missing locking around resizing the TLS DTV."
This reverts commit d0111efead.

Initially, I, too thought this was the correct solution. In
investigating the related #14342, I found that adding a lock of
the mutex in the function that crashed most often in (DestroyAll())
increased the time it took to cause a crash from 1-2 seconds
to 10-15 seconds, but it still inevitably crashed.

Further, crash addresses were often very low (e.g. 0x1, 0x18); on
inspection I determined these were coming from the fPointer fields
of TLSBlocks. But accesses to TLSBlocks were now well protected
by the TLS mutex, and they were memset'd after allocation, so that
didn't make any sense.

At that point, I went back and read over the code until I understood
it, and it became clear this solution was incorrect: TLSBlocks and
their underlying data are always associated with a specific thread,
meaning _Resize() and DestroyAll() would never be called on the same
data from different threads, despite appearances to the contrary.

Thus despite a dearth of comments in this file, it seems pdziepak
knew what he was doing when he wrote this; no locking is needed.
That left only one place to cause this kind of memory corruption...
2018-12-17 19:52:49 -05:00
Augustin Cavalier
da31c58577 shared/locks: Add RecursiveLocker.
Copied from the kernel version.
2018-12-17 19:51:45 -05:00
Danc2
def61273ed net_server: Add (more) missing devices even if one has already been found.
Fixes #6423 and helps with #14626.

In BringUpInterfaces, line 772 creates an error which only adds a missing
interface if one does not already exist (i.e., !_testInterface()). This can lead to
a missing WiFi interface if an Ethernet connection has been configured and set in
the /boot/system/settings/network/interfaces before the WiFi has had a chance to
be added to /dev/net. To properly configure a missing device, such as a WiFi
connection, and allow the user to choose amongst configured interfaces (i.e.,
add it to the list of devices in /dev/net and e.g., see WiFi as an option),
removing the 'if' statement on line 772 is necessary.

Two edge cases may arise:
1. A user may disable an interface -- don't add device
Solution: The code currently handles this. _ConfigureInterfacesFromSettings, called
at line 746, checks for interfaces in fSettings to see if they are disabled (706-711).
If so, they are disabled and not set as a missingDevice if the interface is disabled
(709). The next interface is checked... etc.

2. Devices must not be added twice (i.e., Checking for An Existing configured Network)
Solution: The code currently checks for this. On lines 716-720, a device that is found
in fSettings (missingDevice), is set to the interface which is later added to the
/dev/net within that (unnecessary?) if statement (772). The missingDevice will only
be set and added to /dev/net if an entry does not exist in the settings already (716)
(hence the identifier missingDevice).
Change-Id: Ifc303371b88f18c30141a651a7d97a3c860e864f
Reviewed-on: https://review.haiku-os.org/767
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-17 22:46:08 +00:00
Andrew Lindesay
3369e03d5c HaikuDepot: Process and Data-loading Improvements
This change is a reshuffle of the backend processing involved in the
aquisition of data from servers including the pull-down and load of
HPKR data as well as the pull-down and load of data from the
HaikuDepotServer (HDS) system.  The driver for this change is to
implement an initial implementation of a progress bar for the
loading of data as the application starts.

The following are notable changes;

* Removed some previously attempted 'functional style' logic in the
  model which didn't fit well with C++
* Use of the base-url in the logical mapping from HDS and HD data is no
  longer required and has been removed
* Some logging has been improved making it clearer which part of HD
  is producing the logging which in turn helps with debugging issues
* List class has been modified to more cleanly support sorted lists
  and binary searches; tests have also be updated accordingly
* Reorganise and tidy-up of the data-loading processes' structures
* The local repository update (HPKR) and data-load occur in background
  processes now in the same system as the HDS data-load - this has been
  crudely shifted from the MainWindow to new Processes and incorporated
  into the background processing system
* The 'state-machine' background process runner is now replaced with a
  'coordinator' style approach that can more easily handle the new
  processes related to HPKR loading.
* Progress for loading processes is shown in the main window in the
  WorkStatusView - this is flickering a bit, but basically works
* Added some documentation regarding how Processes work in the system
* The "Refresh Repositories" menu item now also updates data from HDS
* The "Refresh Repositories" menu item is disabled when the background
  processes are running that update the repository data

Some further refinement would be good, but this change is large enough
for one round of improvements.  There is an issue that the status bar
is used for screenshot display as well as this data-loading, but that
was the case before so it is something that can be dealt with later if
it is a problem.

Change-Id: I7668307645e3aabaf7e4a6e37e2cca80cc0f489e
Reviewed-on: https://review.haiku-os.org/770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-17 19:31:25 +00:00
Owen
1609bb2f67 Mail: Fix infinite loop in FindURL.
Fixes #14746.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
One minor change from owenca's original patch: we can't return
immediately if urlString is NULL, as the caller probably wants
the urlLength.
2018-12-17 13:45:33 -05:00
Jérôme Duval
d0111efead runtime_loader: Add missing locking around resizing the TLS DTV.
* Fixes crashes when the DTV is concurrently resized by multiple threads.
* Fixes JVM crash or endless loop when building OpenJDK.
* Should help with #13154, #14129, #14304, #14342.

Change-Id: I132600315d76a1a86236c6c70db09a3cdf0a8743
Reviewed-on: https://review.haiku-os.org/771
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-12-17 18:20:45 +00:00
Augustin Cavalier
6109c51d55 idualwifi7260: Add another NULL check before memset. 2018-12-16 22:51:49 -05:00
Augustin Cavalier
a07f133e5b KPath: Prevent setting a KPath to itself causing use-after-free.
SetTo frees the buffer before setting it to the new one,
but if KPath sets itself to ... itself, then it will of course
try to access the buffer again.

Spotted by clang-analyzer (amidst quite a few false positives,
so this doesn't seem like an especially good rabbit hole
to go down right now.)
2018-12-16 22:29:29 -05:00
Augustin Cavalier
a41ed241d9 headers/compatibility: Re-add missed _BSD_SOURCE guards to vis.h 2018-12-16 21:01:03 -05:00
Augustin Cavalier
514bace91d keymap: Allocate BApplication on the heap.
Avoids triggering an assert at program exit.
2018-12-16 19:35:04 -05:00