Skip to content

Commit

Permalink
Nice the code ...
Browse files Browse the repository at this point in the history
Signed-off-by: Saibato <saibato.naga@pm.me>
  • Loading branch information
Saibato committed Oct 14, 2019
1 parent d2e30f9 commit ea68f2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions common/wireaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ bool parse_wireaddr_internal(const char *arg, struct wireaddr_internal *addr,
*err_msg = "Blob too short";
return false;
}
temp = tal_fmt(tmpctx, "%s", arg + strlen ("statictor:"));
temp = tal_fmt(tmpctx, "%s", arg + strlen("statictor:"));
*(strstr(temp, ":torblob:")) = '\0';
return parse_wireaddr(temp,
&addr->u.torservice, 9151,
Expand All @@ -498,7 +498,7 @@ bool parse_wireaddr_internal(const char *arg, struct wireaddr_internal *addr,
addr->itype = ADDR_INTERNAL_STATICTOR;
memset(&(addr->blob[0]), 0, sizeof(addr->blob));
strncpy(&(addr->blob[0]), tal_fmt(tmpctx, TOR_UNIQUE_STRING), strlen(TOR_UNIQUE_STRING));
return parse_wireaddr( arg + strlen ("statictor:"),
return parse_wireaddr( arg + strlen("statictor:"),
&addr->u.torservice, 9151,
dns_ok ? NULL : &needed_dns,
err_msg);
Expand Down
3 changes: 2 additions & 1 deletion common/wireaddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ struct wireaddr_internal {
struct wireaddr wireaddr;
/* ADDR_INTERNAL_ALLPROTO */
u16 port;
/* ADDR_INTERNAL_AUTOTOR/STATICTOR service address */
/* ADDR_INTERNAL_AUTOTOR
* ADDR_INTERNAL_STATICTOR */
struct wireaddr torservice;
/* ADDR_INTERNAL_FORPROXY */
struct unresolved {
Expand Down
5 changes: 1 addition & 4 deletions connectd/connectd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,6 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx,
for (size_t i = 0; i < tal_count(proposed_wireaddr); i++) {
struct wireaddr_internal wa = proposed_wireaddr[i];



/* We want announce-only addresses. */
if (proposed_listen_announce[i] & ADDR_LISTEN)
continue;
Expand Down Expand Up @@ -1222,8 +1220,7 @@ static struct io_plan *connect_init(struct io_conn *conn,
&proxyaddr, &daemon->use_proxy_always,
&daemon->dev_allow_localhost, &daemon->use_dns,
&tor_password,
&daemon->use_v3_autotor
)) {
&daemon->use_v3_autotor)) {
/* This is a helper which prints the type expected and the actual
* message, then exits (it should never be called!). */
master_badmsg(WIRE_CONNECTCTL_INIT, msg);
Expand Down

0 comments on commit ea68f2d

Please sign in to comment.