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>
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>
* 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>
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>
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>
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>
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>
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.
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...
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>
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>
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.
* 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>
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.)
When double-clicking a result in TextSearch, it opens the file with
the preferred application for that file type. In case you search
through e.g. a HTML file, that would be most probably WebPositive,
which is not what you want normally.
TextSearch has the setting "Open files in Pe" which forces all files
to be opened in the Pe editor.
With this change, it will force the files to be opened in the
preferred app for text/x-source-code.
Change-Id: I0920a5f2497c01b16be0ac7563fbab942b67ef24
Reviewed-on: https://review.haiku-os.org/769
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- USB pen drive seems to still work. More extensive testing welcome.
- USB floppies don't work yet, but they don't work anymore with the
current driver, either. I'm still investigating that part.
Fixes#9276
Change-Id: I8aa5ab828ad2ad867d0c187062d6e179372fc2ad
Reviewed-on: https://review.haiku-os.org/747
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This patch should fix:
- deadlocks while manual syncing/shutdown;
- crashes while manual syncing/shutdown.
Change-Id: I0962ff5580c19cbf740d002b6f62681ed5f558ab
Reviewed-on: https://review.haiku-os.org/758
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
When the FD is put() but not freed while O_DISCONNECTED, its "ops"
and "vnode" are cleared. Thus it is entirely valid for a non-NULL
file FD to have a NULL vnode, so we should just treat such FDs
as if the locks had already been cleared (which they should have.)
Fixes#14294.
Since these do not go through get_fd, which would check for them,
we need to do these checks manually in the relevant locations.
Some of these changes were broken out from axeld's original commit,
and some were found by my own auditing.
axeld's solution from 2015 worked in that it solved the panics and
problems with leaking FDs ... but only if nobody actually tried to
use the FDs again. As you can see in the diff of the previous commit,
in allowing closed FDs (which have NULL "ops") to be returned by get_fd,
all consumers of the get_fd API (so, pretty much most functions in
vfs.cpp and fd.cpp) have to check *both* that (1) the fd is not NULL,
and (2) the fd does not have O_DISCONNECT set.
Besides missing a large majority of consumers of get_fd (which caused
ticket #14532 and also the first half of ticket #14756, probably among
others, as I haven't reviewed all NULL-dereference-in-VFS tickets yet)
this solution missed the fact that calling get_fd increments the reference
count, but then exiting the exact same way as if the FD was NULL
(without putting it) when it is disconnected *also* leaks the FD.
As it turns out, a not insignificant number of applications try
to do this, which (depending on whether you went through one of the
'lucky' functions axeld's commit touched) either (1) leaked the FD,
or (2) caused a kernel panic.
Now, we could go through and add O_DISCONNECT checks to every single
consumer of get_fd followed by put_fd to get the proper behavior ...
but that would be the same thing as just returning NULL here and not
incrementing the reference count.
So it seems the first part of axeld's solution (don't set open_count
or ref_count to -1 but leave them as-is) is the only change necessary.
A few places where there were legitimately missing O_DISCONNECT checks
(some originally added by axeld) are (re-)added in the next commit.
Otherwise this seems to be the more robust solution. (But I wonder why
nobody caught this in the code review axeld asked for in the commit
and the ticket back in 2015? Did nobody notice the unbalanced get/put?)
Fixes#14532, part of #14756, and probably any other NULL dereferences
in VFS I/O functions (XHCI is especially good at exposing these)
that are lingering around on the bugtracker.
* Added subsampling. This makes the render look less noisy and generally nicer.
Change-Id: I1dd667c8799bd97fb84e1401976da12ecf74ea8c
Reviewed-on: https://review.haiku-os.org/732
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As axeld pointed out on the mailing list, map_backing_store is called
with the address space write-locked, and so the resources won't be
released until after we return.
Due to the state we are in at this point, unlocking the address space
before making this call would be likely be very dangerous, and so
simply issuing the notification and then returning an error is all
we can safely do here.
Fix using local variable within a loop with a same name
as a variable controlling this loop.
Change-Id: Ie920807a56e51b32844ac13ff1d8c564466d3a83
Reviewed-on: https://review.haiku-os.org/751
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The altcodepatch mechanism needs to overwrite parts of the kernel
image. This can't be done by setting it to RW-only and not RWX,
as we are already running within the kernel when this occurs,
and so instruction fetches can and will occur between the points
of +W and -W.
As gKernelStartup is turned off before the scheduler is started,
this is not much of a lifted restriction, as no modules are loaded,
no secondary threads started, etc.
Fixes#14751.
This file is included, directly or indirectly, by most of the
kernel-space C++ code, and so importing the entirety of "std"
seriously pollutes the global namespace.
So instead, just import "std::nothrow", which is the only thing
we really want in the global namespace. Tested on both GCC2
and GCC7 and seems to work just fine.
While I'm here, also update the include guards and copyright
header to match the standard format used elsewhere.
The layout is unchanged for writing an email.
Changes when reading an email:
* decrease vertical spacing between rows
* move "To" to the right of "From" in the first row
* move "CC" to the right of "Date" in the second row
* move "Subject" down to the last, 3rd row
"CC" still only shows when it contains data.
This is a comparison of the old (left) and new (right) layout:
https://linx.li/new-mail.png
TODO:
It would be nice if the "To" and "CC" were right-aligned.
Change-Id: I89c758bc16af03838e6e3206b2983f451f6044b2
Reviewed-on: https://review.haiku-os.org/753
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fix sizeof() parameter since sizeof(buffer - 1) returns size of pointer,
not size of array. Pointed out by clang.
Change-Id: Ib0be8a9de65c24a787e5817ea70a1cfc1c14b18f
Reviewed-on: https://review.haiku-os.org/743
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The driver optionally can load new firmware onto the device, but
we don't currently ship it. But because it tries to use it means
the symbols get linked in, and so on debug builds it failed to link
since these macros weren't there.
I need this to use loopers in WebKit, which spawns threads and expects
to be able to turn them into event loops later on.
This is the pattern already used in BApplication, we may as well make it
available elsewhere.
Change-Id: I5939ca89d33cb3bcc92567b302c2038d976af598
Reviewed-on: https://review.haiku-os.org/735
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
after the last argument, get_next_argument() would call get_next_argument_gcc3(),
see a failure, then call get_next_argument_gcc2(). Ideally we could make
different cookies for gcc2 and gcc3+ demanglers, thus avoiding this issue.
Change-Id: I3904e008a0b6ba627940fb9bca1d44ddbafbcbd0
Reviewed-on: https://review.haiku-os.org/742
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Use BStackOrHeapArray instead of using auto_ptr to array.
Change-Id: I171cb002829c36ec51ba7d1e387869263e2a40f2
Reviewed-on: https://review.haiku-os.org/745
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* We try to conform to what ffmpeg does, it is
unuseful to support metadata keys formats which
aren't really used anywhere.
* Add TODO with some infos for future improvements.
* Namespaces protect symbols, I didn't consider that when adding
the BCodecKit namespace, so, the AddOnManager complained that
instantiate_plugin() was missing. A macro is introduced that allow
plugins to specify it's className, version and name, this ease
the declaration of the plugin symbols, otherwise the function
should have been declared inside the BCodecKit namespace which
we would like to avoid.
* The code is also more future proof, since in future the AddOn manager
can begin to check for plugin versions.
Fix 'true / false' value is implicitly cast to the integer type.
Change-Id: I2f72fcd34d2d97d20e2a98ed5efe25919a485c9d
Reviewed-on: https://review.haiku-os.org/739
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Application is now much more stable and less likely to crash
* Almost all communication to render threads is done through semaphores.
Change-Id: I7858cdb4a2b83ef4bfe44588cebef01bd3304346
Reviewed-on: https://review.haiku-os.org/730
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Re-add the space between currently downloaded package and number
of packages to be downloaded in status view.
I accidentally removed that in hrev52432.
* Move to BCodecKit namespace and make extensive use
of BCodecRoster.
* This is a first step in the right direction of
decreasing private dependencies. Some APIs are being
translated to the CodecKit. I am doing an investigation
on which APIs are really used among apps, so that the new
kit can be more slim and oriented toward easy development
and can be extended in the right direction instead to
continue maintaning unuseful code.
* BMediaFormats needs still a bit of love.
* General improvements in style and code maintainability.
Properly speaking, this is part of POSIX and not of the Be-style
"kits", and so it should live in system/ alongside libroot.
No functional change intended.
Change-Id: I0fcf78a09c76e220ad4f1719d147978ef4a3bc52
Reviewed-on: https://review.haiku-os.org/726
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This allows Clang builds (linked with our cross binutils) to
at least start runtime_loader and then try to load launch_daemon.
That fails with an infinite loop somewhere...
This doesn't fully work yet (the FS code in libroot_build
needs to be adapted, as some of the symlink-related calls
are not available on MinGW), but it gets much further than
the "Cygwin" target did.
These have been broken for a long time. Some Cygwin changes that
are relevant on MinGW are kept here, but users on Windows who
want to build Haiku should probably use WSL at this point.
However, now that we are using relative paths and don't need
to worry about drive path kludges, it's actually possible to
get some host tools built on MinGW. Changes for that coming.
When reading stream from closed (by server) TCP socket throw StreamException (not ParseException).
This fixes forever loop in Protocol::HandleResponse on server disconnect.
This patch fixes#14710
Change-Id: I29e9830b360cb56cb1ef037c0378d64422075c4d
Reviewed-on: https://review.haiku-os.org/724
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Clang doesn't support -maccumulate-outgoing-args, -nostartfiles
is not needed in LDFLAGS (and lld doesn't know about it anyway),
and Clang uses .dynstr so we need to copy it also.
* Use string keys. I am still convinced we need BValue.
* Use boolean instead of status_t in return, this is
much more handy in pratical use given that there's no
really a status to check.
On my VMware Player installation, the device ID is "1977", but presumably
VMware will have only one HDA codebase, and so we just enable the fix on
all devices.
This fixes initialization of the HDA driver on VMware, and means that
it is now possible to get sound output on VMware without using the
OpenSound driver package.
Waiting of worker threads in IMAPProtocol destructor introducred new deadlocks.
For example: fWorkerLock grabbed in destructor leads to deadlock with
CheckSubscribedFoldersCommand (which grabs this lock with flock grabbed).
So, currently it should be reverted.
Change-Id: Ibc4b4f85300352e045d4ce72deb804e0e613f25c
Reviewed-on: https://review.haiku-os.org/714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* 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.
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>
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.)
* 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>
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>
- 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.
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.
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.
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.
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.
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>
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.)
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.
* 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>
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>
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>
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>
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>
* 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>
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>
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?).
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.
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>
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.
As the TODO said, we now have good userland debugging facilities, so
this isn't needed (and has been if 0'd out for almost a decade now.)
The dprintf on page faults may still be useful under rare circumstances,
but we already have a "TRACE_FAULTS" configuration for this file,
so guard it behind that.
Fixes part of #14360.
Mixing new and old style decoding APIs won't work. And we were still
using the old API for managing the end of videos.
Change-Id: Ic194ab98721455658ecefde4f951c3f1e43ae1be
Reviewed-on: https://review.haiku-os.org/679
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This fixes some crashes.
In _Worker thread on connect or process errors fOwner.WorkerQuit(this) was not called, leaving destroyed thread object in fWorkerMap and fWorkers.
Moreover, on connection problem the imap mailboxes was never checked on next planned sync because of non empty fWorkers.
Change-Id: I55ce6474b655fad5ddd8024225fc8f633bc35c48
Reviewed-on: https://review.haiku-os.org/678
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>