Finish removing connection-level policy arguments

This commit is contained in:
evgeny committed 2026-10-30 22:50:12 +01:00
1 parent 5eb0701a41
commit 16b1003710
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -160,7 +160,7 @@ int main(void) {
invite.reality.has = 1; memcpy(invite.reality.server_pubkey, server->my_keys.public_key, 32);
snprintf(invite.reality.server_name, sizeof(invite.reality.server_name), "example.org"); invite.addrs[3].proto = 6;
CHECK(invite_link_encode(&invite, NULL, invitation, sizeof(invitation)) > 0);
conn = etcp_connection_create(inst, "join fault transport", 0); CHECK(conn);
conn = etcp_connection_create(inst, "join fault transport"); CHECK(conn);
conn->peer_node_id = peer; CHECK(!etcp_conn_index_peer(conn));
CHECK(sc_init_ctx(&conn->crypto_ctx, &inst->my_keys) == SC_OK);
CHECK(sc_set_peer_public_key(&conn->crypto_ctx, invite.pubkey, SC_PEER_PUBKEY_BIN) == SC_OK);
@@ -168,7 +168,7 @@ int main(void) {
struct NODE_CONN_DIRECT* other_owner = NULL;
CHECK(node_conn_direct_open(inst, peer, NULL, NULL, &other_owner, NULL) != NCD_ERR);
uasync_drain_immediate(ua);
server_conn = etcp_connection_create(server, "join server fixture", 0); CHECK(server_conn);
server_conn = etcp_connection_create(server, "join server fixture"); CHECK(server_conn);
server_conn->peer_node_id = inst->node_id; CHECK(!etcp_conn_index_peer(server_conn));
CHECK(sc_init_ctx(&server_conn->crypto_ctx, &server->my_keys) == SC_OK);
CHECK(sc_set_peer_public_key(&server_conn->crypto_ctx, inst->my_keys.public_key, SC_PEER_PUBKEY_BIN) == SC_OK);
+1 -1
View File
@@ -143,7 +143,7 @@ static int attach(struct ble_etcp_link* c, const uint8_t* key) {
int created = 0;
if (conn && (conn->close_requested || conn->state == 2)) { fail(c, "ETCP connection is closing"); return -1; }
if (!conn) {
conn = etcp_connection_create(d->instance, "ble", d->require_known_node);
conn = etcp_connection_create(d->instance, "ble");
if (!conn) { fail(c, "ETCP allocation failed"); return -1; }
created = 1;
if (etcp_connection_set_peer(conn, key) || etcp_conn_index_peer(conn)) {