diff --git a/src/algo_utils.c b/src/algo_utils.c index a9e6c12..f8b7a04 100644 --- a/src/algo_utils.c +++ b/src/algo_utils.c @@ -38,10 +38,11 @@ struct buffer_packet* get_read_buffer(struct algo_ctx *app_ctx, struct evt_core_ int waiting_count = 0; g_hash_table_foreach(app_ctx->write_waiting, (GHFunc)iterate, &waiting_count); g_hash_table_foreach(app_ctx->used_buffer, (GHFunc)iterate2, NULL); - fprintf(stderr, "total_buffers=%d, used_buffers=%d. free_buffer=%d, waiting_buffer=%d.\n", + fprintf(stderr, "total_buffers=%d, free_buffer=%d, used_buffers=%d, app_buffer=%d, write_buffer=%d.\n", PACKET_BUFFER_SIZE, - g_hash_table_size(app_ctx->used_buffer), app_ctx->free_buffer->length, + g_hash_table_size(app_ctx->used_buffer), + g_hash_table_size(app_ctx->application_waiting), waiting_count); // 2.1 If no buffer is available, we subscribe to be notified later g_queue_push_tail (app_ctx->read_waiting, &(fdinfo->fd)); diff --git a/src/socks5.c b/src/socks5.c index a519965..1351cc4 100644 --- a/src/socks5.c +++ b/src/socks5.c @@ -42,10 +42,7 @@ int socks5_reply(int sock) { int res; struct server_reply sr = {0}; res = read_entity(sock, &sr, sizeof(uint8_t) * 4); - if (res == -1) { - perror("read_entity"); - exit(EXIT_FAILURE); - } + if (res == -1) goto read_error; switch(sr.atyp) { case ATYP_IPV4: