Commit Graph
100 Commits
Author SHA1 Message Date
holger krekel 7f5b362eda remove ok_to_continue and simplify/refactor imap and smtp connection trying
address @r10s review comments and also remove unneccessary "unsafe fn"
2019-10-07 13:39:01 +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
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
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
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
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
holger krekel 230c65594c add test for markseen not sending out smtp on second call 2019-10-02 23:51:14 +02:00
holger krekel 509a21ff05 introduce DC_IMAP_MESSAGE_MOVED event and try harder to send out MDNs 2019-10-02 23:51:14 +02:00
holger krekel 96066712bd add and test for DC_IMAP_MESSAGE_DELETED event 2019-10-02 23:51:14 +02:00
holger krekel d83aa1e898 perform heuristic moves only if a job is not delete 2019-10-02 23:51:14 +02:00
holger krekel f0a7bdb6d6 properly parse message ids in imap prefetch 2019-10-02 23:51:14 +02:00
holger krekel 9c077c98cd remove MdnSent logic 2019-10-02 23:51:14 +02:00
holger krekel 6dc45642b7 rework API 2019-10-02 23:51:14 +02:00
holger krekel 5c1b9c83f7 fixes #661 and also contains a cleanup of config access (only for e2ee and mdns) 2019-10-02 22:51:09 +02:00
holger krekel 92438737c9 - introduce and test BccSelf config, to prevent bcc-self on outgoing mails
- introduce context.get_config_int() which respects default values
  declared in config.rs (Config)
