From 130c7b3a2876e61f85a4b53be5c2e6df561f21ed Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Mon, 21 Apr 2008 01:29:20 +0000 Subject: Modifications to quagga to enable bgp, ospf and rip mib traversals --- lib/smux.c | 18 +++++++++++------- lib/smux.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/smux.c b/lib/smux.c index 6285c94d..218c35d9 100644 --- a/lib/smux.c +++ b/lib/smux.c @@ -1179,7 +1179,10 @@ smux_connect (struct thread *t) int ret; if (debug_smux) - zlog_debug ("SMUX connect try %d", fail + 1); + { + fail = fail + 1; + zlog_debug ("SMUX connect try %d", fail); + } /* Clear thread poner of myself. */ smux_connect_thread = NULL; @@ -1188,8 +1191,9 @@ smux_connect (struct thread *t) smux_sock = smux_socket (); if (smux_sock < 0) { - if (++fail < SMUX_MAX_FAILURE) - smux_event (SMUX_CONNECT, 0); + zlog_warn ("SMUX socket/connection creation error"); + // if (++fail < SMUX_MAX_FAILURE) + smux_event (SMUX_CONNECT, 0); return 0; } @@ -1200,8 +1204,8 @@ smux_connect (struct thread *t) zlog_warn ("SMUX open message send failed: %s", safe_strerror (errno)); close (smux_sock); smux_sock = -1; - if (++fail < SMUX_MAX_FAILURE) - smux_event (SMUX_CONNECT, 0); + // if (++fail < SMUX_MAX_FAILURE) + smux_event (SMUX_CONNECT, 0); return -1; } @@ -1212,8 +1216,8 @@ smux_connect (struct thread *t) zlog_warn ("SMUX register message send failed: %s", safe_strerror (errno)); close (smux_sock); smux_sock = -1; - if (++fail < SMUX_MAX_FAILURE) - smux_event (SMUX_CONNECT, 0); + // if (++fail < SMUX_MAX_FAILURE) + smux_event (SMUX_CONNECT, 0); return -1; } diff --git a/lib/smux.h b/lib/smux.h index 79d23e70..11f02e9e 100644 --- a/lib/smux.h +++ b/lib/smux.h @@ -39,7 +39,7 @@ #define SMUX_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 3) #define SMUX_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 4) -#define SMUX_MAX_FAILURE 3 +// #define SMUX_MAX_FAILURE 3 /* Structures here are mostly compatible with UCD SNMP 4.1.1 */ #define MATCH_FAILED (-1) -- cgit v1.2.3