Browse Source

Minor source code style change of comments.

Signed-off-by: Saibato <saibato.naga@pm.me>
travis-debug
Saibato 5 years ago
committed by Christian Decker
parent
commit
9824c14c9b
  1. 11
      connectd/tor.c

11
connectd/tor.c

@ -30,7 +30,7 @@
#define SOCK_REQ_V5_LEN 5 #define SOCK_REQ_V5_LEN 5
#define SOCK_REQ_V5_HEADER_LEN 7 #define SOCK_REQ_V5_HEADER_LEN 7
/* some crufts can not forward ipv6*/ /* some crufts can not forward ipv6 */
#undef BIND_FIRST_TO_IPV6 #undef BIND_FIRST_TO_IPV6
struct connecting_socks { struct connecting_socks {
@ -43,7 +43,7 @@ struct connecting_socks {
static const char* socks5strerror(const tal_t *ctx, u8 code) static const char* socks5strerror(const tal_t *ctx, u8 code)
{ {
// Error codes defined in https://tools.ietf.org/html/rfc1928#section-6 /* Error codes defined in https://tools.ietf.org/html/rfc1928#section-6 */
switch (code) { switch (code) {
case 0: case 0:
return tal_strdup(ctx, "success"); return tal_strdup(ctx, "success");
@ -134,8 +134,9 @@ static struct io_plan *io_tor_connect_after_resp_to_connect(struct io_conn
status_io(LOG_IO_IN, NULL, "proxy", connect->buffer, 2); status_io(LOG_IO_IN, NULL, "proxy", connect->buffer, 2);
if (connect->buffer[1] == SOCKS_ERROR) { if (connect->buffer[1] == SOCKS_ERROR) {
// The Tor socks5 server did not like any of our authentication /* The Tor socks5 server did not like any of our authentication
// methods and we provided only "no auth". * methods and we provided only "no auth".
*/
status_debug("Connected out for %s error: authentication required", status_debug("Connected out for %s error: authentication required",
connect->host); connect->host);
return io_close(conn); return io_close(conn);
@ -187,7 +188,7 @@ static struct io_plan *io_tor_connect_do_req(struct io_conn *conn,
&io_tor_connect_after_req_to_connect, connect); &io_tor_connect_after_req_to_connect, connect);
} }
// called when we want to connect to TOR SOCKS5 /* called when we want to connect to TOR SOCKS5 */
struct io_plan *io_tor_connect(struct io_conn *conn, struct io_plan *io_tor_connect(struct io_conn *conn,
const struct addrinfo *tor_proxyaddr, const struct addrinfo *tor_proxyaddr,
const char *host, u16 port, const char *host, u16 port,

Loading…
Cancel
Save