summaryrefslogtreecommitdiff
path: root/bgpd/bgp_network.c
diff options
context:
space:
mode:
authorajs <ajs>2004-11-20 02:06:59 +0000
committerajs <ajs>2004-11-20 02:06:59 +0000
commit6099b3b56956322567323c11fd698b2328c6826b (patch)
treefa537bd0eaa9f7d824f39445eabc928db59050ca /bgpd/bgp_network.c
parentae5e24d8678f1e3a60dde58d3382c5ba73d6bb27 (diff)
2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r--bgpd/bgp_network.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 84311e2e..7dcddb79 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -65,7 +65,7 @@ bgp_accept (struct thread *thread)
bgp_sock = sockunion_accept (accept_sock, &su);
if (bgp_sock < 0)
{
- zlog_err ("[Error] BGP socket accept failed (%s)", strerror (errno));
+ zlog_err ("[Error] BGP socket accept failed (%s)", safe_strerror (errno));
return -1;
}
@@ -318,7 +318,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
sock = socket (ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol);
if (sock < 0)
{
- zlog_err ("socket: %s", strerror (errno));
+ zlog_err ("socket: %s", safe_strerror (errno));
continue;
}
@@ -335,7 +335,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
if (ret < 0)
{
- zlog_err ("bind: %s", strerror (en));
+ zlog_err ("bind: %s", safe_strerror (en));
close(sock);
continue;
}
@@ -343,7 +343,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
ret = listen (sock, 3);
if (ret < 0)
{
- zlog_err ("listen: %s", strerror (errno));
+ zlog_err ("listen: %s", safe_strerror (errno));
close (sock);
continue;
}
@@ -369,7 +369,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock < 0)
{
- zlog_err ("socket: %s", strerror (errno));
+ zlog_err ("socket: %s", safe_strerror (errno));
return sock;
}
@@ -396,7 +396,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
if (ret < 0)
{
- zlog_err ("bind: %s", strerror (en));
+ zlog_err ("bind: %s", safe_strerror (en));
close (sock);
return ret;
}
@@ -404,7 +404,7 @@ bgp_socket (struct bgp *bgp, unsigned short port)
ret = listen (sock, 3);
if (ret < 0)
{
- zlog_err ("listen: %s", strerror (errno));
+ zlog_err ("listen: %s", safe_strerror (errno));
close (sock);
return ret;
}