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:55:19 +0000 (15:55 -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 b6b24b76c3f9ae28cec31d3c9e3224351647a2ef..7780102bb7658c9fd3b579e485f5c000626ddf27 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);
 
@@ -212,8 +213,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 a0b24b2d70259af1afc4067518ffcf78b9fb094d..6dd530420aaa540e12bcc452b808f39de48e740b 100644 (file)
@@ -44,7 +44,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;
@@ -66,7 +66,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 d1f6e5f00a82b42ff177a7883a59ef4f29143c4e..1cc174def7bec074d447ced7e0d4857206056248 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;
 };
This page took 0.027418 seconds and 4 git commands to generate.