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.3.0-rc1~75 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d022620a4a3ce49862b49527c5e29d7ba6cce743;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 5f5c2a6ee..a777b0414 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); @@ -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; diff --git a/src/bin/lttng-sessiond/session.h b/src/bin/lttng-sessiond/session.h index 63b5a068d..7b927efe1 100644 --- a/src/bin/lttng-sessiond/session.h +++ b/src/bin/lttng-sessiond/session.h @@ -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; diff --git a/src/bin/lttng-sessiond/trace-kernel.h b/src/bin/lttng-sessiond/trace-kernel.h index 21ffd336d..68301967a 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; /* Tell or not if the session has to output the traces. */