]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: obj_type: Handle stream object in obj_base_ptr() function
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 21 Apr 2020 09:48:53 +0000 (11:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 07:39:38 +0000 (09:39 +0200)
The stream object (OBJ_TYPE_STREAM) was missing in the switch statement of the
obj_base_ptr() function.

This patch must be backported as far as 2.0.

include/proto/obj_type.h

index c1ac5f424a4b68d8d3245b94d484b473629d4a01..799732b279bd533e1dcde58084481b18e7049788 100644 (file)
@@ -198,6 +198,7 @@ static inline void *obj_base_ptr(enum obj_type *t)
        case OBJ_TYPE_CONN:     return __objt_conn(t);
        case OBJ_TYPE_SRVRQ:    return __objt_dns_srvrq(t);
        case OBJ_TYPE_CS:       return __objt_cs(t);
+       case OBJ_TYPE_STREAM:   return __objt_stream(t);
        case OBJ_TYPE_CHECK:    return __objt_check(t);
        default:                return t; // exact pointer for invalid case
        }