Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bcde377

Browse files
committed
use strerror
1 parent 051eeb6 commit bcde377

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arbiter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,17 +680,17 @@ static void MtmAcceptIncomingConnections()
680680

681681
gateway = socket(sock_inet.sin_family, SOCK_STREAM, 0);
682682
if (gateway < 0) {
683-
MTM_ELOG(ERROR, "Arbiter failed to create socket: %d", errno);
683+
MTM_ELOG(ERROR, "Arbiter failed to create socket: %s", strerror(errno));
684684
}
685685
if (setsockopt(gateway, SOL_SOCKET, SO_REUSEADDR, (char*)&on, sizeof on) < 0) {
686-
MTM_ELOG(ERROR, "Arbiter failed to set options for socket: %d", errno);
686+
MTM_ELOG(ERROR, "Arbiter failed to set options for socket: %s", strerror(errno));
687687
}
688688

689689
if (bind(gateway, (struct sockaddr*)&sock_inet, sizeof(sock_inet)) < 0) {
690-
MTM_ELOG(ERROR, "Arbiter failed to bind socket: %d", errno);
690+
MTM_ELOG(ERROR, "Arbiter failed to bind socket: %s", strerror(errno));
691691
}
692692
if (listen(gateway, nNodes) < 0) {
693-
MTM_ELOG(ERROR, "Arbiter failed to listen socket: %d", errno);
693+
MTM_ELOG(ERROR, "Arbiter failed to listen socket: %s", strerror(errno));
694694
}
695695

696696
sockets[MtmNodeId-1] = gateway;

0 commit comments

Comments
 (0)