- 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@iptel.org>
... | ... |
@@ -3498,7 +3498,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev, |
3498 | 3498 |
tcpconn); |
3499 | 3499 |
} |
3500 | 3500 |
if (unlikely(ev & POLLERR)){ |
3501 |
- if (unlikely(tcpconn->state=S_CONN_CONNECT)){ |
|
3501 |
+ if (unlikely(tcpconn->state==S_CONN_CONNECT)){ |
|
3502 | 3502 |
#ifdef USE_DST_BLACKLIST |
3503 | 3503 |
if (cfg_get(core, core_cfg, use_dst_blacklist)) |
3504 | 3504 |
dst_blacklist_su(BLST_ERR_CONNECT, tcpconn->rcv.proto, |
... | ... |
@@ -149,7 +149,7 @@ again: |
149 | 149 |
bytes_read=0; /* nothing has been read */ |
150 | 150 |
}else if (errno == EINTR) goto again; |
151 | 151 |
else{ |
152 |
- if (unlikely(c->state=S_CONN_CONNECT)){ |
|
152 |
+ if (unlikely(c->state==S_CONN_CONNECT)){ |
|
153 | 153 |
switch(errno){ |
154 | 154 |
case ECONNRESET: |
155 | 155 |
#ifdef USE_DST_BLACKLIST |