From: David Goulet Date: Thu, 4 Jul 2013 19:54:38 +0000 (-0400) Subject: Fix: session ID signess to uin64_t in sessiond X-Git-Tag: v2.2.1~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b33c6803513bdd833792f92adae07a9c64b1d0f9;p=lttng-tools.git Fix: session ID signess to uin64_t in sessiond Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c index b6b24b76c..7780102bb 100644 --- a/src/bin/lttng-sessiond/session.c +++ b/src/bin/lttng-sessiond/session.c @@ -17,6 +17,7 @@ #define _GNU_SOURCE #include +#include #include #include #include @@ -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; diff --git a/src/bin/lttng-sessiond/session.h b/src/bin/lttng-sessiond/session.h index a0b24b2d7..6dd530420 100644 --- a/src/bin/lttng-sessiond/session.h +++ b/src/bin/lttng-sessiond/session.h @@ -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; diff --git a/src/bin/lttng-sessiond/trace-kernel.h b/src/bin/lttng-sessiond/trace-kernel.h index d1f6e5f00..1cc174def 100644 --- a/src/bin/lttng-sessiond/trace-kernel.h +++ b/src/bin/lttng-sessiond/trace-kernel.h @@ -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; };