jabber.developer2
8868d58920
fix(review): address PR #94 review #37/#38 reviewer comments
Parser (src/database_flatfile_parser.c):
- ff_jid_to_dir: drop GString+step1, in-place mutate str_replace result
- ff_ensure_dir: g_file_test(G_FILE_TEST_IS_SYMLINK) instead of g_lstat
- ff_unescape_*: early-continue for non-escape branch (less nesting)
- ff_readline: strdup("") instead of malloc(1)+'\0' for skip-line return
- ff_write_line: auto_char safe_msg + single fprintf (drop GString full_line)
- ff_parse_line: early return on missing closing bracket;
extract metadata-parts loop into _ff_parse_meta_parts helper
Verify (src/database_flatfile_verify.c):
- Split monolithic ff_verify_integrity into _collect_contact_dirs,
_check_permissions, _first_pass, _lmc_pass, _verify_contact_dir
- _issue_new constructor; g_new0 throughout
- Separate seen_stanza_ids and seen_archive_ids tables (no cross-kind
duplicate confusion)
- ff_skip_bom in second pass (drop manual fgetc x3)
- log_debug when skipping a contact dir without history.log
- Doc comment on ff_verify_integrity in header
SQLite (src/database_sqlite.c):
- Doc block on ChatLogs schema (replaces_db_id <-> replaced_by_db_id
invariant maintained by AFTER INSERT trigger)
- log_error when _get_db_filename returns NULL during init
Flatfile dispatch (src/database_flatfile.c):
- Replace if/else with is_outgoing ternary for log-path contact pick
Tests:
- 6 new invalid-date parser tests: empty / partial ISO / garbage /
impossible calendar / negative year / far future timestamp
- New functional test message_db_history_multi_resource verifying
same-JID-different-resource history rehydration preserves resources
- test_database_stress.c LMC chain loop: auto_char buf, drop redundant
comment/empty pre-filter (ff_parse_line handles those)
2026-04-30 10:53:03 +03:00
..
2025-09-10 14:11:03 +02:00
2025-09-10 14:11:03 +02:00
2026-03-12 18:46:42 +03:00
2025-10-14 12:42:00 +02:00
2025-06-20 18:20:47 +00:00
2025-09-10 14:11:03 +02:00
2025-03-07 21:09:16 +01:00
2025-06-20 18:20:47 +00:00
2025-09-10 14:11:03 +02:00
2025-10-14 12:42:00 +02:00
2025-09-10 14:11:03 +02:00
2023-11-01 18:30:08 -06:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2021-08-26 00:28:49 +00:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2023-04-13 16:41:21 +02:00
2025-09-10 14:11:03 +02:00
2025-09-01 23:29:26 +02:00
2026-03-07 11:55:50 +01:00
2023-03-11 15:05:03 +01:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2026-04-30 10:53:03 +03:00
2026-04-30 10:53:03 +03:00
2026-04-30 10:53:03 +03:00
2026-03-12 18:58:52 +03:00
2025-09-10 15:50:26 +02:00
2025-08-27 16:48:27 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2021-08-26 00:28:49 +00:00
2025-09-10 14:11:03 +02:00
2023-11-01 18:30:08 -06:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2025-09-10 14:11:03 +02:00
2021-06-30 18:58:07 -04:00
2025-09-10 14:11:03 +02:00
2020-07-07 14:18:57 +02:00
2026-04-30 10:53:03 +03:00