Fix: session ID signess to uin64_t in sessiond
authorDavid Goulet <dgoulet@efficios.com>
Thu, 4 Jul 2013 19:54:38 +0000 (15:54 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 4 Jul 2013 19:54:38 +0000 (15:54 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/session.c
src/bin/lttng-sessiond/session.h
src/bin/lttng-sessiond/trace-kernel.h

index 5f5c2a6ee08fe202cff46a1adf461ec3c6118d5f..a777b041428443fe856b4e7613920a377e7b494f 100644 (file)
@@ -17,6 +17,7 @@
 
 #define _GNU_SOURCE
 #include <limits.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -54,7 +55,7 @@ static struct ltt_session_list ltt_session_list = {
  * The caller MUST acquire the session list lock before.
  * Returns the unique identifier for the session.
  */
-static unsigned int add_session_list(struct ltt_session *ls)
+static uint64_t add_session_list(struct ltt_session *ls)
 {
        assert(ls);
 
@@ -219,8 +220,8 @@ int session_create(char *name, uid_t uid, gid_t gid)
         * up and, if valid, assign it to the session.
         */
 
-       DBG("Tracing session %s created with ID %u by UID %d GID %d", name,
-                       new_session->id, new_session->uid, new_session->gid);
+       DBG("Tracing session %s created with ID %" PRIu64 " by UID %d GID %d",
+                       name, new_session->id, new_session->uid, new_session->gid);
 
        return LTTNG_OK;
 
index 63b5a068d033462f4d1167b46c0a78d9aa42cfd8..7b927efe1103aa8950c16530f86a3ec5582497e8 100644 (file)
@@ -47,7 +47,7 @@ struct ltt_session_list {
         * Session unique ID generator. The session list lock MUST be
         * upon update and read of this counter.
         */
-       unsigned int next_uuid;
+       uint64_t next_uuid;
 
        /* Linked list head */
        struct cds_list_head head;
@@ -69,7 +69,7 @@ struct ltt_session {
        pthread_mutex_t lock;
        struct cds_list_head list;
        int enabled;    /* enabled/started flag */
-       unsigned int id;                /* session unique identifier */
+       uint64_t id;            /* session unique identifier */
        /* UID/GID of the user owning the session */
        uid_t uid;
        gid_t gid;
index 21ffd336d51b90b77f0c31b36ab8105e2f4b5b10..68301967a15f7cae616f85f24b42afc2c9f83fe7 100644 (file)
@@ -108,7 +108,7 @@ struct ltt_kernel_session {
        struct consumer_output *consumer;
        struct consumer_output *tmp_consumer;
        /* Tracing session id */
-       unsigned int id;
+       uint64_t id;
        /* Session is started and active */
        unsigned int started;
        /* Tell or not if the session has to output the traces. */
This page took 0.029713 seconds and 5 git commands to generate.