Browse Source

update log info

pull/14/head
Max Lv 11 years ago
parent
commit
76940df8d1
2 changed files with 4 additions and 7 deletions
  1. 3
      src/local.c
  2. 8
      src/udprelay.c

3
src/local.c

@ -615,9 +615,6 @@ static void accept_cb (EV_P_ ev_io *w, int revents) {
hints.ai_family = AF_UNSPEC; hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
int index = rand() % listener->remote_num; int index = rand() % listener->remote_num;
if (verbose) {
LOGD("connect to remote: %s", listener->remote_host[index]);
}
int err = getaddrinfo(listener->remote_host[index], listener->remote_port, &hints, &res); int err = getaddrinfo(listener->remote_host[index], listener->remote_port, &hints, &res);
if (err) { if (err) {
ERROR("getaddrinfo"); ERROR("getaddrinfo");

8
src/udprelay.c

@ -380,6 +380,10 @@ static void remote_recv_cb (EV_P_ ev_io *w, int revents) {
return; return;
} }
if (verbose) {
LOGD("[udp] remote receive a packet");
}
// triger the timer // triger the timer
ev_timer_again(EV_A_ &remote_ctx->watcher); ev_timer_again(EV_A_ &remote_ctx->watcher);
@ -400,10 +404,6 @@ static void remote_recv_cb (EV_P_ ev_io *w, int revents) {
goto CLEAN_UP; goto CLEAN_UP;
} }
if (verbose) {
LOGD("[udp] remote receive a packet.");
}
#ifdef UDPRELAY_LOCAL #ifdef UDPRELAY_LOCAL
buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method); buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method);

Loading…
Cancel
Save