From: Mathieu Desnoyers Date: Tue, 23 Aug 2011 19:14:48 +0000 (-0400) Subject: set missing shm obj index field X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dc613eb9d0c449f3e988af66b173abefa4b22233;p=ust.git set missing shm obj index field Signed-off-by: Mathieu Desnoyers --- diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 86e8d91..e1dd56f 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -98,8 +98,8 @@ struct shm_object *shm_object_table_append(struct shm_object_table *table, obj->memory_map = memory_map; obj->memory_map_size = memory_map_size; obj->allocated_len = 0; + obj->index = table->allocated_len++; - table->allocated_len++; return obj; error_mmap: diff --git a/libust/ltt-ring-buffer-client.h b/libust/ltt-ring-buffer-client.h index 3d3bfb5..697324c 100644 --- a/libust/ltt-ring-buffer-client.h +++ b/libust/ltt-ring-buffer-client.h @@ -381,7 +381,7 @@ struct ltt_channel *_channel_create(const char *name, ltt_chan->handle = channel_create(&client_config, name, ltt_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); - ltt_chan->chan = shmp(handle, handle->chan); + ltt_chan->chan = shmp(ltt_chan->handle, ltt_chan->handle->chan); return ltt_chan; }