mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-13 21:31:07 +01:00
MINOR: listener: Remove useless checks on the receiver protocol existence
The receiver protocol is always set when a listener is created or cloned. At least for now. And there is no check on it at many places, except in listener_accept() function. So, let's remove remaining useless checks. That will avoid false Coverity reports in future. This patch should fix the issue #2631.
This commit is contained in:
parent
217e467e89
commit
1cc9340afd
@ -1034,7 +1034,7 @@ void listener_accept(struct listener *l)
|
||||
int ret;
|
||||
|
||||
p = l->bind_conf->frontend;
|
||||
bind_tid_commit = l->rx.proto ? l->rx.proto->bind_tid_commit : NULL;
|
||||
bind_tid_commit = l->rx.proto->bind_tid_commit;
|
||||
|
||||
/* if l->bind_conf->maxaccept is -1, then max_accept is UINT_MAX. It is
|
||||
* not really illimited, but it is probably enough.
|
||||
@ -1473,7 +1473,7 @@ void listener_accept(struct listener *l)
|
||||
* reservation in the target ring.
|
||||
*/
|
||||
|
||||
if (l->rx.proto && l->rx.proto->bind_tid_prep) {
|
||||
if (l->rx.proto->bind_tid_prep) {
|
||||
if (l->rx.proto->bind_tid_prep(cli_conn, t)) {
|
||||
/* Failed migration, stay on the same thread. */
|
||||
goto local_accept;
|
||||
@ -1498,7 +1498,7 @@ void listener_accept(struct listener *l)
|
||||
*/
|
||||
_HA_ATOMIC_INC(&activity[t].accq_full);
|
||||
|
||||
if (l->rx.proto && l->rx.proto->bind_tid_reset)
|
||||
if (l->rx.proto->bind_tid_reset)
|
||||
l->rx.proto->bind_tid_reset(cli_conn);
|
||||
}
|
||||
#endif // USE_THREAD
|
||||
@ -1573,7 +1573,7 @@ void listener_accept(struct listener *l)
|
||||
/* This may be a shared socket that was paused by another process.
|
||||
* Let's put it to pause in this case.
|
||||
*/
|
||||
if (l->rx.proto && l->rx.proto->rx_listening(&l->rx) == 0) {
|
||||
if (l->rx.proto->rx_listening(&l->rx) == 0) {
|
||||
suspend_listener(l, 0, 0);
|
||||
goto end;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user