Project

General

Profile

Bug #401 » 0002-Fix-don-t-steal-key-when-adding-a-metadata-stream.patch

David Goulet, 12/04/2012 06:23 PM

View differences:

src/common/consumer.c
{
int ret = 0;
struct consumer_relayd_sock_pair *relayd;
struct lttng_ht_iter iter;
struct lttng_ht_node_ulong *node;
assert(stream);
assert(ht);
......
*/
rcu_read_lock();
/*
* Lookup the stream just to make sure it does not exist in our internal
* state. This should NEVER happen.
*/
lttng_ht_lookup(ht, (void *)((unsigned long) stream->wait_fd), &iter);
node = lttng_ht_iter_get_node_ulong(&iter);
assert(node);
/* Find relayd and, if one is found, increment refcount. */
relayd = consumer_find_relayd(stream->net_seq_idx);
if (relayd != NULL) {
......
uatomic_dec(&stream->chan->nb_init_streams);
}
/* Steal stream identifier to avoid having streams with the same key */
consumer_steal_stream_key(stream->key, ht);
lttng_ht_add_unique_ulong(ht, &stream->node);
/*
(12-12/13)