[asterisk-commits] branch 1.2 r33300 - /branches/1.2/apps/app_meetme.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jun 9 11:52:51 MST 2006


Author: file
Date: Fri Jun  9 13:52:51 2006
New Revision: 33300

URL: http://svn.digium.com/view/asterisk?rev=33300&view=rev
Log:
Allow the format outputted by meetme list to be used for meetme commands (like kick) (issue #7322 reported by darkskiez)

Modified:
    branches/1.2/apps/app_meetme.c

Modified: branches/1.2/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_meetme.c?rev=33300&r1=33299&r2=33300&view=diff
==============================================================================
--- branches/1.2/apps/app_meetme.c (original)
+++ branches/1.2/apps/app_meetme.c Fri Jun  9 13:52:51 2006
@@ -2011,20 +2011,25 @@
 	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;
-		}
-	}
-	return NULL;
+	int cid;
+
+	if (!conf || !callerident) {
+		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 */



More information about the asterisk-commits mailing list