diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-09 19:04:18 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-09 19:04:18 +0000 |
commit | 9b6cf45120a38c6251a4c7c1f6f78e69575e9d32 (patch) | |
tree | 29827b8dd0e105196599d1ee36c57ff715287edd /apps/app_meetme.c | |
parent | c73adf1ee92ccc97a9fe9fad8d0b30f888464cc8 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@33327 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r-- | apps/app_meetme.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 4c0b78fbc..92a945525 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2011,20 +2011,25 @@ static int conf_exec(struct ast_channel *chan, void *data) return res; } -static struct ast_conf_user* find_user(struct ast_conference *conf, char *callerident) { +static struct ast_conf_user* find_user(struct ast_conference *conf, char *callerident) +{ struct ast_conf_user *user = NULL; - char usrno[1024] = ""; - - if (conf && callerident) { - user = conf->firstuser; - while (user) { - snprintf(usrno, sizeof(usrno), "%d", user->user_no); - if (strcmp(usrno, callerident) == 0) - return user; - user = user->nextuser; - } + int cid; + + if (!conf || !callerident) { + return NULL; } - return NULL; + + sscanf(callerident, "%i", &cid); + + user = conf->firstuser; + while (user) { + if (user->user_no == cid) + break; + user = user->nextuser; + } + + return user; } /*--- admin_exec: The MeetMeadmin application */ |