From 041e63ac702bbc787ede0fd845eefa80edb69f0b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 13 Nov 2022 22:30:09 +0000 Subject: [PATCH] First actual successful communication through a room. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4039 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ssb.c b/src/ssb.c index 323a4edd..1bdd09d2 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -294,7 +294,9 @@ static void _tf_ssb_connection_on_write(uv_write_t* req, int status) if (status) { tf_ssb_connection_t* connection = req->data; - _tf_ssb_connection_close(connection, "write failed asynchronously"); + char buffer[256]; + snprintf(buffer, sizeof(buffer), "write failed asynchronously: %s", uv_strerror(status)); + _tf_ssb_connection_close(connection, buffer); } tf_free(req); } @@ -2152,7 +2154,7 @@ tf_ssb_connection_t* tf_ssb_connection_tunnel_create(tf_ssb_t* ssb, const char* NULL, tunnel, tunnel); - if (request_number < 0) + if (request_number > 0) { tunnel->state = k_tf_ssb_state_connected; _tf_ssb_connection_client_send_hello(tunnel);