summaryrefslogtreecommitdiff
path: root/bgpd
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
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')
-rw-r--r--bgpd/bgp_network.c14
-rw-r--r--bgpd/bgp_packet.c4
2 files changed, 9 insertions, 9 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;
}
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index dc5d3691..8acc98e7 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -152,7 +152,7 @@ bgp_connect_check (struct peer *peer)
{
if (BGP_DEBUG (events, EVENTS))
plog_info (peer->log, "%s [Event] Connect failed (%s)",
- peer->host, strerror (errno));
+ peer->host, safe_strerror (errno));
BGP_EVENT_ADD (peer, TCP_connection_open_failed);
}
}
@@ -2115,7 +2115,7 @@ bgp_read_packet (struct peer *peer)
return -1;
plog_err (peer->log, "%s [Error] bgp_read_packet error: %s",
- peer->host, strerror (errno));
+ peer->host, safe_strerror (errno));
BGP_EVENT_ADD (peer, TCP_fatal_error);
return -1;
}