Commit Graph
847 Commits
Author SHA1 Message Date
link2xt fd7cc83537 Merge tag 'v1.112.4'
Release 1.112.4
2023-03-31 01:13:56 +00:00
link2xt f24843fbb1 Release 1.112.4 2023-03-31 01:12:26 +00:00
link2xt 0073a09da6 Merge v1.112.3 2023-03-30 20:37:43 +00:00
link2xt aff951440c Release 1.112.3 2023-03-30 20:32:49 +00:00
link2xt 68635be8a2 Merge v1.112.2 into master 2023-03-30 15:42:27 +00:00
link2xt d6fdc7cb67 Release 1.112.2 2023-03-30 14:57:32 +00:00
Floris Bruynooghe 82ace72527 ref(logging): Remove message from LogExt::log_err (#4235)
This removes the message that needed to be supplied to LogExt::log_err
calls.  This was from a time before we adopted anyhow and now we are
better off using anyhow::Context::context for the message: it is more
consistent, composes better and is less custom.

The benefit of the composition can be seen in the FFI calls which need
to both log the error as well as return it to the caller via
the set_last_error mechanism.

It also removes the LogExt::ok_or_log_msg funcion for the same reason,
the message is obsoleted by anyhow's context.
2023-03-30 10:13:07 +02:00
Floris Bruynooghe 943c8a1ab3 feat(imex): Cancel BackupProvider when dropped (#4242)
This ensures that the BackupProvider will be stopped as soon as the
struct is dropped and the imex progress error event is emitted.  This
makes it easier to use and also makes sure that the ffi call
dc_backup_provider_unref() does not lead to dangling resources.
2023-03-29 14:51:08 +02:00
link2xt edf0c02bc8 Release 1.112.1 2023-03-27 15:22:31 +00:00
link2xt 1d42907114 deltachat-ffi: document thread safety guarantees 2023-03-27 14:47:40 +00:00
bjoern 070d832580 check against null in dc_backup_provider_unref() (#4232)
this is what we're doing in most comparable unref() functions.
2023-03-26 19:25:23 +02:00
link2xt 124a0e90e1 Release 1.112.0 2023-03-23 13:34:24 +00:00
Floris Bruynooghe 1716cdf51c ref(ffi): dc_receive_backup should block (#4211)
The documentation says this blocks.  This should block because it also
means the error reporting is more accurate by calling set_last_error
just before returning.
2023-03-23 14:15:34 +01:00
link2xt f033aae25c Move most of the dc_receive_backup() into a safe function 2023-03-23 08:47:58 +00:00
Floris Bruynooghe c42d942460 explicitly move for good measure 2023-03-23 08:47:58 +00:00
Floris Bruynooghe 0ba8201797 fix(dc_receive_backup): Increase refcount before spawn
Otherwise it is possible for the context that is used in the spawn to
be unreferenced.  Really this should be caught by the borrow checker
that ensures we only spawn things with a 'static lifetime, but we're
handling raw pointers so it doesn't.
2023-03-23 08:47:49 +00:00
link2xt 238570a7b9 deltachat-ffi: update rand to 0.8.5 2023-03-22 23:37:01 +00:00
link2xt 5db867cd1b Add IMAP_INBOX_IDLE event 2023-03-22 20:20:37 +00:00
B. Petersen ec00c160c6 add missing define 2023-03-22 20:54:52 +01:00
Floris Bruynooghe 9c15cd5c8f Explicitly call Context::set_last_error in ffi (#4195)
This adds a result extension trait to explicitly set the last error,
which *should* be the default for the FFI.  Currently not touching all
APIs since that's potentially disruptive and we're close to a release.

The logging story is messy, as described in the doc comment.  We
should further clean this up and tidy up these APIs so it's more
obvious to people how to do the right thing.
2023-03-21 13:37:25 +01:00
Floris Bruynooghe 35f50a8965 feat: Pause IO for BackupProvider (#4182)
This makes the BackupProvider automatically invoke pause-io while it
is needed.

It needed to make the guard independent from the Context lifetime to
make this work.  Which is a bit sad.
2023-03-20 19:57:17 +01:00
link2xt 0c02886005 Update human-panic, but disable color
Avoid pulling in new `anstream` dependency
2023-03-19 19:10:25 +00:00
B. Petersen 3a861d2f84 some doxygen fixes 2023-03-19 15:24:51 +01:00
link2xt 71bb89fac1 Merge remote-tracking branch 'origin/master' into flub/send-backup 2023-03-19 11:10:07 +00:00
Floris Bruynooghe 32a7e5ed82 Remove requirement for stopping io for imex 2023-03-19 09:36:03 +00:00
dignifiedquire 3701936129 Merge remote-tracking branch 'origin/master' into flub/send-backup 2023-03-16 17:50:00 +01:00
link2xt 8d80aea5c8 Reduce the scope of unsafe blocks in FFI
Spawn tasks from safe functions to ensure there is no use-after-free.
2023-03-13 16:17:40 +00:00
link2xt 0afd3d595f Fix potential use-after-free in dc_jsonrpc_request() 2023-03-13 16:17:40 +00:00
link2xt 474faefca8 Increase dc_context_t reference count during dc_imex() 2023-03-13 16:17:40 +00:00
link2xt 30fef395b4 Increase dc_context_t reference count during dc_configure()
This fixes use-after-free in case dc_context_unref() is called
while the background process spawned by dc_configure() is still
running.

Corresponding regression test in Python can be run with
`pytest tests/test_1_online.py::test_configure_unref`.
2023-03-13 16:17:40 +00:00
link2xt 4411b883d7 Remove doxygen-dark-theme 2023-03-11 22:15:09 +00:00
B. Petersen 7d3fcd9a3c restore original Doxygen contrasts
the contrast was decreased at
https://github.com/deltachat/deltachat-core-rust/pull/4136 ,
there were also suggestions to fix it there,
but it was probably just forgotten :)

this pr increases the contrast
between code background and code font again to the level it was before
and also to what similar themes are doing.
2023-03-11 19:09:21 +01:00
Floris Bruynooghe 02afacf989 clarify docs 2023-03-09 16:12:33 +01:00
link2xt 9e03f26992 deltachat-ffi: print causes for all errors 2023-03-09 11:36:14 +00:00
Sebastian Klähn db28c1bdc4 Update doxygen for cffi docs (#4136)
fix styling
2023-03-08 21:35:15 +01:00
Floris Bruynooghe c9b8c5079b wording 2023-03-07 15:45:18 +01:00
Floris Bruynooghe eec5ae96e8 Update docs and fix string allocation
The docs say you should always unref the string and NULL is never
returned.  The implementation should follow that.
2023-03-07 15:36:33 +01:00
Floris Bruynooghe 4b94eadf5e typo 2023-03-07 14:40:51 +01:00
Floris Bruynooghe 52a1886937 naming conventions!
they're hard
2023-03-07 14:40:01 +01:00
Floris Bruynooghe 9767f51c3d update .h file too 2023-03-07 14:13:42 +01:00
Floris Bruynooghe 6674b888cc Merge branch 'master' into flub/send-backup 2023-03-07 12:52:45 +01:00
Floris Bruynooghe a5e6bd3e8e Do not require context for non-context methods
This follows the ffi style better.
2023-03-07 12:49:42 +01:00
Floris BruynoogheandHocuri b6c24932a7 Apply typos from code review
Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-07 12:23:30 +01:00
link2xt e39011a43b Release 1.111.0 2023-03-05 13:26:22 +00:00
link2xt 3df5e6e9d3 Use "dep:" syntax to avoid creating dependency features
It is supported since Rust 1.60
2023-03-04 10:24:16 +00:00
link2xt 7e5a8714a0 Add scripts/codespell.sh and spellcheck 2023-03-03 18:40:36 +00:00
Floris Bruynooghe c5408e0561 Merge branch 'master' into flub/send-backup 2023-03-03 09:48:33 +01:00
Floris Bruynooghe f5c334a1e4 ci: Make sure clippy script check everything
Also disable missing_docs_in_private_items as this is like 300+ errors
currently.
2023-03-02 21:33:20 +01:00
Floris Bruynooghe e3014a349c Merge branch 'master' into flub/send-backup 2023-03-02 11:35:17 +01:00
Floris Bruynooghe 2d20812652 some typos 2023-03-02 09:39:50 +01:00