diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2007-06-27 10:05:18 +0000 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2007-06-27 10:05:18 +0000 |
commit | 33dd7b0fdceeb0139adac7e080311bc7a47ee633 (patch) | |
tree | 57df5558b906e76ed2790771d3bec2236905e222 /src/salut-tubes-channel.c | |
parent | 3a1cef055ba4938e6810b5efe6ae856d7a7751d4 (diff) |
simplify generate_stream_id
Diffstat (limited to 'src/salut-tubes-channel.c')
-rw-r--r-- | src/salut-tubes-channel.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c index 8d6a5963..aebf0e21 100644 --- a/src/salut-tubes-channel.c +++ b/src/salut-tubes-channel.c @@ -1135,14 +1135,9 @@ gchar * generate_stream_id (void) { gchar *stream_id; - time_t curtime; - struct tm *loctime; - gchar stamp[20]; - - curtime = time (NULL); - loctime = localtime (&curtime); - strftime (stamp, sizeof (stamp), "%s", loctime); - stream_id = g_strdup_printf ("%s%u", stamp, g_random_int()); + + stream_id = g_strdup_printf ("%lu-%u", (unsigned long) time (NULL), + g_random_int ()); return stream_id; } |