The width of the status messages should not depend on the width of the
logo. Reserve about 30 characters no matter which logo is used (this is
slightly larger than it used to be).
Fixes#15679.
Now that the names are visible in Input preferences, let's try to have
better ones
Change-Id: Ia67e57c449e0ad292ce573b50a1e533d84c90d68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2209
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Delete/free as appropriate
Most cases involve not freeing memory after encountering error or
unexpected situation (identified via cppcheck static analysis)
Change-Id: I90ba2fca518b00d2dfa9ec1ddbcebe1920a34b7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1038
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
I did some tcpdump recording, and I believe we confuse the receiver
with our Zero Window Probe, because we don't resent even though it only
ACKs the previous segment, and we keep sending things after it:
* we send the last segment before window is closed, next seg = N,
* we get ACK for N, with window=0
* we send Zero Window Probe with 1 byte, next seg = N+1,
* we eventually get a window>0 ACK still at N,
* we start sending stuff again, but starting from N+1,
* receiver keeps ACKing N because it never accepted it.
It seems sending either 1 or 0 byte is valid for a ZWP, although I'm not
entirely sure. At least it's easier to handle 0 than 1, and it seems to work.
Wireshark shows them as duplicate ACKs, but they get the thing going.
References:
* RFC 793: https://tools.ietf.org/html/rfc793#section-3.7
* RFC 6429: https://tools.ietf.org/html/rfc6429
* Wireshark wiki: https://www.wireshark.org/docs/wsug_html_chunked/ChAdvTCPAnalysis.html
Should fix#13769.
Change-Id: I95264ebbbb8c66c23411dfce6fc41871e0427166
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1188
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Check 'name' pointer against NULL before using it.
Change-Id: I8b40ee28a12210d1989cc717ecb67d6e1c0a1544
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2205
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Check 'mq' pointer against NULL before using it.
Change-Id: I785940616c9ec9c0c168975388a728e88b36d1d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2204
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Check 'in' pointer against NULL before using it.
Change-Id: I4d7605df168b6e4f8a2ae61ff942ce1a8ba78321
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2203
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- Fix USB_hid_page_consumer.h: some values are skipped in the spec so
our defines were off
- Handle the horizontal wheel on my mouse which is declared as a
CON_AC_PAN, but otherwise works just like the vertical wheel
- Input server and interface kit already handle the events properly
(they were available for serial mice already).
Change-Id: Ie0080ebb27e9478bcfe9f9dc5fd2a936ae05a848
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2201
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Other request types exists such as BFileRequest.
Fixes#15675.
Change-Id: Ib2e07fad4dd9f682d2b9fc0cdbf0ca60ecd3adfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2200
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: François Revol <revol@free.fr>
After this patch "UnitTester BFile" runs with no failures.
This includes some changes to NodeTest as well since the BFile suite
inherits some tests from it, but "UnitTester BNode" doesn't pass yet.
FileTest:
* Fix format strings in log messages to use the correct types and
quite warnings.
* Test for expected behavior with BFile(..., B_READ_ONLY | B_ERASE_FILE)
There is a table in the BFile tests which is used as input for a
series of tests which construct BFile objects with various
permutations of the mode parameter.
For two of these, the combination of B_ERASE_FILE and B_READ_ONLY
are used for the file mode. The system rejects these with the error
B_NOT_ALLOWED. This is enforced in bfs_open(), which looks for that
particular combination (O_RDONLY | O_TRUNC).
I tested this on BeOS R5 and it will indeed let you create a
BFile(path, B_READ_ONLY | B_ERASE_FILE) which basically replaces the
file at path with an empty file.
The Haiku behavior seems way more sensible, so I'm changing these
tests to match its current behavior.
* BFile(..., B_READ_ONLY).SetSize() isn't allowed.
BeOS R5 allowed you create a BFile with the B_READ_ONLY flag and
then successfully set the size of the file with
BFile::SetSize(). Haiku doesn't, and that seems way better. Updating
BFileTest::SizeTest to match Haiku behavior.
One whole sub-test was removed from FileTest::SizeTest because it
calls SetSize() on a `B_READ_ONLY | B_ERASE_FILE` BFile. This is
redundant as other tests in this suite already verify that it is not
possible to construct a BFile with that combination of flags.
NodeTest:
* Fix tests to match Haiku's max attribute length.
Many of these tests assume that the max size of an attribute name is
255 bytes, and it was in BeOS R5, which I just confirmed.
But Haiku allows 256 bytes. In 4069e1f30 some compromise was struck
that allowed this to avoid breaking userspace which had been allowed
to use 256 byte keys at some point.
* WriteAttr, ReadAttr and RemoveAttr all return B_NAME_TOO_LONG if an
attribute name longer than 256 bytes (excluding null terminator) are
provided.
* Disable NodeTest::AttrRenameTest since attr rename is not supported
Tests in BNodeTest (inherited by BFile tests) exercize
BNode::RenameAttr(), but from what I can see attribute renaming is
not implemented at all. bfs_rename_attr() has a TODO comment and
just always returns EOPNOTSUPP (B_NOT_SUPPORTED). And that is the
value returned from BNode::RenameAttr() in these tests.
So for now I made these tests just check that B_NOT_SUPPORTED is
returned from BNode::RenameAttr(), so when this functionality is
implemented these tests will fail and can be cleaned up.
Change-Id: I6cfe90ca45f3a8afa709edc9b85e648fdc865e82
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2182
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Sadly the NetBSD elf2aout only support 32bit, and this one from FreeBSD
only supports 64bit. This one was simpler to fix because it only handles
basic stuff.
Change-Id: I70165f680ec1cd95c156d4116f9d96c6b4ac53b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2206
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
In a menu, we use the right side both for submenu arrows and shortcuts.
As a result, when an entry has both a shortcut and a submenu, its
shortcut is not aligned with others, and this does not look so nice.
The spacing for the arrow appears only if there is a submenu in any of
the items in the parent menu.
Change-Id: If91fdcdad36abb0141fb05d1f59141f89540c1db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/355
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
Activate auto-raise on the screen edge inside the Deskbar window
frame. Set the event mask to B_POINTER_EVENTS when auto-raise or
auto-hide is on and set the event mask back to 0 when we turn off
auto-raise and auto-hide. Before this change you had to click a
window twice to get it to rise above of a raised Deskbar, with
this change you only have to click once to make the window rise
above Deskbar.
The auto-hide show and hide bounds are unchanged.
There was another bug where the window was not hiding correctly in
auto-hide mode when you moused over the status bar in horizontal
mode. This was happening because the where parameter of
TBarView::MouseMoved and TBarView::MouseDown was yielding
coordinates relative to the status tray when the mouse was over
the status tray and not the current view meaning that
TBarView::Frame().Contains(where) would return false over the
status tray. Inspecting the where parameter showed that the x-
coordinate was reset back to 0 when you mouse over the status tray.
To fix this issue I pulled the screen_where field out of
CurrentMessage() instead since this yields the correct value.
The calendar window input focus has been fixed in auto-raise mode
so that you can click on calendar even when it is above Deskbar.
You may also click a window on top of Deskbar in auto-raise mode
without the Deskbar window being raised.
Don't hide Deskbar when Calendar is showing in auto-hide mode.
Put comment inside else block inside { }.
Return from TBarView::MouseDown() calling ansestor method.
Quit fCalendarWindow on TimeView deconstructor if it exists (even if
it is not curently being shown.)
Fixes#8923#14493
Change-Id: I7ed67fdbc30a93d2782b3ab6b6738b86ec5e4043
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1966
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This should give more meaningful errors in pkgman
(not so sure, feel free to tweak the mapping),
and also avoid running the next job if fetching failed.
Change-Id: If76968f705ff25f7ecf1a5f91d88a02040d24665
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2186
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
SSL_AUTO_RETRY does not cover this case (it only covers SSL errors, not
underlying socket ones), so we still need to retry reads manually here.
Fixes#14638.
- Clarify why building jam is not needed on Haiku
- Put the 64bit instuctions first, as they apply to both Haiku and other
platforms and are the way to go for people discovering Haiku, usually
(only oldtimers will care about BeOS compatibility)
- Remove the "from non-haiku platforms" from 64bit instructions because
they work just fine on Haiku as well
Changeset 835e7239d added some additional tests for HaikuDepot, but
ValidationUtilsTest::AddTest references a test method which doesn't
exist.
I think the intention was to have TestEmailInvalid defined, but it was
split into more granular tests like TestEmailInvalidNoDomain,
etc. Just removing this undefined test from the suite.
Change-Id: I858233df29657d07d78ad1784691572e65a26045
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2183
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
These changes cover a rework of the login and
account creation logic before making additional
changes related to the user usage conditions.
Relates to #15209
Change-Id: I90b7dbcee5b0285476938c6ced0afc89483d6227
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2023
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
For non-official builds, Installer had no logo. This led to a window
sizing bug which is not seen in the official builds (both nightlies and
releases) as they both use the Haiku logo there.
Use Walter as a placeholder logo in that case. The png is generated from
the wonderbrush file in the separate artwork repo.
Change-Id: Iea361d7ac0fd2bdb147318632ff198c86c4b89c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2180
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... docs to make it clear which methods work synchronously and which work
asynchronously. A small number of related edits are included as well as a
couple of pedantic whitespace changes. Clarify sync vs. async reply
handling better in BMessenger class description. Add The to make sentences.
Change-Id: I3069934fc5e82dda25331e85884d6d0c0c100dfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2178
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This fixes a KDL that is triggered by the following scenario.
1. A socket is created, attempting to establish a session
between (loopback, ephemeral port) => (remote address, remote
port).
2. That socket ends up in the closed state because the remote is not
accepting connections.
3. The socket is re-used to connect to a different (remote address,
remote port).
The problem is that fConnectionHash is a BOpenHashTable<TCPEndpoint>,
and inserting endpoint multiple times can create a linked list
cycle (TCPEndpoint is an intrusive linked list node). That means that,
even though TCPEndpoint's destructor removes itself from
fConnectionHash, there will still be a pointer to it left behind,
which means that future accesses within that hash table bucket will
result in a segfault.
The added fConnectionHash.Remove(endpoint) here prevents the KDL, as
it ensures that socket reuse doesn't result in a cycle.
Fixes#13927, see that ticket for a detailed explanation of the
problem.
Also added some regression tests:
* Added SocketTests::ClientSocketReuseTest to PosixNetTest, which
reproduces this KDL.
* BOpenHashTable: Added tests to cover RemoveUnchecked and removal
of an object that isn't in the table.
Change-Id: If4bcc1e0d94350a5ad9ba8e7ae6f1b783b3f6d34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2173
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>