weston-log: Avoid prefix-matching the scope name when checking for a

pending subscription

It limits to scope name to an exact match.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Marius Vlad 2019-11-05 17:08:17 +02:00
parent ded0b77316
commit f68ee07880

View File

@ -124,7 +124,7 @@ find_pending_subscription(struct weston_log_context *log_ctx,
struct weston_log_subscription *sub;
wl_list_for_each(sub, &log_ctx->pending_subscription_list, source_link)
if (!strncmp(sub->scope_name, scope_name, strlen(scope_name)))
if (!strcmp(sub->scope_name, scope_name))
return sub;
return NULL;