diff --git a/src/apps/relay/turncli.c b/src/apps/relay/turncli.c index eef8212..c88b509 100644 --- a/src/apps/relay/turncli.c +++ b/src/apps/relay/turncli.c @@ -1377,8 +1377,17 @@ static void write_https_echo(ioa_socket_handle s) } static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) { + //TODO - UNUSED_ARG(nbh); + + if(turn_params.verbose) { + if(nbh) { + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: HTTPS connection input: %s\n", __FUNCTION__, (char*)ioa_network_buffer_data(nbh)); + } else { + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: HTTPS connection initial input\n", __FUNCTION__); + } + } + write_https_echo(s); } diff --git a/src/server/ns_turn_server.c b/src/server/ns_turn_server.c index b8cc972..abf2909 100644 --- a/src/server/ns_turn_server.c +++ b/src/server/ns_turn_server.c @@ -4441,7 +4441,10 @@ static int read_client_connection(turn_turnserver *server, if(sat == HTTP_CLIENT_SOCKET) { - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: HTTP connection input: %s\n", __FUNCTION__, (char*)ioa_network_buffer_data(in_buffer->nbh)); + if(server->verbose) { + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: HTTP connection input: %s\n", __FUNCTION__, (char*)ioa_network_buffer_data(in_buffer->nbh)); + } + handle_http(ss->client_socket); } else if(sat == HTTPS_CLIENT_SOCKET) { @@ -4549,7 +4552,9 @@ static int read_client_connection(turn_turnserver *server, } } else { set_ioa_socket_app_type(ss->client_socket,HTTP_CLIENT_SOCKET); - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: %s request: %s\n", __FUNCTION__, proto, (char*)ioa_network_buffer_data(in_buffer->nbh)); + if(server->verbose) { + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "%s: %s request: %s\n", __FUNCTION__, proto, (char*)ioa_network_buffer_data(in_buffer->nbh)); + } handle_http(ss->client_socket); } return 0;