diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-11-25 03:23:07 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-11-25 03:23:07 +0000 |
commit | 70205b0e5b0cc9649d7d93f03e5b73a098c76a41 (patch) | |
tree | 3828173b611eaca0cd84a0ad9202df879bc1ef86 /apps/app_meetme.c | |
parent | da831008fdd5dc3e67448d32cfabe4b0774a3d8a (diff) |
Fix meetmesecs (bug #2936)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4332 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rwxr-xr-x | apps/app_meetme.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 064e52c78..637ebef83 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -534,7 +534,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c memset(user, 0, sizeof(struct ast_conf_user)); user->user_no = 0; /* User number 0 means starting up user! (dead - not in the list!) */ - + + time(&user->jointime); + if (conf->locked) { /* Sorry, but this confernce is locked! */ if (!ast_streamfile(chan, "conf-locked", chan->language)) @@ -567,7 +569,6 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c conf->lastuser = user; } } - strncpy(user->usrvalue, "test", sizeof(user->usrvalue) - 1); user->chan = chan; user->userflags = confflags; user->adminflags = 0; @@ -1053,10 +1054,10 @@ outrun: else ast_log(LOG_ERROR, "Bad! Bad! Bad! user->prevuser is NULL but we're not the beginning!\n"); } - /* Return the number of seconds the user was in the conf */ - snprintf(meetmesecs, sizeof(meetmesecs), "%i", (int) (user->jointime - time(NULL))); - pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs); } + /* Return the number of seconds the user was in the conf */ + snprintf(meetmesecs, sizeof(meetmesecs), "%i", (int) (time(NULL) - user->jointime)); + pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs); } free(user); ast_mutex_unlock(&conflock); |