| 21 | } |
| 22 | |
| 23 | static 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 | |
| 36 | static char *tor_response_line_wfail(struct rbuf *rbuf) |
| 37 | { |
no test coverage detected