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: Leandro Ribeiro <leandrohr@riseup.net>
This commit is contained in:
committed by
Pekka Paalanen
parent
4b1de0112b
commit
8c02ea1069
@@ -79,7 +79,7 @@ weston_log_subscriber_create_log(FILE *dump_to)
|
|||||||
|
|
||||||
|
|
||||||
file->base.write = weston_log_file_write;
|
file->base.write = weston_log_file_write;
|
||||||
file->base.destroy = NULL;
|
file->base.destroy_subscription = NULL;
|
||||||
file->base.complete = NULL;
|
file->base.complete = NULL;
|
||||||
|
|
||||||
wl_list_init(&file->base.subscription_list);
|
wl_list_init(&file->base.subscription_list);
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ weston_log_subscriber_create_flight_rec(size_t size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
flight_rec->base.write = weston_log_flight_recorder_write;
|
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;
|
flight_rec->base.complete = NULL;
|
||||||
wl_list_init(&flight_rec->base.subscription_list);
|
wl_list_init(&flight_rec->base.subscription_list);
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ struct weston_log_subscriber {
|
|||||||
void (*write)(struct weston_log_subscriber *sub, const char *data, size_t len);
|
void (*write)(struct weston_log_subscriber *sub, const char *data, size_t len);
|
||||||
/** For the type of streams that required additional destroy operation
|
/** For the type of streams that required additional destroy operation
|
||||||
* for destroying the stream */
|
* 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
|
/** For the type of streams that can inform the 'consumer' part that
|
||||||
* write operation has been terminated/finished and should close the
|
* write operation has been terminated/finished and should close the
|
||||||
* stream.
|
* stream.
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ stream_create(struct weston_log_context *log_ctx, const char *name,
|
|||||||
stream->resource = stream_resource;
|
stream->resource = stream_resource;
|
||||||
|
|
||||||
stream->base.write = weston_log_debug_wayland_write;
|
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;
|
stream->base.complete = weston_log_debug_wayland_complete;
|
||||||
wl_list_init(&stream->base.subscription_list);
|
wl_list_init(&stream->base.subscription_list);
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
wl_list_for_each_safe(sub, sub_tmp, &scope->subscription_list, source_link) {
|
||||||
/* destroy each subscription */
|
/* destroy each subscription */
|
||||||
if (sub->owner->destroy)
|
if (sub->owner->destroy_subscription)
|
||||||
sub->owner->destroy(sub->owner);
|
sub->owner->destroy_subscription(sub->owner);
|
||||||
|
|
||||||
weston_log_subscription_destroy(sub);
|
weston_log_subscription_destroy(sub);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user