From: Joshua Colp Date: Fri, 9 Jun 2006 18:52:51 +0000 (+0000) Subject: Allow the format outputted by meetme list to be used for meetme commands (like kick... X-Git-Tag: 1.2.10~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d9a6da961ffe72bddc9141c0675d524412ebdbb;p=thirdparty%2Fasterisk.git Allow the format outputted by meetme list to be used for meetme commands (like kick) (issue #7322 reported by darkskiez) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33300 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 4c0b78fbcd..92a945525e 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 */