summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ce8b38e)
v2: missing "channel" in commit title.
Keep the publishing state to the notification thread of the channel
object. Issue remove command if the channel was previously
published.
Fixes #1103
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+
+ channel->published_to_notification_thread = true;
+
error:
free(pathname);
return ret;
error:
free(pathname);
return ret;
lkc->stream_count = 0;
lkc->event_count = 0;
lkc->enabled = 1;
lkc->stream_count = 0;
lkc->event_count = 0;
lkc->enabled = 1;
+ lkc->published_to_notification_thread = false;
/* Init linked list */
CDS_INIT_LIST_HEAD(&lkc->events_list.head);
CDS_INIT_LIST_HEAD(&lkc->stream_list.head);
/* Init linked list */
CDS_INIT_LIST_HEAD(&lkc->events_list.head);
CDS_INIT_LIST_HEAD(&lkc->stream_list.head);
/* Remove from channel list */
cds_list_del(&channel->list);
/* Remove from channel list */
cds_list_del(&channel->list);
- if (notification_thread_handle) {
+ if (notification_thread_handle
+ && channel->published_to_notification_thread) {
status = notification_thread_command_remove_channel(
notification_thread_handle,
channel->fd, LTTNG_DOMAIN_KERNEL);
status = notification_thread_command_remove_channel(
notification_thread_handle,
channel->fd, LTTNG_DOMAIN_KERNEL);
int enabled;
unsigned int stream_count;
unsigned int event_count;
int enabled;
unsigned int stream_count;
unsigned int event_count;
+ bool published_to_notification_thread;
struct cds_list_head ctx_list;
struct lttng_channel *channel;
struct ltt_kernel_event_list events_list;
struct cds_list_head ctx_list;
struct lttng_channel *channel;
struct ltt_kernel_event_list events_list;