| 395 | |
| 396 | PN_PRINTF_FORMAT_ATTR(2, 3) |
| 397 | static void ssl_log_error_status(HRESULT status, PN_PRINTF_FORMAT const char *fmt, ...) |
| 398 | { |
| 399 | char buf[512]; |
| 400 | va_list ap; |
| 401 | |
| 402 | if (fmt) { |
| 403 | va_start(ap, fmt); |
| 404 | ssl_vlog(NULL, PN_LEVEL_ERROR, fmt, ap); |
| 405 | va_end(ap); |
| 406 | } |
| 407 | |
| 408 | if (FormatMessage(FORMAT_MESSAGE_MAX_WIDTH_MASK | FORMAT_MESSAGE_FROM_SYSTEM, |
| 409 | 0, status, 0, buf, sizeof(buf), 0)) |
| 410 | ssl_log_error("%s", buf); |
| 411 | else |
| 412 | ssl_log_error("Internal Windows error: %x for %x", GetLastError(), status); |
| 413 | } |
| 414 | |
| 415 | static void ssl_log_clear_data(pn_transport_t *transport, const char *data, size_t len) |
| 416 | { |
no test coverage detected