MCPcopy Create free account
hub / github.com/ElementsProject/lightning / tor_response_line

Function tor_response_line

connectd/tor_autoservice.c:60–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static char *tor_response_line(struct rbuf *rbuf)
61{
62 char *line;
63
64 while ((line = rbuf_read_str(rbuf, '\n')) != NULL) {
65 status_io(LOG_IO_IN, NULL, "torcontrol", line, strlen(line));
66
67 /* Weird response */
68 if (!strstarts(line, "250"))
69 status_failed(STATUS_FAIL_INTERNAL_ERROR,
70 "Tor returned '%s'", line);
71
72 /* Last line */
73 if (strstarts(line, "250 "))
74 break;
75
76 return line + 4;
77 }
78 return NULL;
79}
80
81static void discard_remaining_response(struct rbuf *rbuf)
82{

Callers 3

make_onionFunction · 0.85
negotiate_authFunction · 0.85

Calls 3

rbuf_read_strFunction · 0.85
status_ioFunction · 0.85
status_failedFunction · 0.50

Tested by

no test coverage detected