1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

snprintf: move contributed ssl patch to lws_snprintf

This commit is contained in:
Andy Green 2017-05-03 20:25:16 +08:00
parent d1aa92011b
commit f13db3e722

View file

@ -122,13 +122,13 @@ char* lws_ssl_get_error_string(int status, int ret, char *buf, size_t len) {
case SSL_ERROR_SYSCALL:
switch (ret) {
case 0:
snprintf(buf, len, "SSL_ERROR_SYSCALL: EOF");
lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: EOF");
return buf;
case -1:
#ifndef LWS_PLAT_OPTEE
snprintf(buf, len, "SSL_ERROR_SYSCALL: %s", strerror(errno));
lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: %s", strerror(errno));
#else
snprintf(buf, len, "SSL_ERROR_SYSCALL: %d", errno);
lws_snprintf(buf, len, "SSL_ERROR_SYSCALL: %d", errno);
#endif
return buf;
default: