summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/server/ServerException.txt2
-rw-r--r--lib/server/SocketListen.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/server/ServerException.txt b/lib/server/ServerException.txt
index ed591b73..474b4067 100644
--- a/lib/server/ServerException.txt
+++ b/lib/server/ServerException.txt
@@ -13,7 +13,7 @@ SocketOpenError 10
SocketPollError 11
SocketCloseError 13
SocketNameUNIXPathTooLong 14
-SocketBindError 16 Check the ListenAddresses directive in your config file -- must refer to local IP addresses only
+SocketBindError 16 Check the ListenAddresses directive (bbstored) or CommandSocket (bbackupd) in your config file -- must refer to local IP addresses (or existing writable path) only
SocketAcceptError 17
ServerStreamBadListenAddrs 18
ServerForkError 19
diff --git a/lib/server/SocketListen.h b/lib/server/SocketListen.h
index 1ec6f512..170c56a1 100644
--- a/lib/server/SocketListen.h
+++ b/lib/server/SocketListen.h
@@ -166,10 +166,13 @@ public:
if(::bind(mSocketHandle, &addr.sa_generic, addrLen) == -1
|| ::listen(mSocketHandle, ListenBacklog) == -1)
{
+ int err_number = errno;
// Dispose of the socket
::close(mSocketHandle);
mSocketHandle = -1;
- THROW_EXCEPTION(ServerException, SocketBindError)
+ THROW_SYS_FILE_ERRNO("Failed to bind or listen "
+ "on socket", Name, err_number,
+ ServerException, SocketBindError);
}
}