void generate_unique_id(struct ist *dst, struct session *sess, struct stream *strm, struct lf_expr *format);
+static inline struct ist stream_generate_unique_id(struct stream *strm, struct lf_expr *format)
+{
+ if (!isttest(strm->unique_id)) {
+ generate_unique_id(&strm->unique_id, strm_sess(strm), strm, format);
+ }
+
+ return strm->unique_id;
+}
+
/*
* Builds a log line for the stream (must be valid).
*/
void stream_dump_and_crash(enum obj_type *obj, int rate);
void strm_dump_to_buffer(struct buffer *buf, const struct stream *strm, const char *pfx, uint32_t anon_key);
-struct ist stream_generate_unique_id(struct stream *strm, struct lf_expr *format);
-
void stream_process_counters(struct stream *s);
void sess_change_server(struct stream *strm, struct server *newsrv);
struct task *process_stream(struct task *t, void *context, unsigned int state);
}
INITCALL0(STG_INIT, init_stream);
-/* Generates a unique ID based on the given <format>, stores it in the given <strm> and
- * returns the unique ID.
- *
- * If this function fails to allocate memory IST_NULL is returned.
- *
- * If an ID is already stored within the stream nothing happens existing unique ID is
- * returned.
- */
-struct ist stream_generate_unique_id(struct stream *strm, struct lf_expr *format)
-{
- if (!isttest(strm->unique_id)) {
- generate_unique_id(&strm->unique_id, strm_sess(strm), strm, format);
- }
-
- return strm->unique_id;
-}
-
/************************************************************************/
/* All supported ACL keywords must be declared here. */
/************************************************************************/