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
828e6e3fd0
Merge pull request #320 from link2xt/dc_tools_files
...
dc_tools: rustify interfaces of file-related functions
2019-08-10 23:10:24 +00:00
Alexander Krotov
ff021fed1f
dc_tools: rustify interfaces of file-related functions
2019-08-10 21:15:48 +03: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
Floris Bruynooghe
f31f603c8b
Turn dc_ensure_secret_key_existy into something more rusty
...
This marks the function safe and returns Result, it also now returns
the ConfiguredAddr since it has to look this up anyway and it makes
testing more easy. Turns out it reduces some duplicate SQL query in
some callers too.
More test code has been moved from dc_imex to test_utils as it's
more genrally applicable.
2019-08-10 11:14:40 +02:00
Dmitry Bogatov
ff39fa0fed
Remove useless cast of format! argument
...
Both `c_int' and `u32' format is same way by default formatter `{}'.
2019-08-10 03:00:43 +02:00
Dmitry Bogatov
cdf3809634
Set type of dc_msg_t.server_folder to Option<String>
2019-08-10 03:00:43 +02:00
Simon Laux
b2a2791f6f
cargo fmt
2019-08-09 23:49:54 +02:00
Simon Laux
125df968d2
replace goto with ok_to_continue
2019-08-09 23:49:54 +02:00
Dmitry Bogatov
1c5d07a29f
Reimplement dc_str_replace() with standard Rust functions
...
This change removes one more use of unstable `wrapping_offset_of'.
2019-08-09 23:40:44 +02:00
Dmitry Bogatov
24b025f573
Replace DC_MOVE_* constants with enum
2019-08-09 21:51:33 +02:00
jikstra
d323bd3593
Write tests and docs for dc_strdup and dc_strdup_keep_null
2019-08-09 19:30:36 +02:00
Alexander Krotov
b7174783f1
Pass is_html to Simplify.simplify() as bool
2019-08-09 16:57:14 +02:00
Alexander Krotov
e3269616bd
Use bool for Simplify members
2019-08-09 16:57:14 +02:00
Alexander Krotov
64051fca10
Rename dc_simplify_t into Simplify
2019-08-09 16:57:14 +02:00
Alexander Krotov
14ce55b1a8
Remove #[repr(C)] from dc_simplify_t
2019-08-09 16:57:14 +02:00
holger krekel
be605d8ea5
fix(peerstate): encryption-not-available
...
Add a test for failing e2e encryption and some info statement to hunt where the e2e encryption failure comes from, as well as fix the issue.
Closes #233
2019-08-09 13:28:48 +02:00
Friedel Ziegelmayer
4d8d5f4e1e
Fix broken string allocations in message handling ( #306 )
...
Fix broken string allocations in message handling
2019-08-09 11:32:42 +02:00
holger krekel
750d6e99a8
fix some longer standing nonsense code that sent to misleading MSG_READ events instead of one correct one
2019-08-09 11:32:24 +02:00
holger krekel
a67892d414
(jikstra, hpk) fix a logic bug introduced with the stock-string merge which set the better message only if it was empty
2019-08-09 11:32:24 +02:00
holger krekel
1cd2a62caf
fix a failure which blocked correctly sending out messages (dc_job_add_smtp mis-set filename)
2019-08-09 11:32:24 +02:00
dignifiedquire
6772d6f66c
fix: improve some string handling in the message recieve path
2019-08-09 11:32:24 +02:00
Simon Laux
89531dfb62
fix(dc_lot): correct test2
2019-08-09 11:31:11 +02:00
Friedel Ziegelmayer
2414a618e2
Merge pull request #305 from link2xt/keyhistory
...
Remove empty keyhistory module
2019-08-08 16:20:55 +02:00
Alexander Krotov
7c34806125
Remove empty keyhistory module
2019-08-08 13:32:45 +03:00
Friedel Ziegelmayer
c1f19aa9d3
Merge pull request #292 from link2xt/dc_get_abs_path_safe
...
Implement dc_get_abs_path_safe
2019-08-08 12:28:19 +02:00
Friedel Ziegelmayer
aab2336223
Merge pull request #304 from link2xt/set_self_key_bool
...
Return bool from set_self_key()
2019-08-08 12:20:15 +02:00
Friedel Ziegelmayer
7863f5719c
Merge pull request #303 from deltachat/fix_chat_list_no_messages
...
fix own messages displayed as noMsgs in summary
2019-08-08 12:19:31 +02:00
Alexander Krotov
8c933f8fa8
Return bool from set_self_key()
2019-08-08 12:27:01 +03:00
Simon Laux
3d83409375
fix own messages displayed as noMsgs in summary
2019-08-08 08:48:58 +02:00
Alexander Krotov
76dbb37609
Implement dc_get_abs_path_safe
2019-08-08 04:20:12 +03:00
Jikstra
e9ff02bdc5
Merge pull request #296 from deltachat/remove_gotos_dc_e2ee
...
Remove gotos from dc_e2ee
2019-08-08 00:22:51 +02:00
Jikstra
602d145348
Merge pull request #297 from deltachat/remove_gotos_dc_mimefactory
...
Remove gotos from dc_mimefactory
2019-08-08 00:15:28 +02:00
Jikstra
ee264117d3
Merge pull request #298 from deltachat/remove_gotos_dc_strencode
...
Remove gotos from dc_strencode
2019-08-07 23:41:33 +02:00
Jikstra
721dcd7ccd
Merge pull request #295 from deltachat/remove_gotos_dc_saxparser
...
Remove gotos from dc_saxparser
2019-08-07 23:37:50 +02:00
jikstra
cb138fdcb7
Remove comment
2019-08-07 23:17:11 +02:00
jikstra
a993c256e2
Remove comment
2019-08-07 23:15:55 +02:00
Friedel Ziegelmayer
ea6972118a
refactor: rusty contact
...
* refactor(contact): rename and rusty memory allocations
* refactor(contact): use enum to indidcate origin
* refactor(contact): safe blocking and unblocking api
* refactor(contact): only safe and no more cstrings
2019-08-07 22:20:48 +02:00
jikstra
70f6aa9d3a
run cargo fmt
2019-08-07 21:21:13 +02:00
jikstra
e1d7871754
Remove gotos in dc_strencode
2019-08-07 21:20:35 +02:00
jikstra
655884b559
run cargo fmt
2019-08-07 21:13:54 +02:00
jikstra
e0dbd47185
Remove gotos from dc_mimefactory
2019-08-07 21:13:20 +02:00
jikstra
925759a922
run cargo fmt
2019-08-07 20:57:58 +02:00
jikstra
9034f316ba
Remove gotos from dc_e2ee_encrypt function
2019-08-07 20:57:42 +02:00
jikstra
0276f97d96
run cargo fmt
2019-08-07 20:52:38 +02:00
jikstra
ac2f9fdee5
remove gotos from new_data_part function
2019-08-07 20:52:18 +02:00
jikstra
76b3c532b1
run cargo fmt
2019-08-07 20:40:50 +02:00
Dmitry Bogatov
760332262d
Add more assertions to `deltachat-ffi' library
...
Change code to panic! on invalid input (null pointers, out-of-range
identifiers) instead of silently doing nothing.
2019-08-07 20:36:00 +02:00
Dmitry Bogatov
bc2314586c
Avoid unstable `inner_deref' feature
2019-08-07 20:31:02 +02:00