mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
Fix meetmesecs (bug #2936)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -535,6 +535,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
|
|||||||
|
|
||||||
user->user_no = 0; /* User number 0 means starting up user! (dead - not in the list!) */
|
user->user_no = 0; /* User number 0 means starting up user! (dead - not in the list!) */
|
||||||
|
|
||||||
|
time(&user->jointime);
|
||||||
|
|
||||||
if (conf->locked) {
|
if (conf->locked) {
|
||||||
/* Sorry, but this confernce is locked! */
|
/* Sorry, but this confernce is locked! */
|
||||||
if (!ast_streamfile(chan, "conf-locked", chan->language))
|
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;
|
conf->lastuser = user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strncpy(user->usrvalue, "test", sizeof(user->usrvalue) - 1);
|
|
||||||
user->chan = chan;
|
user->chan = chan;
|
||||||
user->userflags = confflags;
|
user->userflags = confflags;
|
||||||
user->adminflags = 0;
|
user->adminflags = 0;
|
||||||
@@ -1053,10 +1054,10 @@ outrun:
|
|||||||
else
|
else
|
||||||
ast_log(LOG_ERROR, "Bad! Bad! Bad! user->prevuser is NULL but we're not the beginning!\n");
|
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);
|
free(user);
|
||||||
ast_mutex_unlock(&conflock);
|
ast_mutex_unlock(&conflock);
|
||||||
|
Reference in New Issue
Block a user