forked from cory/tildefriends
Cleans up some confusing output from -t ssb.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3660 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
e85168ac53
commit
91ec68252d
@ -13,7 +13,6 @@ ssb.registerConnectionsChanged(function(change, connection) {
|
|||||||
var out_message = {};
|
var out_message = {};
|
||||||
out_message[id] = blob.byteLength;
|
out_message[id] = blob.byteLength;
|
||||||
g_wants_requests[connection.id].send_json(out_message);
|
g_wants_requests[connection.id].send_json(out_message);
|
||||||
//connection.wants_request.send_json(out_message);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debug_print("blobs.get", id);
|
debug_print("blobs.get", id);
|
||||||
|
@ -582,6 +582,9 @@ static void _tf_ssb_connection_verify_identity(tf_ssb_connection_t* connection,
|
|||||||
char fullid[k_id_base64_len];
|
char fullid[k_id_base64_len];
|
||||||
tf_ssb_id_bin_to_str(fullid, sizeof(fullid), connection->serverpub);
|
tf_ssb_id_bin_to_str(fullid, sizeof(fullid), connection->serverpub);
|
||||||
|
|
||||||
|
JSContext* context = connection->ssb->context;
|
||||||
|
JS_SetPropertyStr(context, connection->object, "id", JS_NewString(context, fullid));
|
||||||
|
|
||||||
connection->state = k_tf_ssb_state_verified;
|
connection->state = k_tf_ssb_state_verified;
|
||||||
for (int i = 0; i < connection->ssb->connections_changed_count; i++) {
|
for (int i = 0; i < connection->ssb->connections_changed_count; i++) {
|
||||||
connection->ssb->connections_changed[i](connection->ssb, k_tf_ssb_change_connect, connection, connection->ssb->connections_changed_user_data[i]);
|
connection->ssb->connections_changed[i](connection->ssb, k_tf_ssb_change_connect, connection, connection->ssb->connections_changed_user_data[i]);
|
||||||
@ -767,6 +770,12 @@ static void _tf_ssb_connection_verify_client_identity(tf_ssb_connection_t* conne
|
|||||||
static_assert(sizeof(c) == 80, "server send size");
|
static_assert(sizeof(c) == 80, "server send size");
|
||||||
_tf_ssb_write(connection, c, sizeof(c));
|
_tf_ssb_write(connection, c, sizeof(c));
|
||||||
|
|
||||||
|
char fullid[k_id_base64_len];
|
||||||
|
tf_ssb_id_bin_to_str(fullid, sizeof(fullid), connection->serverpub);
|
||||||
|
|
||||||
|
JSContext* context = connection->ssb->context;
|
||||||
|
JS_SetPropertyStr(context, connection->object, "id", JS_NewString(context, fullid));
|
||||||
|
|
||||||
connection->state = k_tf_ssb_state_server_verified;
|
connection->state = k_tf_ssb_state_server_verified;
|
||||||
for (int i = 0; i < connection->ssb->connections_changed_count; i++) {
|
for (int i = 0; i < connection->ssb->connections_changed_count; i++) {
|
||||||
connection->ssb->connections_changed[i](connection->ssb, k_tf_ssb_change_connect, connection, connection->ssb->connections_changed_user_data[i]);
|
connection->ssb->connections_changed[i](connection->ssb, k_tf_ssb_change_connect, connection, connection->ssb->connections_changed_user_data[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user