Author: adrian.chadd
Date: Mon Mar 2 20:16:46 2009
New Revision: 13868
Modified:
playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_conn.c
Log:
Add in some debugging to try and figure out why my not-so-well-implement
state machine isn't working right.
Modified: playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_conn.c
==============================================================================
--- playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_conn.c (original)
+++ playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_conn.c Mon Mar 2 20:16:46 2009
@@ -114,6 +114,7 @@
void
bgp_conn_close_and_restart(bgp_conn_t *bc)
{
+ debug(85, 1) ("bgp_conn_close_and_restart: %p: restart\n", bc);
if (bc->fd > -1) {
comm_close(bc->fd);
bc->fd = -1;
@@ -135,6 +136,7 @@
debug(85, 2) ("bgp_conn_handle_read: %p: FD %d: state %d: READY\n", bc,
fd, bc->bi.state);
r = bgp_read(&bc->bi, fd);
if (r <= 0) {
+ debug(85, 1) ("bgp_conn_handle_read: %p: retval %d; errno %d
(%s)\n",
bc, r, errno, strerror(errno));
bgp_conn_close_and_restart(bc);
return;
}
@@ -174,6 +176,7 @@
{
bgp_conn_t *bc = data;
+ debug(85, 1) ("bgp_conn_connect_done: %p: connection completed,
status %d\n", bc, status);
if (status != COMM_OK) {
bgp_conn_close_and_restart(bc);
return;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---