2019-10-02 22:51:09 +02:00
holger krekel 489cdd1b24 - resultify send-out pipeline for better error reporting
- early ignore sending out smtp messages with no recipients
2019-10-02 22:51:09 +02:00
holger krekel 3f7995a7ea start with some refactoring of the outgoing pipeline 2019-10-02 22:51:09 +02:00
holger krekel ee6d16f1b1 on some call sites: peerstate.save_to_db() should bubble up errors instead of crashing.
also write a test that double-creation of an addr-row is fine.
2019-10-01 10:34:36 +02:00
holger krekel ab2ef1e1e4 shift most mmime functions to wrapmime 2019-09-30 00:52:14 +02:00
holger krekel 18030fa61e remove duplicate code and possibly a leak 2019-09-30 00:52:14 +02:00
holger krekel 064337b5d3 refactor one occassion of determinig transfer encoding 2019-09-30 00:52:14 +02:00
holger krekel d72e9bb05b remove dc_get_fine_* method and validate_filename 2019-09-29 22:49:01 +02:00
holger krekel 7a9fdb4acd add a new tested context.new_blob_dir method to simplify writing out blob files 2019-09-29 22:49:01 +02:00
holger krekel ca76cac314 address @flub's review comment from https://github.com/deltachat/deltachat-core-rust/pull/622 2019-09-28 03:01:52 +02:00
holger krekel f28a971b96 several fixes and streamlinings, probably verified-group encryption is fixed, or at least we should see better errors 2019-09-27 23:24:57 +02:00
holger krekel 18808d0a61 majorly rustify and simplify the incoming decryption pipeline 2019-09-27 23:24:57 +02:00
holger krekel 86369148ee fix #616 -- allow invalid certs for smtp and imap connections -- this is the behaviour of C-core. 2019-09-27 21:44:21 +02:00
holger krekel f45ee2ab4d fix #615 -- like with c-core Chat-Version is left in unprotected headers because
it's eg used in server-filters for detecting DC messages
2019-09-27 18:28:47 +02:00
holger krekel 2b73fab913 cargo fmt 2019-09-27 18:28:29 +02:00
holger krekel e0d750ac64 little cleanup dc_imex 2019-09-27 18:28:29 +02:00
holger krekel 31f5fffc45 cargo fmt 2019-09-26 20:45:03 +02:00
holger krekel 64c518c2f2 remove ok_to_continue 2019-09-26 20:45:03 +02:00
holger krekel 02b73207f9 fixup this PR with tests, and returning None from get_filemime 2019-09-26 17:12:06 +02:00
holger krekel e1dc4b69f5 address all @dignifiedquire review comments 2019-09-25 23:46:44 +02:00
holger krekel 6cd3580263 rustifying dc_continue_key_transfer and fix master-conflict 2019-09-25 23:46:44 +02:00
holger krekel d5383aecc9 finish dc_imex refactoring, fix linting, rustify some things 2019-09-25 23:46:44 +02:00
holger krekel 71cbbab2c9 fix #596 and some cleanups 2019-09-25 23:46:44 +02:00
holger krekel 8518d8f456 rustify imex and friends 2019-09-25 23:46:44 +02:00
holger krekel adc0db04bc failing test 2019-09-25 23:46:44 +02:00
holger krekel 646833d3ec remove phf crate macro usage: it introduced 7 deps and is really an optimization if you very large (100K+) tables -- we have 10 entries or so and it's called once per message. Let's not introduce crates just because we can -- it increases compile time and in the phf case also introduced a github dependency (for whatever reason -- don't want to know ;) 2019-09-25 00:19:47 +02:00
holger krekel 21c9ff6c85 cargo fmt 2019-09-23 23:13:41 +02:00
holger krekel 4d6b367654 remove ok_to_continue from job 2019-09-23 23:13:41 +02:00
holger krekel e2fd22a78e cargo fmt 2019-09-23 21:23:55 +02:00
holger krekel 0759bdde01 cleanup chat.rs: remove ok_to_continue and return result from add_contact methods 2019-09-23 21:23:55 +02:00
holger krekel faa03e0e14 no functional code change: rename dc_mimefactory to mimefactory and move some functions to become MimeFactory methods 2019-09-23 20:20:34 +02:00
holger krekel f70897a6d3 rustify new_data_part() and related sanitizations 2019-09-23 18:43:04 +02:00
holger krekel ba231d2c5f address @dignifiedquire comments 2019-09-23 17:10:21 +02:00
holger krekel 095cb759ed avoid cdata_to_free trick and some more cleanups 2019-09-23 17:10:21 +02:00
holger krekel 5cbcb76039 introduce safety and a particular EncryptHelper 2019-09-23 17:10:21 +02:00
holger krekel 3388b42f20 another rustification of encrypt() 2019-09-23 17:10:21 +02:00
holger krekel e1d541b02e create wrapmime module and simplify some mailmime code 2019-09-23 17:10:21 +02:00
holger krekel ed7cf218f8 address three comments from @dignifiedquire 2019-09-22 23:39:16 +02:00
holger krekel 74d8368525 rustify references, in_reply_to, mimefactory's recipients_{addr,names} 2019-09-22 23:39:16 +02:00
holger krekel dcbfa272f9 rustify parts of MimeFactory struct 2019-09-22 23:39:16 +02:00
holger krekel 42dd600e0c more rustifications 2019-09-22 23:39:16 +02:00
holger krekel 9689df601f streamline mimetype guessing and build_body_file 2019-09-22 23:39:16 +02:00
holger krekel f6019583b7 better looping on some clists 2019-09-22 23:39:16 +02:00
holger krekel 2d50a3335d - add mailimf_field_add helper to reduce number of strdup()s
- make build_body_text avoid char*
2019-09-22 23:39:16 +02:00
holger krekel 202bfa987d dc_mimefactory+friends: simplify used strings, convert message_text and message_text2 to String, convert ints to bools 2019-09-22 23:39:16 +02:00
holger krekel 93f9c7cfbd e2ee_guaranteed -> bool, rustify set_error 2019-09-22 23:39:16 +02:00
holger krekel 4b45be7cda cargo fmt only 2019-09-20 22:43:20 +02:00
holger krekel 497ffd86fa make logic and comments more like C (early returns instead of nestedness)
next commit: cargo fmt
2019-09-20 22:43:20 +02:00
holger krekel fd8d16a7db replace weird pointer-loops with nice for-loops (thanks @dignifiedquire for guiding) 2019-09-20 17:52:07 +02:00
holger krekel f3ac9306f3 use bool instead of int 2019-09-20 17:52:07 +02:00
holger krekel 59740d0b56 remove unused var, numbers to const-names 2019-09-20 17:52:07 +02:00
holger krekel fb05a6c26f transfer docs to and cleanup some parts of e2ee::decrypt() 2019-09-20 17:52:07 +02:00
holger krekel 7943b708d2 dc_mimeparser: do a round of renames on numbers to constants and add comments from the C code 2019-09-20 15:23:34 +02:00
holger krekel 91b98e8c6d as discussed during camp and otherwise ... add dc_perform_{mvbox,sentbox}_jobs hooks which, however, for now have an empty implementation. They can already be called from UIs, though. Next step is refactoring imap-job handling to only execute jobs belonging to the respective imap folder. 2019-09-20 01:03:25 +02:00
holger krekel ceff85d892 add test and python API for verified group handling/chatting
add msg.is_encrypted() API and check for it from some tests
2019-09-20 00:33:33 +02:00
holger krekel 9f914dd42e fix test-state modification bug (online tests running after OnlineConfigureFails tests would break) 2019-09-19 23:01:51 +02:00
holger krekel 24f5d68fef add configure-failure tests 2019-09-19 23:01:51 +02:00
holger krekel 711bc69750 address @dignifiedquire comment 2019-09-19 20:03:16 +02:00
holger krekel 7263c9490d refactor rfc724_mid parsing and creation to avoid char*, add tests 2019-09-19 20:03:16 +02:00
holger krekel 0c88bc6ac7 more rfc724_mid cleanup 2019-09-19 20:03:16 +02:00
holger krekel fda8d0a2e2 factory.rfc724_mid is a String now (instead of C-Char*) 2019-09-19 20:03:16 +02:00
holger krekel 14bdf7fae8 make dc_create_outgoing_rfc724_mid safe and simplify call sites 2019-09-19 20:03:16 +02:00
holger krekel d4ff7ecbaa split qr tests 2019-09-19 20:00:27 +02:00
holger krekel cee0e22ce7 fix #538 -- don't crash on wrong setup codes for ac-message, don't use "expect(), added test 2019-09-18 19:21:41 +02:00
holger krekel dc8a2f54e5 use utf8 lossy strings for saved mime headers (as discussed on PR and IRC with @r10s) 2019-09-18 16:47:04 +02:00
holger krekel 3bd36feede fix broken rust mimeparser fuzzy tests 2019-09-18 14:15:16 +02:00
holger krekel fc1f1ce37c streamline fixtures for online accounts, reducing test functions 2019-09-18 14:15:16 +02:00
holger krekel ee327dc87d remove an ancient hack on context-teardown, refine and use more regular API for finalizing online accounts 2019-09-18 14:15:16 +02:00
holger krekel b6803191cb Merge branch 'refactor/remove-mprintf' 2019-09-17 16:23:25 +02:00
holger krekel 2b038a34c9 Merge branch 'master' into refactor/remove-mprintf 2019-09-17 15:46:05 +02:00
holger krekel 649c2eb676 try running qr tests in a new process instead of with all the other tests 2019-09-11 22:42:51 +02:00
holger krekel ffc525af9e pragmatismatic: run flaky tests three times to see if we can get more "green" CI runs this way ...
thanks to @the-compiler also modernize plugin usage
2019-09-10 20:51:52 +02:00
holger krekel 2b257e3d0d fix ffi 2019-09-09 19:45:43 +02:00
holger krekel 5b0c8dd9dd address @r10s and @flub review comments, and fix some docstrings/test meta docs 2019-09-09 18:07:32 +02:00
holger krekel 650d8c45ec fix test, and cleanup according profile-image API 2019-09-09 18:07:32 +02:00
holger krekel 383d8980d6 add profile image API to python, tests, Rust fixes/cleanups 2019-09-09 18:07:32 +02:00
holger krekel 0a6e540394 rename dc_securejoin to securejoin.rs 2019-09-05 22:55:25 +02:00
holger krekel 9f09c73ec1 make secure_join flow more readable by using and adding a few macros, tiny api changes 2019-09-05 22:55:25 +02:00
holger krekel 4bbab876ae majorly de-indent code structure in secure_join by introducing cleanup function, also majorly reducing unsafety in several places 2019-09-05 22:55:25 +02:00