aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-30 04:41:18 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-30 04:41:18 +0000
commit960085b93effa2e60a104fd1dc7c285e8a17b43f (patch)
treece152fc7452bf039617bdb5fd213d37645419c97 /channel.c
parentbe1aaf406e36e94633fd6609cf648b56ed841386 (diff)
Add unique identifier
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1064 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index 7ceb7a78b..275eb2fe5 100755
--- a/channel.c
+++ b/channel.c
@@ -41,6 +41,7 @@
static int shutting_down = 0;
+static int uniqueint = 0;
/* XXX Lock appropriately in more functions XXX */
@@ -322,6 +323,7 @@ struct ast_channel *ast_channel_alloc(int needqueue)
tmp->data = NULL;
tmp->fin = 0;
tmp->fout = 0;
+ snprintf(tmp->uniqueid, sizeof(tmp->uniqueid), "%li.%d", time(NULL), uniqueint++);
headp=&tmp->varshead;
ast_pthread_mutex_init(&tmp->lock);
AST_LIST_HEAD_INIT(headp);