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

Function tor_send_cmd

connectd/tor_autoservice.c:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23static void tor_send_cmd(struct rbuf *rbuf, const char *cmd)
24{
25 status_io(LOG_IO_OUT, NULL, "torcontrol", cmd, strlen(cmd));
26 if (!write_all(rbuf->fd, cmd, strlen(cmd)))
27 status_failed(STATUS_FAIL_INTERNAL_ERROR,
28 "Writing '%s' to Tor socket", cmd);
29
30 status_io(LOG_IO_OUT, NULL, "torcontrol", "\r\n", 2);
31 if (!write_all(rbuf->fd, "\r\n", 2))
32 status_failed(STATUS_FAIL_INTERNAL_ERROR,
33 "Writing CRLF to Tor socket");
34}
35
36static char *tor_response_line_wfail(struct rbuf *rbuf)
37{

Callers 3

make_onionFunction · 0.85
make_fixed_onionFunction · 0.85
negotiate_authFunction · 0.85

Calls 3

status_ioFunction · 0.85
write_allFunction · 0.50
status_failedFunction · 0.50

Tested by

no test coverage detected