add server/client (S/C) indicator based on ETCP_LINK.is_server in connection monitor, member detail, and Android JSON

This commit is contained in:
evgeny committed 2026-08-10 10:47:52 +03:00
1 parent cf956cf2f0
commit 496f0f7d2b
4 files changed
+29 -32

No files matched your search

@@ -812,6 +812,14 @@ char* utun_bridge_get_member_detail_json(const char* channel_id, uint64_t node_i
}
char peers_tbl[80]; peers_table_name(channel_id, peers_tbl, sizeof(peers_tbl));
{ /* server/client role */
struct ETCP_CONN* detail_conn = NULL;
if (g_cc.inst) detail_conn = instance_find_conn(g_cc.inst, node_id);
const char* sc = (detail_conn && detail_conn->links)
? (detail_conn->links->is_server ? "S" : "C") : "";
pos += (size_t)snprintf(buf + pos, sizeof(buf) - pos, ",\"sc\":\"%s\"", sc);
}
snprintf(buf + pos, sizeof(buf) - pos, ",\"adr\":["); pos += strlen(buf + pos);
if (sqlite3_prepare_v2(db,