- New files: transport_layer/socket_monitor.c/h — socket state monitoring with per-instance ctx
- etcp_api: expose get_latency/1s_pkt_count measuring, add etcp_hashrnd for tests
- utun_instance: store socket_monitor per instance, add is_socket_ok check
- topo_node: detect IPv4 addresses with port from listening sockets
- topo_group: use node_name for display in routes
- Makefile.am: add socket_monitor.c to build
getifaddrs() ifa_flags contains interface flags (IFF_UP etc.), NOT address
flags (IFA_F_TEMPORARY). Since IFA_F_TEMPORARY == IFA_F_SECONDARY == 0x01,
and 0x01 in interface flags is IFF_UP, ALL addresses appeared as 'temporary',
making the permanent>temporary priority non-functional.
New netlink-based get_interface_ipv6_addr_nl() reads real IFA_FLAGS from
RTM_GETADDR response, correctly identifying:
- Temporary: IFA_F_TEMPORARY=1, IFA_F_MANAGETEMPADDR=0
- Stable/mngtmp: IFA_F_TEMPORARY=1, IFA_F_MANAGETEMPADDR=1
- Legacy static: IFA_F_TEMPORARY=0
Verified: wlo1 permanent (3a7a:eff:fef5:9637) now correctly selected
for prefer_stable=1, temporary (1fb5:b7c:7538:dcf4) for prefer_stable=0.
- CM_V6_ANY for :: socket (matches all v6 addr classes)
- sin6_scope_id from s->netif_index (not from local_addr where :: has scope=0)
- getnameinfo in stcp_link_connect to preserve scope_id in addr string
- scope_id in cm_invite_tcp_connect, ncd_create_links, connect_create_links_v6, cm_bg_ping_to_node
Android chatgui:
- New MemberListScreen with member list, detail card, edit dialog
- Link status dots (green/red/grey) per address in detail card (1s poll)
- Self-node name coloured green
- ChatScreen: people icon in TopAppBar
IPv6 autoconnect fixes (3 bugs in conn_mgr/topo):
- topo_node_sqlite_node_load: load v6 addresses from DB
- topo_node_registry_store: merge v6_addrs into existing node
- cm_sock_v6_classify: wildcard [::] treated as CM_V6_DIR
- cm_add_v6_link: htons(port) was missing
Memory fixes:
- strdup→u_strdup in bridge (7 instances)
- u_realloc cap update before success check (3 instances)
- char sql[256]→[512] for truncated SELECT
Chat member hash now includes addresses for change detection
Linux chatgui:
- Link status dots in AccountList detail panel (1s poll)
- Self-node name in green in member list
- ncd_down_cb: defer callback removal+close via uasync_call_soon to avoid
UAF in etcp_cbk_fire iteration (removing ncd_up_cb corrupts saved next ptr)
- ncd_recv_control_handler: use deferred close for CLOSE handlers instead of
direct etcp_connection_close to avoid nested etcp_cbk_fire UAF
- node_conn_direct_open/open_node: use ni->node_name if available for
conn name, fallback to 'n_<node_id>' instead of NULL
- init_connections: build ni_tmp in link loop with only current link's addr,
preventing NCD from creating links for ALL addrs on first socket
- utun_instance_reload: same per-link ni_tmp fix
- init_connections/reload: set ni_tmp.node_name = client->name for
test find_client_link by name
- db_record_insert_cascade: unified insert with on_insert + PUSH cascade
- SYNC_DONE moved from INIT_RESP to DATA handler (master sends after slave response)
- db_sync_add/remove_done_cbk: global sync-completion subscription (etcp pattern)
- REQUEST_SYNC handler: sync_state != 1 instead of == 0
- SYNC_DONE mc==pc hash mismatch: accept as converged
- Removed unconditional sync_state=2 from DATA handler
- test: done_cbk for sync phases, count-only for PUSH phases, removed dead B<>C reinitiate
- Fix NULL block_data deref in stream_send_chunk_cb
- Test B1: create file in <db_dir>/media/, commit to media_files
- Store media_base in ui_state for streaming handler path resolution
- 8/9 tests pass (streaming works but timing issue with SUPER_REPL flood)
- md_handle_block_req: real chunk streaming via etcp_router_on_send_ready
- stream_ctx state machine: backpressure waiter → send chunk → repeat
- content_hash + block_sig on stream completion
- Fallback to author when supernode has no block info
- media_download: author_node_id for peer fallback
- test_media_delivery_full: 8/9 pass (SUPER_HELLO, HAVE_BLOCK, replication, admission, file create)
- Known issue: streaming test hung (BGP route for n1→n2 not established in time)
VoiceBubble is now a pure renderer — no local state, no LaunchedEffect, no timer.
All state from ViewModel.playbackState StateFlow:
- playing/paused/elapsedMs/progress/filePath — one atomic snapshot
- isActive = playbackState.filePath == message.filePath — only active clip shows cursor
- onProgress callback from AudioRecorderManager feeds real elapsed into ViewModel
- ViewModel timer (80ms) updates progress between onProgress callbacks
Removed: VoiceBubble's playing/paused/seekVersion/PlayState/onDone/onPaused.
Removed: AudioRecorderManager's isPaused/elapsedMs/pausedElapsedMs.
stopped flag was set before join() but cleared after, causing race:
if thread was still blocked in decodeRead when stopped was reset,
onComplete fired anyway. Monotonic playGeneration ++ never decreases,
thread captures myGen at start, compares after completion —
correctly skipped if generation changed (another stop/seek started).
PlayState data class bundles playId, elapsedMs, progress into one atomic snapshot.
LaunchedEffect keyed on playId — when it changes (seek/resume), the timer reads
elapsedMs and progress from the SAME snapshot, eliminating the race between
seekVersion++ and elapsedMs=seekMs.
When playing=true and seek happens, LaunchedEffect(playing) key didn't change,
so the elapsed timer kept using the old start time. Added seekVersion counter
as second key — increments on waveform tap and play/resume click, forcing
the timer coroutine to restart with the new elapsedMs position.
When stopPlayback/pausePlayback kills the playback thread, the thread's
onComplete callback was still firing, resetting UI state (playing=false,
elapsed=0). Added @Volatile 'stopped' flag — onComplete only fires on
natural completion, not on external stop/pause.
- Canvas pointerInput moved to wrapping Box (state updates trigger recomposition)
- showCursor = playing || paused (cursor and white bars visible on pause)
- elapsed/dur stays visible on pause too
- ViewModel: _currentPlayingPath tracks active track. Tap same → stop.
Tap different → stop old, play new. onComplete clears currentPlayingPath.
- AudioRecorderManager: stopPlayback() already called at start (existing)
- VoiceBubble: simplified click, always sends to ViewModel for state management
- inputbar.cpp: CSV waveform → base64 log-scale (same as voice_recorder.c)
- messagelist.cpp: sendVoiceMessage removes displayName|dur_sec| prefix, uses wfStr directly
setVoiceMessageRoles: decodes new format wf={base64};dur={ms};|... from data field
- messagedelegate.cpp: waveform values now pre-normalized 0..1, no log recalculation needed
- VoiceEncoder: no changes needed (was already compatible)
Both platforms now store identical format in chat_msg_submit.data:
wf=ABCDef...100chars;dur=NNNN;|file_size|block_size|num_blocks|sigs_hex