DTCHAT_WHATSAPP_FAKE_FILE makes the fake adapter offer that file (name, size, SHA-256), and on file-accept read it in 4 KiB blocks, emit file-data and a file-end carrying the hash; the real accept path (DownloadAny) now also sends the SHA-256 in file-end, and the static fake keeps its hello-world hash. tests/whatsapp_fake.py uses a 9000-byte deterministic file, checks the offer name/size/hash, reassembles every chunk byte-for-byte and verifies the file-end hash (31 checks, green stand-alone). Harness entry already exists; in-tree build and harness follow.
The dialog now edits real accounts instead of in-memory demo entries: the schema is Label, Protocol (irc/xmpp/telegram/whatsapp/demo), Adapter path, Settings (JSON) and Secrets (JSON). It loads accounts.json/secrets.json through the runtime (label, protocol, adapter, settings, masked secrets), and Save builds the complete accounts/secrets documents for every account, extracts label/protocol/adapter and parses the two JSON fields, then calls the runtime's writer. The runtime saves via dc_store_save_accounts/_secrets (files 0600), swaps its stored JSON, removes deleted accounts from the model, and restarts all adapters from the new set; the UI data pointers are refreshed. Add/Delete/Save semantics are now file-backed. Verified through the real UI under Xvfb: Add filled (Label 'Fake via UI', adapter /tmp/opencode/fake_adapter, settings {"mode":"echo"}), Save wrote both files (0600) and started the fake adapter online; restarting dtchat shows the account and all fields again (screenshots dtchat-accounts-editor.png, dtchat-accounts-loaded.png). In-tree build and harness follow.
An incoming messageDocument is remembered with its TDLib file id; file-accept sends downloadFile (priority 1, whole file) and updateFile is followed until local.is_downloading_completed, then the local file is read in 4 KiB blocks and sent as file-data with a file-end carrying the SHA-256 computed with dc_file_sha256. Unknown offers answer file-error. The fake mode can offer a real local file through DTCHAT_TELEGRAM_FAKE_FILE and exercises the same read/hash/chunk/event path; tests/telegram_fake.py now uses a 9000-byte file, checks the offer size and SHA-256, reassembles the chunks byte-for-byte and verifies the file-end hash (25 checks, green stand-alone). The adapter links CRYPTOLIB for EVP/dc_file_sha256. The TDLib downloadFile/updateFile branch is compiled but not exercised without an account. Full build and harness follow.
Conversation > Join Channel opens a Motif prompt (channel on IRC or room on XMPP); the OK callback calls the new join hook with the current account. accounts_run sets the hook, sends dc_adapter_join, adds the conversation (channel for IRC, group otherwise) and shows it; the adapter's conversation event updates it later. The IRC adapter now handles the join and part commands (JOIN <conv>, PART <conv> :reason) instead of ignoring them; XMPP already implemented join. Tests: tests/irc_join.py checks JOIN #new on the wire, the self-JOIN conversation event, PART #new and a clean bye (10 checks, standalone built adapter green); the UI path was verified with the fake adapter under Xvfb (DTCHAT_TEST_JOIN=#new -> 'accounts fake: join #new' and conversation #new) and the dialog screenshot build/mcde-shots/dtchat-join-dialog.png. Harness entry added (51). In-tree build follows.
Telegram: updateUser becomes roster events (name and online from userStatus), the typing command sends sendChatAction (typing/cancel), file-send sends a document via inputFileLocal, an incoming messageDocument becomes a file-offer, and the fake mode emits two contacts, an offer, data/end on accept and file-sent. WhatsApp: Connected emits the address-book contacts as roster, the typing command uses SendChatPresence and incoming ChatPresence becomes typing events, file-send uploads and sends a DocumentMessage, an incoming DocumentMessage becomes a file-offer (download on accept), and the fake mode emits contacts, an offer with SHA-256, data/end on accept, a typing echo and file-sent. tests/telegram_fake.py (24 checks) and tests/whatsapp_fake.py (28 checks) cover all of it and pass with the stand-alone binaries. In-tree build and harness follow; real incoming downloads and accounts remain.
The Go adapter encodes every whatsmeow QR code with github.com/skip2/go-qrcode and sends both the text (qrText) and the module bitmap the UI's request dialog already understands: qr {width,height,data}, one byte per module, 1 = dark, quiet zone included, base64. The fake pairing goes through the same request function, so tests/whatsapp_fake.py now checks a square bitmap, one byte per module, both module values and the empty quiet-zone corner; all 17 checks pass with the stand-alone binary. go.mod/go.sum carry the new module. In-tree build and harness follow.
Debian's libtdjson lives in /usr/lib/<triplet>/TDLibX.Y.Z; the configure check used that path only for its own link test, so the adapter link failed with 'cannot find -ltdjson'. TDLIBLIB now carries the -L directory as well, which dtchat_telegram_LDADD already uses.
Telegram: telegram_adapter.c speaks protocol v1 with settings api_id/api_hash/phone/database, TDLib 1.8.57 through td_json (setTdlibParameters, phone/code/password as request/answer, updateNewMessage, sendMessage), states and disconnect; without TDLib it still answers hello and reports the missing library as a fatal error. Debian's versioned TDLib directories are found by configure (header and lib scan) and passed as TDLIB_CPPFLAGS/TDLIBLIB; the adapter is always built (stub without the library). WhatsApp: a Go program under whatsapp_adapter/ with go.mod/go.sum using whatsmeow from the module cache and modernc sqlite, QR pairing through whatsmeow, message events and SendMessage; without Go it is not built (MCDE_GO). Its QR is sent as qrText, which the request dialog now shows when there is no bitmap. Both adapters have DTCHAT_*_FAKE modes; tests/telegram_fake.py (15 checks) and tests/whatsapp_fake.py (13 checks) drive hello, configure, connect, the pairing request/answer, online, send echo and bye, all green stand-alone. The harness runs them when the binaries exist (50 entries with both). TDLib and golang-go were installed with apt; the WhatsApp module builds with GOPROXY=off from the cache. Real accounts, QR bitmap and files follow.
The adapter requests the message-tags capability when the server offers it (together with sasl when a password is set) and remembers the ACK. Incoming @+typing=active|paused tags on TAGMSG or PRIVMSG become typing events with conv (channel or sender), on and who; the typing command sends @+typing=active|paused TAGMSG <conv> through the output queue, and is ignored when the capability was not negotiated. tests/irc_typing.py offers message-tags, checks the CAP REQ, sends alice's active/paused TAGMSGs, and verifies the adapter's own TAGMSG lines for typing on/off; all checks pass. The four existing IRC fake-server suites (adapter, channels, messages, reconnect) still pass with the new binary. In-tree build and harness follow.
The UI gains a typing hook: XmNmodifyVerifyCallback sends typing on for the first change (and after a pause) with the current conversation, resets a 2.5 s timeout that sends off, finishes the old conversation when the selection changes, and ignores programmatic set_input (suppress flag). accounts_run sets the hook to dc_adapter_send_typing of the account that owns the conversation, so XMPP sends XEP-0085 composing/paused; the IRC adapter ignores the command it does not implement. DTCHAT_ACCOUNTS_DEBUG logs the on/off transitions. In-tree build and a focus-based check follow.
The file protocol now carries the sender's SHA-256: the adapter computes it with dc_file_sha256 for an outgoing transfer, puts it into the IBB open metadata (urn:dtchat:file:0 sha256 attribute) and into file-sent, and passes the attribute of an incoming open through in file-offer. The UI stores the offered hash, hashes the part file at file-end and only renames when it matches; a mismatch removes the part file, reports 'file rejected: checksum mismatch' in the status line and the transcript, and never exposes the bytes under the final name. The fake adapter offers the correct hash in mode files and a wrong one in mode badhash. tests/xmpp_ibb.py checks the SHA-256 in the outgoing open and in the incoming offer. Verified stand-alone under Xvfb: mode files writes the 11-byte hello world, mode badhash leaves no file and no .part; the XMPP IBB suite passes with the hash checks. In-tree build and harness follow.
accounts_run.c handles file-offer/file-data/file-end/file-reject/file-error: an offer creates the conversation and opens the existing file dialog, accepts send file-accept and write the base64 chunks into NAME.part (0600) in the state directory, file-end renames to a free name and adds a system line to the transcript, a reject sends file-reject and removes the part file; a file-sent confirms our own transfer. The runtime sets the UI file hook, so Conversation > Send File now works for an adapter account: send_file_cb falls back to the open conversation when there is no Nearby peer, and the hook sends file-send with the generated id. dc_adapter_send_file()/dc_adapter_file_answer() are the core side. The offer dialog was only 128x52 because its shell size was overridden before the popup; it now sets form and shell and repeats after 50 ms, and the timer is removed on destroy. The fake adapter gained a 'files' mode (offer, data, end on accept, reject on reject, file-sent on send). Verified under Xvfb: offer dialog 460x190, Accept by click writes hello world (11 bytes), Reject leaves no file, and DTCHAT_TEST_UI_SEND_FILE produces file-send/file-sent; screenshots build/mcde-shots/dtchat-file-offer.png and dtchat-file-received.png. In-tree build and harness follow.
xmpp_adapter.c uses EVP_EncodeBlock/DecodeBlock; the transitive -lcrypto of libDtChat.la is not enough for the program link (DSO missing from command line), so dtchat_xmpp_LDADD names CRYPTOLIB explicitly.
The adapter protocol gains additive file events: file-send (conv, id, name, path), file-accept/reject/cancel commands, and file-offer/file-data/file-end/file-sent/file-reject/file-error events, with a 32 MiB limit, 4 KiB blocks and an explicit accept before data flows; docs/reference/dtchat-adapter-protocol.txt defines them. xmpp_adapter.c implements XEP-0047: outbound open (with the name/size in a urn:dtchat:file:0 child), base64 data IQs acknowledged one by one and close, then file-sent; inbound open is held until file-accept answers the IQ, data chunks become file-data events, close becomes file-end, and a reject is an IQ error. libstrophe serialises a tag's text through a separate text stanza (set_text on a named tag returns -2), which the data blocks now do. tests/xmpp_ibb.py drives a minimal server: outgoing bytes arrive unchanged, an accepted incoming file yields offer/data/end with the right size, and a rejected offer becomes an IQ error; all 26 checks pass, exit 0, no stderr. The UI file path for adapter accounts (offer dialog, accept, writing the chunks) is the next piece; the adapter itself is complete.
conn_handler used to send a bye and exit 0 on any disconnect, which the core reads as an intentional stop. Now an unexpected end of the stream (or a failed connection) reports offline, sends no bye and exits 1: DcAdapter's existing restart policy starts the process again with backoff and the hello/configure/connect handshake repeats (the policy is covered by DtChat/test_adapter). A requested disconnect still leaves through handle_command with quitting set, bye and status 0. tests/xmpp_drop.py closes the stream after the bind and checks status 1, the offline state and no bye; xmpp_fake.py and xmpp_muc.py still pass, all with the standalone adapter. In-tree build/tests follow.
accounts_run.c loads accounts.json (id, protocol, label, adapter, settings, enabled) and secrets.json (per account id) and starts one DcAdapter per enabled account, pumping the DcLoop from an Xt timeout. Its events go into the model and the panel: state into the status line, conversation (direct/channel/group) and roster entries into the model (roster sets presence), messages into the transcript via dtchat_ui_message_added, presence/typing/errors into the status/dialog, request events into the existing request dialog with the answer routed to that adapter. The UI send hook resolves the selected account (dtchat_ui_current_account) or the account that owns the conversation and calls dc_adapter_send_text; dtchat_accounts_join/_typing expose join and XEP-0085 for menus and tests. Normal GUI runs (not --demo/--local/--perf/--smoke) start with an empty model and the configured accounts; the demo peers are gone in that mode. dtchat-irc is installed next to dtchat and listed in the PLIST; dtchat-xmpp and the demo adapter remain build artifacts. Verified with the fake adapter under Xvfb (accounts fake: starting/online/sent alice/message alice), including the real UI send path (DTCHAT_TEST_UI_SEND), screenshot build/mcde-shots/dtchat-accounts.png; --smoke-test still passes.
join sends a presence to room/nick with the http://jabber.org/protocol/muc <x/>; the room's self-presence is answered with a conversation event (kind group, title room), other occupants are reported as presence events with buddy=room/nick, groupchat messages are filed under the room with the sender's nick in from, and part sends an unavailable presence. The nick is the JID's local part. The hello caps gain muc. tests/xmpp_muc.py drives a minimal server through stream, SASL PLAIN, bind, join (checks the MUC element), self-presence, alice's presence, a groupchat message and the part; all 17 checks pass, exit 0, no stderr. UI wiring for adapter accounts is still open, as is the live test.
After the bind the adapter enables XEP-0280 carbons and unwraps sent/received forwarded messages: a message another of our resources sent becomes a normal message event with self=true and the contact as conv, a received one self=false. XEP-0085 chat states are handled before the body: composing emits typing on, paused/active/inactive/gone off. The typing command sends composing or paused to the conversation, and dc_adapter_send_typing() puts it on the core side. tests/xmpp_fake.py checks carbons were enabled, the forwarded message (self, conv bob, text), typing on/off from bob, and that a typing command reaches the server as <composing> addressed to bob. Standalone adapter: all checks ok. The UI does not send typing for adapter accounts yet (adapter account wiring is still open), which the commit documents.
After the bind the adapter sends <presence/> and asks for the roster (iq get, jabber:iq:roster) and handles the result and pushes: every item becomes a roster event with the contact's id, name, subscription and current online state. Presence from contacts is tracked per bare JID and emitted as presence events (online with the XMPP show and status, offline, subscribe/unsubscribe); libstrophe 0.14's get_text is used for child text. The hello caps gain roster and presence, and the event shapes follow docs/reference/dtchat-adapter-protocol.txt (buddy, contact, away). tests/xmpp_fake.py now checks that the client announces itself and asks for the roster, delivers bob (name/subscription) and carol, the online-with-show/status and offline presence, and still carries messages both ways. Run against the standalone adapter: 22 checks, all ok. In-tree build pending: make mcde-host is running after the configure change.
NetBSD's sys/videoio.h speaks the V4L2 API (VIDIOC_*, v4l2_buffer,
v4l2_format, V4L2_PIX_FMT_YUYV), so media_capture.c's backend is shared:
linux/videodev2.h with HAVE_V4L2 on Linux, sys/videoio.h with HAVE_VIDEOIO
on NetBSD. configure checks sys/videoio.h in the NetBSD branch and
linux/videodev2.h otherwise; the guards for the mmap/poll/QBUF code accept
either. A build with neither header still gets the test pattern.
Verified with the cross compiler against build/obj/destdir.amd64:
media_capture.c and test_capture.c compile with -DHAVE_VIDEOIO (exit 0),
and the same sources still compile and run on Linux with -DHAVE_V4L2
(test_capture: v4l2:/dev/video0, all ok) and without either define
(test-pattern, all ok). It has not run on a NetBSD machine - no host is
available - so the release gate still needs that run.
Video frames are timestamped by wall clock now, so test_video_packet can no longer make the old frame-count timestamps by sending quickly. dc_call_send_video_at() takes the timestamp as an argument (dc_call_send_video passes the elapsed time since the call began), and the test sends 0/66/132 ms after 200 ms of decoded audio: the first two are dropped, the third renders with offset -68 ms and two drops. Standalone and in-tree (43 ok/0 bad) green.
configure AC_DEFINEs HAVE_V4L2 into include/cde_config.h; media_capture.c did not include it, so an in-tree build would have compiled the test pattern only. The file now includes <cde_config.h> under HAVE_CONFIG_H, which the automake build defines and the standalone test compile does not (it passes -DHAVE_V4L2 itself).
The call window gains a Camera button that cycles the video source (/dev/video0..3, then the test pattern) through a hook in localui; the status line names the new backend (e.g. video source: v4l2:/dev/video0), and the button is insensitive in --call-demo. The in-call status now says 'in the call - LAN only, no relay', the note the plan asks for. Verified live between two UIs under Xvfb: the Camera button switched the sender from camera to pattern and back, the status line showed the backend, and video kept flowing; screenshots build/mcde-shots/dtchat-t76-camera.png, dtchat-t76b.png, dtchat-t76-video-off.png, dtchat-t76-full.png. Video off, full screen and resize-aware rendering were committed in 4e967b8a3c.
media_capture.c: V4L2 (YUYV, 4 mmap buffers, poll, QBUF again after use) and a
test pattern; a camera with another size is scaled to the call's 640x360, and a
build without HAVE_V4L2 gets the pattern. On this T14 the integrated camera is
/dev/video0 and gives frames (test_capture: v4l2:/dev/video0, non-uniform
frame, 320x180 through the scaler; pattern frames differ and have Y and
chroma). configure defines HAVE_V4L2 for linux/videodev2.h.
media_video.c gains dc_vpx_enc_keyframe (VPX_EFLAG_FORCE_KF on the next
frame), media_packet a DC_MEDIA_KFREQ control, media_call
dc_call_request_keyframe/take and DC_MEDIA_KFREQ in the sealed type range.
dc_call_video_out now decodes the reassembled VP8 frame into I420 (it returned
the compressed frame, which the UI drew as a green picture);
dc_call_video_packet keeps the compressed frame for tests and recordings.
Video timestamps are wall clock, not frame counts, so a pump slower than 15 fps
does not drift behind the audio clock.
localui starts camera+encoder on entering the call, sends 15 fps, requests a
keyframe after a loss, forces one when asked, decodes incoming frames into the
call window, drains up to four 20 ms capture frames per 40 ms pump (one per
pump halved the audio clock), and logs video in/out under
DTCHAT_CALL_DEBUG; DTCHAT_TEST_VIDEO switches to the pattern.
Two UIs under Xvfb: A pattern, B camera, 90 frames each way in about 6 s,
audio 300 frames (real time), the window shows the peer's picture
(build/mcde-shots/dtchat-t71-video-call.png). test_video_packet uses the
packet interface; its 50 KB/42-fragment loopback check still passes. New
harness entry DtChat/test_capture (43). In-tree build pending: a foreign
make release holds the lock.
ui_call.c renders into the drawing area's current size (XmNwidth/XmNheight read as Dimension, not int - the old read left garbage in the upper half of an int and the frame went nowhere), reallocates the pixel buffer and XImage when the area changes, and draws from the XmNexposeCallback/XmNresizeCallback (an Xt event handler ran before Motif cleared the window). The buttons row gains Video and Full screen toggles: video off keeps the area in place (clearing it, so the form does not shrink) and says so in the status line; full screen sets the shell to the screen size at 0,0, the area to the height below the buttons and back to the position the dialog manager chose. The normal window is 640x420, the video is fitted with black bars (BT.601 XRGB, one XPutImage). Verified under Xvfb 1280x800: 640x420 normal, Video off -> cleared area with 'video is off', Video on -> image again, Full screen -> 1280x791 at 0,0 with a 1280x720 fit, back -> 640x421 at 60,59; --smoke-test PASS; two UIs still reach IN_CALL and carry 150+ Opus frames. Screenshots build/mcde-shots/dtchat-t76b.png, dtchat-t76-video-off.png, dtchat-t76-full.png.
dtchat-headless gains --call, --audio-in FILE and --audio-out FILE: it exchanges media-key on the ready link, calls the peer, answers an incoming ring (it is a test peer, so the answer is automatic), and pumps the call from its loop: a 20 ms frame from the raw s16le 48 kHz file is encoded and sent while in the call, received frames are decoded into the output file, and call/audio events go to stdout. tests/p2p-audio.sh starts two instances (A listens and records, B connects, calls and plays tests/tone.py's 2 s 440 Hz tone), waits for both in-call, for 100 received frames, prints the CPU time of both, quits them and has tests/tone-check.py verify the recording (length within 25 percent, RMS > 500, zero crossings within 15 percent). Standalone run: A 45475, both in-call, recording 2.00 s / RMS 6339 / 441 Hz, all ok. Wired into the harness as DtChat/p2p-audio (42 entries). In-tree build pending: a foreign make userland holds the lock.
configure.ac stops with 'libopus not found; dtchat needs it for audio' in the cross
userland (build/logs/userland-2026-11-17-fix2.log:1324), so wm/mcde never reached the
sysroot and the images kept the Nov 15 MCDE (wrong PAM file, host xrdb path, CDE logo).
The NetBSD project's binaries are taken; they must stay in the sysroot as the shared
libraries of dtchat.
The local protocol gets media-key: each side sends its ephemeral X25519 public key (base64) and UDP port over the ready text connection; both derive the direction keys with HKDF-SHA256, the caller is the initiator. localui sends the key on Conversation > Call, answers an offer with its own key, creates the call with dc_call_new_bound on the listener port (TLS and media share the number), rings, and opens the call window; an incoming ring enables Answer. The Xt loop pumps the call: drain, Opus decode to the playback stream, capture and encode only while our own PTT is held, video frames to the window, ring timeout. dc_local_conn_remote_addr gives the numeric peer address; dc_call_new_bound binds the announced port. dc_call_talking() is now only our own key, dc_call_peer_talking() the peer's (a received PTT used to start our microphone too). The call window has an Answer button and lays the buttons above the video so they stay visible. --call-first and DTCHAT_TEST_TRUST/DTCHAT_TEST_AUTOANSWER/DTCHAT_TEST_PTT drive the test: two UI instances auto-paired, exchanged media-key, rang, answered, reached IN_CALL and carried 200 Opus frames caller->callee with the callee silent (audio out 200 on the receiver, audio in 200 on the sender); screenshot build/mcde-shots/dtchat-t65-live.png. The smoke still passes; test_media_call uses peer_talking; test_media_packet covers the base64 key exchange. The test switch is documented in the security review.
SvcPam.c: a fresh PAM handle per authenticate, pam_end on failure, the PAM_USER
check was inverted, the conv default case did not advance, failures go to
authlog (follows xsrc/external/mit/xdm greeter/greet.c).
pkgsrc/Makefile: ac_cv_path_XRDB=${X11BASE}/bin/xrdb - the cross build baked the
Linux host's /usr/bin/xrdb into dtlogin; /var/dt/Xerrors on an installed system
said 'sh: /usr/bin/xrdb: not found', so Xresources never loaded and the CDE logo
showed (measured in a VM 2026-11-17).
tradcpp/config.h: CONFIG_OS is the ident as given; the stringify macro turned the
quoted -DCONFIG_OS_IDENT into an invalid macro name and wm/mcde stopped in
lib/tt (tradcpp: Invalid macro name "__NetBSD__", build/logs/userland-2026-11-16-atomic.log)
so the sysroot kept the Nov 15 MCDE. t0436 t0438 t0217
ui_call.c: a Motif window for one call with a 480x270 video area, status line, Push to talk (a toggle wired to dc_call_send_ptt), Hang up (dc_call_hangup + owner callback) and Close. The newest I420 frame is scaled bilinearly to an aspect-preserving rectangle, converted with dc_i420_to_xrgb, composed into one 0x00RRGGBB buffer (black bars around it) and blitted with one XPutImage on expose or a new frame; no per-plane drawing. dc_call_new_bound() binds the UDP socket to the announced port, so a peer's service port serves TLS and media. --call-demo opens the window with a synthetic gradient frame; --smoke-test creates the window, sets a frame and checks it is there. Standalone build: smoke PASS, screenshot build/mcde-shots/dtchat-t76.png (video, status, Push to talk/Hang up/Close). A live call still needs the media-key exchange in the local text protocol (next: T6.5); camera capture is T7.1.
media_sync.c: audio is the clock (20 ms per decoded frame); a video frame whose timestamp is more than DC_SYNC_LATE_MS (80 ms) behind it is dropped, anything else is rendered and its video-audio offset recorded. media_call.c advances the clock on every decoded audio frame, timestamps video at 1000/15 ms per frame, drops late frames in dc_call_video_out (-1) and counts them; the reassembler now carries the media packet's timestamp with the frame. test_media_sync: on-time, 20 ms late, exactly 80 ms (rendered), 81 ms (dropped), early, a one-minute call and NULL arguments. test_video_packet gains a call-level sequence: 200 ms of decoded audio, then four video frames at 0/66/132/198 ms; the first two are dropped, the third renders with offset -68 ms and the dropped counter is 2. Standalone and ASan/UBSan clean. In-tree build pending: the next make mcde-host carries it and the harness reaches 41 entries.
media_render.c: dc_i420_scale resizes Y/U/V bilinearly (chroma at half size), so a 640x360 call fits a tile or a full-screen window; dc_i420_to_xrgb converts to 0x00RRGGBB for an XImage with the BT.601 limited-range matrix (Y 16..235, Cb/Cr 16..240) and an optional pixel stride. test_video_render: white/black/red solids, 1:1 identity, 2x up then down with PSNR > 28 dB, corners of the upscale, odd sizes with rounded chroma and stride padding untouched; standalone and ASan/UBSan clean. In-tree build pending: the next make mcde-host carries it.
media_video_packet.c: a frame travels in 1200-byte DC_MEDIA_VIDEO packets with an 8-byte header (start/end/keyframe flags, reserved, frame id, fragment index and count, big-endian) and 1192 data bytes. The reassembler keeps one frame, accepts fragments out of order, ignores duplicates, bounds the frame at 256 KiB and refuses a fragment count that cannot fit, drops an incomplete frame when the next frame id starts and then asks for a keyframe. media_call.c gains dc_call_send_video (fragments + seals while in a call), dc_call_video_out and dc_call_wants_keyframe; drained VIDEO packets feed the reassembler. test_video_packet: 50 KB in 42 fragments in order and reversed with a duplicate, missing fragment -> no frame then wants_keyframe on the next id, bad/oversize fragments refused, and a loopback call where an 11-frame sequence (50 KB each) crosses sealed UDP and reassembles byte-identical in 0.6 ms per frame; standalone and ASan/UBSan clean. In-tree build still pending: make mcde-host was running when this landed.
The plan asks for VP8 640x360 at 15 fps, 500 kbit/s and a keyframe every two seconds; the wrapper now does that (kf_max_dist = 2*fps) and the test prints the measurement: 30 frames in 175.7 ms encode+decode (5.86 ms/frame), 89 KB for 2 s (about 356 kbit/s on the synthetic scene), decoded PSNR > 20 dB. Standalone and ASan/UBSan clean. T7.1 in the task list is video capture (V4L2/uvideo), which is still open; this is the codec part.
Motif 2.3 has wheel translations for XmText and XmList (in MCDE's Motif),
but a custom drawing area in an XmScrolledWindow has none, and buttons 6/7
(a tilt wheel or a touchpad's horizontal scroll) are not even an event type
Xt's translation table knows. DtInitialize now installs
lib/DtSvc/DtUtil2/McdeWheel.c for every CDE program: it hooks the
ButtonPress/ButtonRelease wire conversion (XESetWireToEvent), looks up the
widget under the pointer, scrolls it by three increments in the event loop
(a 0 ms timeout -- the wire conversion must not run scrollbar callbacks, the
first horizontal bar change deadlocked there, measured), and turns the wheel
event into a NoExpose so no widget sees it twice.
- nearest XmScrolledWindow: its vertical/horizontal scrollbar, value moved
and clamped to maximum - sliderSize (XmScrollBar refuses more; measured
warning), XmScrollBarSetValues(notify) -- custom panes, lists, containers
follow their bar;
- XmText: its topCharacter moved by three lines (the scrolled window's bar
does not move a text's view), so dtpad/DtEditor and every text pane scroll;
- a scrollbar under the pointer is moved itself;
- 4 up, 5 down, 6 left, 7 right, Shift+4/5 horizontal too.
Measured on an out-of-tree copy of the configured build (the tree's build
lock was held by another session's release and host runs): the library
builds, and under Xvfb a scrolled XmText with 200 lines
- three times button 4: "text scroll text -3" three times, the view moved
(screenshot: lines 167.. -> 165..);
- nine times button 7: "scroll HorScrollBar 0 -> 3 ... 26", the horizontal
bar moved and stopped at its end without the previous warning or hang;
- buttons 4/5 kept working after the horizontal scroll (before the deferral
the client froze after the first horizontal bar change).
Known limit: XmText's horizontal view does not follow the scrolled window's
horizontal bar (Motif has no public horizontal text scroll); vertical text
and horizontal panes with a real scrollbar work. MCDE_WHEEL_DEBUG=1 prints
the widget, the bars and the values.
The official make mcde-linux and the install into /usr/mdt follow when the
build lock is free; the same configured tree was used for the isolated build.
media_video.c wraps libvpx: VP8, I420, realtime deadline, CBR, error resilience, one keyframe per second, 320x240 at 15 fps and 300 kbit/s by default; dc_vpx_enc_frame returns the packet (0: none, -1: error, too small a buffer refused), dc_vpx_dec_frame copies Y/U/V into the caller's I420 buffer and drops damaged packets (0) or refuses a size that does not match (-1). configure checks vpx/vpx_encoder.h and libvpx as an optional build dependency (HAVE_VPX, VPXLIB); without it the functions answer 'no libvpx' and the test skips. test_video_vp8: 30 frames of a moving square on a gradient, encode/decode round trip, decoded PSNR > 20 dB on the last frame, corrupted packet and plain garbage without a crash, small output buffer and odd dimensions refused; standalone and ASan/UBSan clean with libvpx 1.17.0, and 'no libvpx, skipped' in the stub build. In-tree build pending: make mcde-host was already running when this landed, so the next build carries it.
mcde-linux MCDE_DIRS=plist found four installed names that no PLIST line covered: dt/include/DtChat/DtChat.h, dt/include/DtChat/Ipc.h, dt/lib/libDtChat.la and dt/lib/libDtChatIpc.la (libDtChat was added in the dtchat work but never packaged). The check now reports 3710 installed names, 8907 listed, PLIST ok. Verified with make mcde-linux MCDE_DIRS=install (exit 0) and make mcde-linux MCDE_DIRS=plist (exit 0).
The call now has IDLE, RINGING, IN_CALL and ENDED with dc_call_ring/accept/hangup/tick: RING and ACCEPT cross the wire as sealed control packets, an incoming RING during a call is answered BUSY, an unanswered ring ends after 30 s (dc_call_tick), and audio/PTT are refused outside IN_CALL. An authenticated packet also updates the peer address, so an incoming call is answered on the address it came from (no manual peer needed). test_media_call: audio refused before answer, ring seen on the other side, accept on both, PTT and ten audio frames in the call, hangup ending both sides and stopping audio; standalone and ASan/UBSan clean. Also widened the media packet type range to DC_MEDIA_HANGUP (the PTT fix was incomplete). In-tree build pending: make mcde-linux MCDE_DIRS=install is still running.
The type check in dc_media_seal/open still ended at DC_MEDIA_BYE, so a DC_MEDIA_PTT packet was refused; both now accept it up to DC_MEDIA_PTT. test_media_packet and test_media_call pass.
xmpp_adapter.c speaks protocol v1 on stdio with libstrophe: hello with jid/password/resource/host/port, configure, connect (resource appended to a bare JID), xmpp_run_once in the main loop next to a non-blocking stdin, state connecting/online/offline, text messages in both directions (incoming message events, 'sent' for our own), network/stream errors, clean disconnect and bye. DTCHAT_XMPP_NO_TLS/TRUST_TLS exist for tests. libstrophe 0.14's get_text_ptr() returned NULL for a parsed body, so the adapter uses get_text() and frees it. configure checks strophe.h and libstrophe (MCDE_STROPHE); without it dtchat-xmpp is not built. tests/xmpp_fake.py runs a minimal XMPP server (stream header, SASL PLAIN, resource bind, one message each way) and the adapter passes: online after bind, incoming text and bare-JID conversation, outgoing stanza addressed and delivered, SASL payload, bye and exit 0, no stderr. In-tree build pending: a foreign release chain holds the lock (pid 141722).
McdeSys.h: mcde_sys_net_announce()/poll/ready/stop and mcde_sys_net_watch()/poll/next/close with McdeSysService (name, type, host, TXT, port, gone). mdns_avahi.c uses avahi-client with an own AvahiSimplePoll per handle (no thread; the poll call runs one iteration), publishes an entry group while the daemon runs, frees it for the goodbye, browses and resolves NEW services, queues REMOVE, and survives a missing daemon (AVAHI_CLIENT_NO_FAIL, CONNECTING). mdns_netbsd.c does the same with libdns_sd (DNSServiceRegister with a TXTRecordRef, DNSServiceBrowse, DNSServiceResolve per NEW service, poll on DNSServiceRefSockFD then DNSServiceProcessResult); it compiles against the sysroot with -ldns_sd and has not run on NetBSD. mdns_stub.c answers ENOTSUP when the build has no client. configure checks avahi-client/avahi-common on non-NetBSD with AM_CONDITIONAL MCDE_AVAHI. test_netwatch announces _mcde-test._tcp on 4711 with a TXT record, sees it through its own watch (name, TXT, port, address) and stops the announce; against the running avahi-daemon it reports 'announced and seen' and 'goodbye seen', all ok. test_netwatch is a noinst program and a harness entry. In-tree build pending: a foreign release chain holds the lock (pid 141722).
media_call.c: one UDP socket per call (bound, non-blocking, pollable through dc_call_fd), the two direction keys of T6.3, Opus 48 kHz mono and a jitter buffer. dc_call_drain authenticates every datagram and only then puts it into the buffer; dc_call_audio_out decodes one frame (a lost one becomes PLC), dc_call_audio_in encodes and sends one 20 ms frame, dc_call_send_ptt tells the peer about the key (DC_MEDIA_PTT). The jitter buffer starts after DEPTH frames (3 = 60 ms), reorders, drops duplicates and late frames, turns a proved gap into one frame of length 0 and is bounded by 32 slots. test_media_call: jitter below depth/reorder, loss -> concealment, duplicates/late/oversize, depth clamping, and a real loopback UDP run between two calls (PTT on/off seen, ten frames decoded in order with RMS > 1000, a damaged datagram dropped); standalone and ASan/UBSan clean. In-tree build pending: a foreign release chain holds the lock (pid 141722).
media_packet.c: X25519 key pairs, HKDF-SHA256 over the shared secret with the sorted public keys as salt gives two 32-byte direction keys (the responder mirrors send/recv); ChaCha20-Poly1305 seals the payload with a 12-byte header (version, type, flags, reserved, 32-bit sequence, 32-bit timestamp) as additional data, the nonce is the 64-bit sequence after four zero bytes (fresh keys per session), 16-byte tag, payload at most 1200 bytes. dc_media_replay_ok is the 64-packet RFC 3711 window and is only advanced after the tag verified, so a forged packet cannot move it. test_media_packet: key agreement mirrors, roundtrip with payload and empty payload, changed header/payload/tag/truncation/wrong key refused, out-of-order delivery inside the window accepted once, replays and packets 64 behind refused, window slide, size/type limits and 1000 random payloads round-tripping; standalone and ASan/UBSan clean. In-tree build pending: a foreign release chain holds the lock (pid 141722).
McdeSys.h gains mcde_sys_pcm_open/wait/read/write/close/backend: signed 16-bit interleaved frames, one direction per handle, non-blocking (0 = would block). audio_linux.c drives ALSA (S16_LE, the wanted rate, 20 ms periods, four periods of buffer, EAGAIN -> 0, xrun recovery, snd_pcm_wait); it compiles to ENOTSUP without HAVE_ALSA so the desktop still builds. audio_netbsd.c sets audio(4) (/dev/audio or /dev/sound) to SLINEAR_LE 16 bit with AUDIO_SETINFO and verifies with AUDIO_GETINFO, then polls the descriptor; it compiles against the NetBSD sysroot (-D_NETBSD_SOURCE for u_int, play/record sub-structs) but has not run on NetBSD. audio_null.c is silence in/discard out. configure checks alsa/asoundlib.h+libasound on non-NetBSD (optional, with a warning) and passes ALSA_CPPFLAGS/ALSALIB. test_audio checks the null stream frame by frame (both directions, wrong-direction errors, bad arguments) and tries the real playback/capture device, skipping without a card: standalone and ASan/UBSan pass, and the container's ALSA device played and captured 5 periods each. test_audio is a noinst program and a harness entry. All four files compile with x86_64--netbsd-gcc against destdir.amd64.
media_audio.c wraps libopus for 48 kHz mono, 20 ms frames (960 samples), 24 kbit/s, in-band FEC and a 10 percent loss hint; dc_opus_dec_frame with len 0 conceals a lost frame. configure requires libopus (OPUSLIB). test_audio_opus encodes/decodes 2 s of a 440 Hz sine, checks the frame size, a decoded RMS above half the input, a 3-12 KB budget for 24 kbit/s and a non-silent PLC frame after a loss; standalone and ASan/UBSan clean. libopus 1.6.1 was installed on the build host together with libstrophe, avahi-client and libvpx, so T4/T5.2/T6/T7 are no longer missing libraries. In-tree build pending: a foreign release chain holds the lock (pid 141722).
bin_PROGRAMS now installs dtchat and dtchat-headless; man_MANS installs dtchat.1 (the roff source was renamed from dtchat.man because automake treats .man as section m). The PLIST gains the lines for bin/dtchat, bin/dtchat-headless, app-defaults/C/Dtchat, the three Dtchat icons, appconfig/types/C/dtchat.dt, appmanager/C/Internet/Dtchat, the C and de_DE.UTF-8 dtchat.cat and dt/man/man1/dtchat.1. Verification (make mcde-host MCDE_DIRS=install, mcde-plist-check, pkg_add/pkg_delete) is pending: a foreign release chain holds the lock (pid 141722).
i18n.c opens catopen("dtchat", NL_CAT_LOCALE) and dc_text(id, fallback) reads set 1; the program calls dc_i18n_init after setlocale. The visible labels of the main window, the account editor, the request/peer/file/pair dialogs and the local status texts use ui_text.h ids; dtchat.msg (English) has 75 entries and programs/localized/de_DE.UTF-8/msg/dtchat.msg the German copy (ASCII transliteration, core font). test_i18n builds both catalogs with gencat and checks File/Datei, Send/Senden and the fallback; the German run under Xvfb shows Datei/Bearbeiten/Ansicht/Konversation/Hilfe, In der Naehe and Senden (screenshot build/mcde-shots/dtchat-t104-de.png) and the smoke stays green. Dynamic formatted statuses are partly still English. The in-tree build is pending: a foreign release chain holds the lock (pid 141722).
dtchat.man documents the window and headless modes, --local/--config/--listen/--peer/--downloads, pairing, files, the state directory, DTCHAT_TLS_CA and examples; it renders with groff -man. README.adapters is the short contract for adapter authors: hello and settings schema, commands, events, requests, errors/restart, security and testing, with a Python skeleton. MCDE-PROGRAMS gets a usage paragraph and the document pointers. The man page is not installed yet; T10.6 adds man_MANS and the PLIST line together.
Security review findings: (1) the local peer identity was only a claimed pin; the listener now requests the client certificate and compares the certificate hash that completed the handshake with the pin in hello, refusing a mismatch or a missing certificate, and the client presents its identity certificate (test_local uses real identities: matching, other identity, any). (2) unpaired peers could send file offers; the UI manager carries a paired flag, answers offers from unpaired peers with file-reject 'pairing required' and refuses to send. The review document lists both fixes and the accepted limits (no passphrase, public pins, media nonces later, adapter spawn, file names, QR, parser limits). Standalone: test_local, test_filexfer, tests/p2p.sh and the UI pairing/message run pass with the changes. The in-tree build is pending because another release chain holds the lock (pid 4040149).