diff --git a/src/algo_naive.c b/src/algo_naive.c index 1b1b7bb..9a05e73 100644 --- a/src/algo_naive.c +++ b/src/algo_naive.c @@ -127,6 +127,8 @@ void mv_buffer_rtow(struct naive_ctx* app_ctx, } void mv_buffer_wtor(struct naive_ctx* app_ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp) { + bp->mode = BP_READING; + bp->aread = 0; g_queue_push_tail (app_ctx->free_buffer, bp); g_hash_table_remove(app_ctx->used_buffer, &(fdinfo->fd)); } @@ -171,7 +173,7 @@ void on_tcp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { mv_buffer_wtor (app_ctx, fdinfo, bp); return; } - printf("Pass packet from %s to %s\n", fdinfo->url, url); + //printf("Pass packet from %s to %s\n", fdinfo->url, url); // 4. We move the buffer and notify the target mv_buffer_rtow (app_ctx, fdinfo, to_fdinfo, bp); @@ -233,7 +235,7 @@ void on_udp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { mv_buffer_wtor (app_ctx, fdinfo, bp); return; } - printf("Pass packet from %s to %s\n", fdinfo->url, url); + //printf("Pass packet from %s to %s\n", fdinfo->url, url); // 4. We move the buffer and notify the target mv_buffer_rtow (app_ctx, fdinfo, to_fdinfo, bp); diff --git a/src/donar_client.c b/src/donar_client.c index 29f053c..fa9cf14 100644 --- a/src/donar_client.c +++ b/src/donar_client.c @@ -107,6 +107,7 @@ on_socks5_err: perror("An error occured while connecting to an Onion Service"); app_ctx->client_sock[pos].state = SOCKS5_STATE_ERR; evt_core_rm_fd (ctx, fdinfo->fd); + sleep(2); init_tcp_client (app_ctx, pos); } diff --git a/torrc_simple b/torrc_simple index 6bfc4e3..0467d56 100644 --- a/torrc_simple +++ b/torrc_simple @@ -1,5 +1,4 @@ ControlPort 9051 UseEntryGuards 0 SafeLogging 0 -SocksPort 9050 OnionTrafficOnly CacheDNS UseDNSCache - +#Log INFO stdout