diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-09 18:52:51 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-09 18:52:51 +0000 |
commit | 5c2c23c9843a91630beba2661c0edf040453ecde (patch) | |
tree | 120be172e6657642922c1f140bb5393122d57b2e | |
parent | acdd15b615600a52e81fd3be1f024797b1719634 (diff) |
Allow the format outputted by meetme list to be used for meetme commands (like kick) (issue #7322 reported by darkskiez)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@33300 f38db490-d61c-443f-a65b-d21fe96a405b
-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 */ |