holger krekel
c8400e50b2
push down unsafe from whole-function to expressions
2019-10-07 13:02:59 +02:00
holger krekel
ba5b3ad675
fix #690 by avoiding account.__del__ and registering/unregistering with atexit (a module that manages process/interpreter shutdown and calls into registered shutdown. Recommended way for user code still is to call account.shutdown() explcitely.
2019-10-07 12:24:50 +02:00
björn petersen
c1e4d1e7a4
Merge pull request #688 from deltachat/remove-predecessor
...
remove scanning for old Chat-Predecessor header
2019-10-07 02:02:15 +02:00
B. Petersen
dd8744b74e
remove unused import
2019-10-07 01:15:42 +02:00
holger krekel
b775ecca08
fix tests
2019-10-07 00:55:33 +02:00
holger krekel
b8f211a013
cargo fmt
2019-10-07 00:55:33 +02:00
holger krekel
51534b2fae
move all alloc/free/stop/has/shall_stop*ongoing* methods to context
...
introduce stop_ongoing to bindings and test for cancelation of configure
2019-10-07 00:55:33 +02:00
B. Petersen
710db2ba0a
remove scanning for old Chat-Predecessor header
...
the Chat-Predecessor header was dropped about 10 month ago.
as a replacement, the standard headers are used.
2019-10-07 00:43:43 +02:00
holger krekel
32ef0d4dc3
cargo fmt
2019-10-07 00:22:19 +02:00
holger krekel
b3cd80ba6d
remove ok_to_continue, shift code to a result-returning add_export_files to avoid if-branches, cleanup and simplify some logging
2019-10-07 00:22:19 +02:00
holger krekel
3f053f899e
cargo fmt
2019-10-07 00:15:39 +02:00
holger krekel
22b4d1734c
remove last ok_to_continue in mimeparser
2019-10-07 00:15:39 +02:00
björn petersen
46a71e81a0
Merge pull request #683 from deltachat/outlook_none
...
Fix and refactor Outlook autodiscovery
2019-10-06 15:54:01 +02:00
Alexander Krotov
b4851187ba
Safe outlk_autodiscover
2019-10-06 05:46:45 +03:00
Alexander Krotov
0252969f7e
Remove unused in_0 from outlk_autodiscover_t
2019-10-06 05:16:17 +03:00
Alexander Krotov
f86cec4844
Mark moz_autoconfigure as safe
2019-10-06 05:16:17 +03:00
Alexander Krotov
cd2e36da92
rustfmt
2019-10-06 05:16:17 +03:00
Alexander Krotov
1b13107181
Return Option<String> from read_autoconf_file
2019-10-06 05:16:17 +03:00
Alexander Krotov
6fbde21995
outlk_autodiscover: store url as String
2019-10-06 05:16:17 +03:00
Alexander Krotov
a6608513ac
auto_outlook: restore and add some comments
2019-10-06 05:16:17 +03:00
Alexander Krotov
d43c225be3
Return None from outlk_autodiscover if no XML config was parsed
2019-10-06 05:16:17 +03:00
B. Petersen
1802d7658d
add some tests for dc_create_outgoing_rfc724_mid()
...
as noticed in the last attempts to change the prefix,
this test is missing (as probably many more :)
2019-10-05 22:48:00 +02:00
B. Petersen
275f5d713f
cargo fmt
2019-10-05 22:47:39 +02:00
B. Petersen
e40cfeec58
bubble up sql, get_abs_path errors
2019-10-05 22:47:39 +02:00
B. Petersen
275b4b8d36
bubble up sql-errors in reveive_imf()
2019-10-05 22:47:39 +02:00
B. Petersen
77cef632c7
bubble up update_param() error
...
bubble up the error instead of ignoring it -
but also do not panic as before #673
2019-10-05 22:47:39 +02:00
B. Petersen
db2064de14
use .to_string_lossy() member of Path, CStr etc.
...
instead of calling to_str().unwrap_or_default().
2019-10-05 22:46:29 +02:00
B. Petersen
e251c7b1c8
redo some c-comments
2019-10-05 15:53:18 +02:00
björn petersen
2fe98775f9
Merge pull request #673 from deltachat/dont-panic
...
Don't Panic!
2019-10-05 15:08:15 +02:00
björn petersen
187179d87b
Merge pull request #674 from deltachat/to-lossy
...
always expect bad c-strings
2019-10-05 15:04:32 +02:00
holger krekel
dd03f6e8af
test and fix that a group with mixed-encryption members (with some we can encrypt, others not) does not break
2019-10-05 15:02:03 +02:00
holger krekel
07b32241bd
try fix #677 (this fixes only a test) -- seems like we passed pointers into Rust strings to code that was expecting null-terminated strings. Now do proper "strdup()" and free. The real proper fix is to make dc_split_armored_string into a rust-string function and do away with all c-pointers.
2019-10-05 15:01:28 +02:00
B. Petersen
abfff96cd4
cargo fmt
2019-10-05 12:44:08 +02:00
B. Petersen
735bdd1c20
always use to_string_lossy() for converting c-strings to String
...
the function to_string() is removed;
c-strings may always be badly formatted and this should never lead to a panic.
2019-10-05 00:12:32 +02:00
B. Petersen
9cae075b6f
target detailed checks of @flub
2019-10-04 23:07:34 +02:00
B. Petersen
2317518e5e
cargo fmt
2019-10-04 23:07:34 +02:00
B. Petersen
477af413c6
if in doubt, prefer unwrap_or_default()
...
if the past we had lots of crashes because of unexpected unwrap failures,
mostly related to string.
this commit avoids them eg. for string-conversions that may panic
eg. when encountering a null-byte or by logical programming errors
where an object is assumed to be set but is not under unexpected circumstances.
2019-10-04 23:07:33 +02:00
B. Petersen
93f0f5ccae
rename sql-config-setters to set_raw_config*()
...
the rename is reasonable as the getter is called get_raw_config*()
and to make the functional difference to context.set|get_config() clearer.
2019-10-04 11:18:26 +02:00
B. Petersen
79b92727cc
prefer get_config_bool() where appropriate
...
for db input/output, we still use get_config_int() to convert to/from 0/1.
also for info() we prefer get_config_int() to show the real value.
2019-10-04 11:15:11 +02:00
björn petersen
8dfd04672f
Merge pull request #670 from deltachat/tweak-config
...
tweak config
2019-10-03 21:19:45 +02:00
holger krekel
603761e4b7
add DC_EVENT_DELETED_BLOB_FILE
2019-10-03 18:01:56 +02:00
holger krekel
467c09f491
introduce DC_EVENT_NEW_BLOB_FILE event and test for it
2019-10-03 18:01:56 +02:00
B. Petersen
a953b494cb
cargo fmt
2019-10-03 17:41:09 +02:00
B. Petersen
dca9afa10b
rename sql.get_config() to sql.get_raw_config() to make clearer that there is not default handling
2019-10-03 17:35:43 +02:00
B. Petersen
23d2d87c24
do not panic on missing or wrong formatted values in the database
2019-10-03 17:15:40 +02:00
B. Petersen
c6b2d640ae
prefer context.get_config() over context.sql.get_config() as the latter does not handle default values.
2019-10-03 17:15:40 +02:00
björn petersen
b4b8a1d15b
Merge pull request #667 from deltachat/resilient-writes
...
more resilient database writes
2019-10-03 14:48:21 +02:00
Alexander Krotov
130d485cac
Fix some clippy warnings
2019-10-03 14:30:40 +02:00
B. Petersen
d5b92744ed
increase number of simultan database-connections, wait for write if another thread writes
...
- increase the number of simultan database-connections handled by the r2d2 pool.
currently we have already at least 5 threads threads,
but also the ui may call from any thread.
- the busy-timeout for all connections is set to 10 seconds.
this means, if a connection-A wants to write,
but connection B-is already writing,
connection-A waits multiple times a few ms and tries over.
this is repeated until the 10 seconds are accumulated.
2019-10-03 14:09:43 +02:00
Alexander Krotov
a5c4e16405
Merge pull request #647 from deltachat/tls_checks_config
...
Add certificate check configuration options
2019-10-02 23:21:03 +00:00