]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow the format outputted by meetme list to be used for meetme commands (like kick...
authorJoshua Colp <jcolp@digium.com>
Fri, 9 Jun 2006 18:52:51 +0000 (18:52 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 9 Jun 2006 18:52:51 +0000 (18:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33300 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 4c0b78fbcd90e2846fee74ca7ebcc56e63aee277..92a945525efca6b8dc6cce71cac5330ec1d8f3b7 100644 (file)
@@ -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 */