Commit 8c02ea10 authored by Leandro Ribeiro's avatar Leandro Ribeiro Committed by Pekka Paalanen

weston-log: rename weston_log_subscriber::destroy to destroy_subscription

weston_log_subscriber has a member named destroy. There are
other structs (weston_output, for instance) that have this
member, and by convention it is a pointer to a function
that destroys the struct.

In weston_log_subscriber it is being used to destroy
subscriptions of the debug protocol, and not the subscriber,
so this name is misleading. Rename it to destroy_subscription.
Signed-off-by: default avatarLeandro Ribeiro <>
parent 4b1de011
......@@ -79,7 +79,7 @@ weston_log_subscriber_create_log(FILE *dump_to)
file->base.write = weston_log_file_write;
file->base.destroy = NULL;
file->base.destroy_subscription = NULL;
file->base.complete = NULL;
......@@ -241,7 +241,7 @@ weston_log_subscriber_create_flight_rec(size_t size)
return NULL;
flight_rec->base.write = weston_log_flight_recorder_write;
flight_rec->base.destroy = NULL;
flight_rec->base.destroy_subscription = NULL;
flight_rec->base.complete = NULL;
......@@ -54,7 +54,7 @@ struct weston_log_subscriber {
void (*write)(struct weston_log_subscriber *sub, const char *data, size_t len);
/** For the type of streams that required additional destroy operation
* for destroying the stream */
void (*destroy)(struct weston_log_subscriber *sub);
void (*destroy_subscription)(struct weston_log_subscriber *sub);
/** For the type of streams that can inform the 'consumer' part that
* write operation has been terminated/finished and should close the
* stream.
......@@ -180,7 +180,7 @@ stream_create(struct weston_log_context *log_ctx, const char *name,
stream->resource = stream_resource;
stream->base.write = weston_log_debug_wayland_write;
stream->base.destroy = weston_log_debug_wayland_to_destroy;
stream->base.destroy_subscription = weston_log_debug_wayland_to_destroy;
stream->base.complete = weston_log_debug_wayland_complete;
......@@ -712,8 +712,8 @@ weston_log_scope_destroy(struct weston_log_scope *scope)
wl_list_for_each_safe(sub, sub_tmp, &scope->subscription_list, source_link) {
/* destroy each subscription */
if (sub->owner->destroy)
if (sub->owner->destroy_subscription)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment