Module: sip-router
Branch: ser_core_cvs
Commit: 71eae780d57f486e27fa946ff603da1e89fb2839
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=71eae78…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu May 21 15:24:15 2009 +0000
tcp: typo fixes when blacklisting on error
- because of a '=' instead of a '==' a tcp connection that failed
after some time was always blacklisted with BLST_ERR_CONNECT
(even in cases when BLST_ERR_SEND should have been used).
- same thing for blacklisting on read failure.
Reported-by: Libor Chocholaty <libor(a)iptel.org>
---
tcp_main.c | 2 +-
tcp_read.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tcp_main.c b/tcp_main.c
index 21c4c80..7a9b52e 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -3498,7 +3498,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn,
short ev,
tcpconn);
}
if (unlikely(ev & POLLERR)){
- if (unlikely(tcpconn->state=S_CONN_CONNECT)){
+ if (unlikely(tcpconn->state==S_CONN_CONNECT)){
#ifdef USE_DST_BLACKLIST
if (cfg_get(core, core_cfg, use_dst_blacklist))
dst_blacklist_su(BLST_ERR_CONNECT, tcpconn->rcv.proto,
diff --git a/tcp_read.c b/tcp_read.c
index ab69242..7d45d53 100644
--- a/tcp_read.c
+++ b/tcp_read.c
@@ -149,7 +149,7 @@ again:
bytes_read=0; /* nothing has been read */
}else if (errno == EINTR) goto again;
else{
- if (unlikely(c->state=S_CONN_CONNECT)){
+ if (unlikely(c->state==S_CONN_CONNECT)){
switch(errno){
case ECONNRESET:
#ifdef USE_DST_BLACKLIST