diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-08 23:32:28 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-08 23:32:28 +0200 |
commit | 55adddbc16f65732b57ab8585c47001fced91d77 (patch) | |
tree | 27e8239d48c8a6b353db356aff92ee4d225c0a0e /util/ipmilan.c | |
parent | d3c90cdcdf56146af89056ed36bfcc7b4d4956c5 (diff) |
Imported Upstream version 2.9.9upstream/2.9.9
Diffstat (limited to 'util/ipmilan.c')
-rw-r--r-- | util/ipmilan.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/util/ipmilan.c b/util/ipmilan.c index 1f5b949..acea438 100644 --- a/util/ipmilan.c +++ b/util/ipmilan.c @@ -352,8 +352,10 @@ static uchar g_Cipher[ 16 ][ 16 ]; /*SeedCount x CipherHash for SOL 1.5*/ #ifdef WIN32 int econnrefused = WSAECONNREFUSED; /*=10061.*/ +int econnreset = WSAECONNRESET; /*=10054.*/ #else int econnrefused = ECONNREFUSED; /*=111. from Linux asm/errno.h */ +int econnreset = ECONNRESET; /*=104.*/ #endif #ifdef WIN32 @@ -1232,7 +1234,7 @@ static int _send_lan_cmd(SockType s, uchar *pcmd, int scmd, uchar *presp, fprintf(fpdbg,"ipmilan_cmd timeout, after request, seq=%x itry=%d\n", phdr->seq_num, itry); rv = LAN_ERR_RECV_FAIL; - if (fdopoke2) ipmilan_poke2(s, to, tolen); + if (fdopoke2) ipmilan_poke2(s, to, tolen); os_usleep(0,5000); continue; /* retry */ } @@ -1243,14 +1245,15 @@ static int _send_lan_cmd(SockType s, uchar *pcmd, int scmd, uchar *presp, if (fdebuglan) { fprintf(fpdbg,"ipmilan_recvfrom rlen=%d, err=%d iseq=%x itry=%d\n", rlen,lasterr,phdr->iseq_num,itry); - show_LastError("ipmilan_recvfrom",lasterr); - } - rv = rlen; /* -3 = LAN_ERR_RECV_FAIL */ - rlen = 0; + show_LastError("ipmilan_recvfrom",lasterr); + } + rv = rlen; /* -3 = LAN_ERR_RECV_FAIL */ + rlen = 0; *sresp = rlen; /* Sometimes the OS sends an ECONNREFUSED error, but * retrying will catch the BMC's reply packet. */ if (lasterr == econnrefused) continue; /*try again*/ + else if (lasterr == econnreset) continue; /*try again*/ else break; /* goto EXIT; */ } else { /* successful receive */ net2h(&phdr->iseq_num,&rbuf[5],4); /*incoming seq_num from hdr*/ |