Skip to content

Commit

Permalink
Report error message when accept() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
guruofquality committed Sep 26, 2020
1 parent f920d9b commit 21f809b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Release 0.5.3 (pending)
==========================

- Report error message when accept() fails

Release 0.5.2 (2020-07-20)
==========================

Expand Down
1 change: 1 addition & 0 deletions common/SoapyRPCSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ SoapyRPCSocket *SoapyRPCSocket::accept(void)
struct sockaddr_storage addr;
socklen_t addrlen = sizeof(addr);
int client = ::accept(_sock, (struct sockaddr*)&addr, &addrlen);
if (client == INVALID_SOCKET) this->reportError("accept()");
if (client == INVALID_SOCKET) return NULL;
SoapyRPCSocket *clientSock = new SoapyRPCSocket();
clientSock->_sock = client;
Expand Down

0 comments on commit 21f809b

Please sign in to comment.