Replaced perror with DEBUG_WARN
This commit is contained in:
parent
2436e41e63
commit
bcb5f90ee6
@ -104,7 +104,7 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
|
||||
#ifdef _WIN32
|
||||
_tprintf(_T("getaddrinfo error: %s\n"), gai_strerror(status));
|
||||
#else
|
||||
perror("getaddrinfo");
|
||||
DEBUG_WARN("getaddrinfo");
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
@ -118,14 +118,14 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
|
||||
|
||||
if (sockfd == -1)
|
||||
{
|
||||
perror("socket");
|
||||
DEBUG_WARN("socket");
|
||||
continue;
|
||||
}
|
||||
|
||||
option_value = 1;
|
||||
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*) &option_value, sizeof(option_value)) == -1)
|
||||
perror("setsockopt");
|
||||
DEBUG_WARN("setsockopt");
|
||||
|
||||
#ifndef _WIN32
|
||||
fcntl(sockfd, F_SETFL, O_NONBLOCK);
|
||||
@ -142,7 +142,7 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
|
||||
_tprintf(L"bind() failed with error: %u\n", WSAGetLastError());
|
||||
WSACleanup();
|
||||
#else
|
||||
perror("bind");
|
||||
DEBUG_WARN("bind");
|
||||
close(sockfd);
|
||||
#endif
|
||||
continue;
|
||||
@ -152,7 +152,7 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
|
||||
|
||||
if (status != 0)
|
||||
{
|
||||
perror("listen");
|
||||
DEBUG_WARN("listen");
|
||||
close(sockfd);
|
||||
continue;
|
||||
}
|
||||
@ -186,7 +186,7 @@ static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char*
|
||||
|
||||
if (sockfd == -1)
|
||||
{
|
||||
perror("socket");
|
||||
DEBUG_WARN("socket");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char*
|
||||
|
||||
if (status != 0)
|
||||
{
|
||||
perror("bind");
|
||||
DEBUG_WARN("bind");
|
||||
close(sockfd);
|
||||
return FALSE;
|
||||
}
|
||||
@ -209,7 +209,7 @@ static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char*
|
||||
|
||||
if (status != 0)
|
||||
{
|
||||
perror("listen");
|
||||
DEBUG_WARN("listen");
|
||||
close(sockfd);
|
||||
return FALSE;
|
||||
}
|
||||
@ -306,7 +306,7 @@ static BOOL freerdp_listener_check_fds(freerdp_listener* instance)
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
continue;
|
||||
#endif
|
||||
perror("accept");
|
||||
DEBUG_WARN("accept");
|
||||
if (client)
|
||||
free(client);
|
||||
return FALSE;
|
||||
|
@ -460,7 +460,7 @@ int credssp_server_authenticate(rdpCredssp* credssp)
|
||||
|
||||
if (!hSSPI)
|
||||
{
|
||||
_tprintf(_T("Failed to load SSPI module: %s\n"), credssp->SspiModule);
|
||||
DEBUG_WARN("Failed to load SSPI module: %s\n", credssp->SspiModule);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1397,7 +1397,7 @@ rdpCredssp* credssp_new(freerdp* instance, rdpTransport* transport, rdpSettings*
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
_tprintf(_T("Using SSPI Module: %s\n"), credssp->SspiModule);
|
||||
DEBUG_WARN("Using SSPI Module: %s\n", credssp->SspiModule);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
@ -667,7 +667,7 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
|
||||
if (setsockopt(tcp->sockfd, SOL_SOCKET, SO_KEEPALIVE, (void*) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() SOL_SOCKET, SO_KEEPALIVE:");
|
||||
DEBUG_WARN("setsockopt() SOL_SOCKET, SO_KEEPALIVE:");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -677,7 +677,7 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
|
||||
if (setsockopt(tcp->sockfd, IPPROTO_TCP, TCP_KEEPIDLE, (void*) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() IPPROTO_TCP, TCP_KEEPIDLE:");
|
||||
DEBUG_WARN("setsockopt() IPPROTO_TCP, TCP_KEEPIDLE:");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
@ -688,7 +688,7 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
|
||||
if (setsockopt(tcp->sockfd, SOL_TCP, TCP_KEEPCNT, (void *) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() SOL_TCP, TCP_KEEPCNT:");
|
||||
DEBUG_WARN("setsockopt() SOL_TCP, TCP_KEEPCNT:");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
@ -699,7 +699,7 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
|
||||
if (setsockopt(tcp->sockfd, SOL_TCP, TCP_KEEPINTVL, (void *) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() SOL_TCP, TCP_KEEPINTVL:");
|
||||
DEBUG_WARN("setsockopt() SOL_TCP, TCP_KEEPINTVL:");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
@ -710,7 +710,7 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
option_len = sizeof(option_value);
|
||||
if (setsockopt(tcp->sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() SOL_SOCKET, SO_NOSIGPIPE:");
|
||||
DEBUG_WARN("setsockopt() SOL_SOCKET, SO_NOSIGPIPE:");
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
|
@ -162,7 +162,7 @@ rdpPcap* pcap_open(char* name, BOOL write)
|
||||
|
||||
if (pcap_fp == NULL)
|
||||
{
|
||||
perror("opening pcap dump");
|
||||
DEBUG_WARN("opening pcap dump");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ int freerdp_tcp_read(int sockfd, BYTE* data, int length)
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
return 0;
|
||||
|
||||
perror("recv");
|
||||
DEBUG_WARN("recv");
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
@ -179,12 +179,12 @@ int freerdp_tcp_write(int sockfd, BYTE* data, int length)
|
||||
if (wsa_error == WSAEWOULDBLOCK)
|
||||
status = 0;
|
||||
else
|
||||
perror("send");
|
||||
DEBUG_WARN("send");
|
||||
#else
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
status = 0;
|
||||
else
|
||||
perror("send");
|
||||
DEBUG_WARN("send");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ int freerdp_uds_connect(const char* path)
|
||||
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (sockfd == -1)
|
||||
{
|
||||
perror("socket");
|
||||
DEBUG_WARN("socket");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ int freerdp_uds_connect(const char* path)
|
||||
status = connect(sockfd, (struct sockaddr *) &addr, sizeof(addr));
|
||||
if (status < 0)
|
||||
{
|
||||
perror("connect");
|
||||
DEBUG_WARN("connect");
|
||||
close(sockfd);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user