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

Replace perror() with lwsl_warn()

Use the general logging function for printing error messages.
This commit is contained in:
Patrick Gansterer 2014-02-26 19:52:11 +01:00 committed by Andy Green
parent b37bd6ce5c
commit 7769a2d07e

View file

@ -539,14 +539,14 @@ libwebsockets_get_peer_addresses(struct libwebsocket_context *context,
len = sizeof(sin);
if (getpeername(fd, (struct sockaddr *) &sin, &len) < 0) {
perror("getpeername");
lwsl_warn("getpeername: %s\n", strerror(errno));
goto bail;
}
host = gethostbyaddr((char *) &sin.sin_addr, sizeof(sin.sin_addr),
AF_INET);
if (host == NULL) {
perror("gethostbyaddr");
lwsl_warn("gethostbyaddr: %s\n", strerror(errno));
goto bail;
}