holger krekel
8009f220fc
hold smtp lock during the full send action
2019-08-14 01:50:15 +02:00
dignifiedquire
6ba37a135e
fix(imap): reduce lock contention around session and config locks
...
Hopefully closes #331
2019-08-14 01:50:15 +02:00
dignifiedquire
dab514d8bc
feat: switch to simpler email address parsing
...
This stops the psl insanity and matches more closely what the c-core did
Closes #325
2019-08-14 01:48:41 +02:00
Dmitry Bogatov
8342b29618
Fix some clippy warnings
2019-08-14 01:45:39 +02:00
B. Petersen
e05944c6cb
simplify progress! macro
2019-08-14 01:33:57 +02:00
Alexander Krotov
88a81f5737
Return Vec from get_all_blocked
...
And never return nullptr from dc_get_blocked_contacts.
2019-08-13 23:56:17 +02:00
B. Petersen
9cf6ca045c
send CONFIGURE_PROGRESS(0) on failure and only on failure
2019-08-13 23:55:56 +02:00
holger krekel
ba381d0d0b
fix failing array asserts #355
2019-08-13 23:07:38 +02:00
Friedel Ziegelmayer
033ebc7ce3
Setup clippy ( #349 )
...
Setup clippy
2019-08-13 22:37:16 +02:00
holger krekel
6292219551
fix bug that lead to all liveconfig tests failing
2019-08-13 22:34:27 +02:00
Friedel Ziegelmayer
ed237c8d25
refactor(receive_imf): first pass at some more sanity
2019-08-13 17:58:32 +02:00
Alexander Krotov
d46a5345d2
Use Vec instead of dc_array_t in search_chat_ids_by_contact_ids
2019-08-13 17:54:28 +02:00
dignifiedquire
523141597e
chore: remove no longer needed features
2019-08-13 12:20:53 +02:00
dignifiedquire
cfed5c914c
chore: update rust nightly version
2019-08-13 12:20:53 +02:00
dignifiedquire
20f9bb3b14
chore: setup clippy
2019-08-13 12:20:53 +02:00
Friedel Ziegelmayer
6067160582
Implement procedural macro to derive {To,From}Sql traits ( #322 )
...
Implement procedural macro to derive {To,From}Sql traits
2019-08-13 12:16:24 +02:00
Alexander Krotov
3175c4f7ba
Merge pull request #333 from link2xt/dc_array-assert
...
dc_array: panic on null pointers and out of range indexes
2019-08-13 12:53:46 +03:00
Simon Laux
a29f06a730
cargo fmt
2019-08-13 10:45:27 +02:00
Simon Laux
c713474d1f
remove lot magic
2019-08-13 10:45:27 +02:00
Simon Laux
89c874d4a9
remove message magic
...
there is still a reference to C #[repr(C)] so I'm not sure at this
2019-08-13 10:45:27 +02:00
Simon Laux
5e3cba9b70
remove chat magic
2019-08-13 10:45:27 +02:00
Dmitry Bogatov
a7894fd785
cargo fmt
2019-08-13 10:11:17 +02:00
Dmitry Bogatov
c638a770f9
Remove redundant check
...
Condition '!imffields.is_null()' is always true, since it is contained in conditional
if !(in_out_message.is_null() || imffields.is_null()) {
which is equivalent to
if !in_out_message.is_null() && !imffields.is_null() {
2019-08-13 10:11:17 +02:00
Simon Laux
6ced6ac23b
macro for progress event like in C core
2019-08-13 10:07:13 +02:00
Simon Laux
d0b77b61eb
cargo fmt
2019-08-13 10:07:13 +02:00
Simon Laux
b440c3636b
replace gotos with ok_to_continue
2019-08-13 10:07:13 +02:00
Floris Bruynooghe
dfd58961f7
Safe load_or_generate_self_public_key
...
The function is made safe and now returns Result. Functionally it now
fails when it can not write the newly generated key to the database
whereas before it still returned the key but logged a warning. There
is no reason this shouldn't be able to store the key and silently not
storing the key may result in later operations assuming the key is
available, so failing seems like a better choice.
The function now also uses a proper mutex to guard against multiple
threads generating keys. And this mutex is Context-scoped rather than
fully global (static).
2019-08-13 10:04:38 +02:00
Jikstra
139c9f37b1
Merge pull request #339 from deltachat/rm_goto_dc_job
...
rm GOTO: dc job
2019-08-13 02:10:08 +02:00
Alexander Krotov
4d402f3a06
dc_array: panic on null pointers and out of range indexes
2019-08-13 03:07:13 +03:00
Alexander Krotov
fb7bbac524
Return Vec from dc_get_chat_contacts
2019-08-13 02:37:18 +03:00
Alexander Krotov
6c95d008e0
Implement From<Vec<u32>> for dc_array_t and use it instead of new()
2019-08-13 01:40:47 +03:00
Simon Laux
9e30df4b43
cargo fmt
2019-08-12 05:42:02 +02:00
Simon Laux
50c592e41f
convert current_block to goto and remove UDC*
...
*Unreachable Duplicated Code (I made that shortcut up)
2019-08-12 05:41:24 +02:00
Jikstra
ce3b815bd8
Merge pull request #319 from deltachat/fix_utf8_text_msg_load_from_db
...
Fix having a msg object without a text in it because of invalid utf8
2019-08-12 01:16:23 +02:00
jikstra
a3683be047
cargo fmt
2019-08-11 18:55:23 +02:00
Jikstra
9dca19d6c9
Merge pull request #302 from deltachat/rm_goto_dc_imex
...
Remove goto in dc imex
2019-08-11 18:52:17 +02:00
jikstra
3ba847ece2
Apply requested changes
2019-08-11 16:57:49 +02:00
Simon Laux
91bf948d1e
chat magic to const
2019-08-11 10:45:17 +02:00
Simon Laux
91fec77f4b
fix msg info: message-id
2019-08-11 09:05:56 +02:00
Simon Laux
8fb25a6340
Cargo fmt: removed two empty llines
2019-08-11 09:04:47 +02:00
Simon Laux
cf49acff67
part 2
2019-08-11 02:07:51 +02:00
Simon Laux
4f1a25e1bf
cargo fmt
2019-08-11 02:07:51 +02:00
Simon Laux
8608daa7dc
remove goto
2019-08-11 02:07:51 +02:00
Alexander Krotov
ff021fed1f
dc_tools: rustify interfaces of file-related functions
2019-08-10 21:15:48 +03:00
Dmitry Bogatov
ed66f36cb5
Implement procedural macro to derive {To,From}Sql traits
...
With this macro it is possible to #[derive(ToSql, FromSql)] for enums, that do
not contain data (C-style).
2019-08-10 17:52:48 +00:00
jikstra
b7ff996b15
Cargo fmt + refactoring
2019-08-10 17:57:53 +02:00
jikstra
faf53fe11e
Manually get a lossy utf8 string from the database if other fails
2019-08-10 17:53:05 +02:00
jikstra
b23c4b4da6
Remove debug printlns, refactor a bit
2019-08-10 16:51:57 +02:00
jikstra
966bb2271a
Put something into the msg object if we fail to get a valid string out of the db
2019-08-10 16:47:38 +02:00
Floris Bruynooghe
5438be891b
Remove dc_context_unref from Rust API
...
This removes the dc_context_unref function from the Rust API which was
just an alias for dc_close. It still exists on the C API where it
makes sure to free the memory.
It also implements Drop for the context which just calls dc_close to
make sure all the memory is freed. Since you can call dc_close as
many times as you like this ensures that at the Rust level you can't
Drop the struct without releasing the memory.
Finally since memory is now freed by dropping the struct this removes
the #[repr(C)] for the struct. This struct is fully opaque to the C
API.
2019-08-10 12:04:11 +02:00