From: Mathieu Desnoyers Date: Tue, 11 Feb 2014 22:25:09 +0000 (-0500) Subject: Cleanup: move callback init to static initialization X-Git-Tag: v2.4.0-rc4~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=67a8083591786270ba01e24212a2ae797db73064;p=lttng-modules.git Cleanup: move callback init to static initialization Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h index c97793d2..c186c60b 100644 --- a/lttng-ring-buffer-client.h +++ b/lttng-ring-buffer-client.h @@ -493,14 +493,6 @@ struct channel *_channel_create(const char *name, unsigned int switch_timer_interval, unsigned int read_timer_interval) { - lttng_chan->ops->timestamp_begin = client_timestamp_begin; - lttng_chan->ops->timestamp_end = client_timestamp_end; - lttng_chan->ops->events_discarded = client_events_discarded; - lttng_chan->ops->content_size = client_content_size; - lttng_chan->ops->packet_size = client_packet_size; - lttng_chan->ops->stream_id = client_stream_id; - lttng_chan->ops->current_timestamp = client_current_timestamp; - return channel_create(&client_config, name, lttng_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); @@ -655,6 +647,13 @@ static struct lttng_transport lttng_relay_transport = { .get_hp_wait_queue = lttng_get_hp_wait_queue, .is_finalized = lttng_is_finalized, .is_disabled = lttng_is_disabled, + .timestamp_begin = client_timestamp_begin, + .timestamp_end = client_timestamp_end, + .events_discarded = client_events_discarded, + .content_size = client_content_size, + .packet_size = client_packet_size, + .stream_id = client_stream_id, + .current_timestamp = client_current_timestamp, }, }; diff --git a/lttng-ring-buffer-metadata-client.h b/lttng-ring-buffer-metadata-client.h index bea482b9..bb91f4d4 100644 --- a/lttng-ring-buffer-metadata-client.h +++ b/lttng-ring-buffer-metadata-client.h @@ -223,14 +223,6 @@ struct channel *_channel_create(const char *name, unsigned int switch_timer_interval, unsigned int read_timer_interval) { - lttng_chan->ops->timestamp_begin = client_timestamp_begin; - lttng_chan->ops->timestamp_end = client_timestamp_end; - lttng_chan->ops->events_discarded = client_events_discarded; - lttng_chan->ops->content_size = client_content_size; - lttng_chan->ops->packet_size = client_packet_size; - lttng_chan->ops->stream_id = client_stream_id; - lttng_chan->ops->current_timestamp = client_current_timestamp; - return channel_create(&client_config, name, lttng_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); @@ -369,6 +361,13 @@ static struct lttng_transport lttng_relay_transport = { .get_hp_wait_queue = lttng_get_hp_wait_queue, .is_finalized = lttng_is_finalized, .is_disabled = lttng_is_disabled, + .timestamp_begin = client_timestamp_begin, + .timestamp_end = client_timestamp_end, + .events_discarded = client_events_discarded, + .content_size = client_content_size, + .packet_size = client_packet_size, + .stream_id = client_stream_id, + .current_timestamp = client_current_timestamp, }, };