[asterisk-commits] russell: trunk r67560 - in /trunk: ./
apps/app_meetme.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jun 5 16:02:12 MST 2007
Author: russell
Date: Tue Jun 5 18:02:11 2007
New Revision: 67560
URL: http://svn.digium.com/view/asterisk?view=rev&rev=67560
Log:
Merged revisions 67558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r67558 | russell | 2007-06-05 18:01:44 -0500 (Tue, 05 Jun 2007) | 5 lines
Fix some crashes related to the use of the "meetme" CLI command. The code for
this command was not locking the conference list at all.
(issue #9351, reported by and patch submitted by Junk-Y, committed patch
is different and by me)
........
Modified:
trunk/ (props changed)
trunk/apps/app_meetme.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=67560&r1=67559&r2=67560
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Tue Jun 5 18:02:11 2007
@@ -827,8 +827,10 @@
if (argc == 1) {
/* 'MeetMe': List all the conferences */
now = time(NULL);
+ AST_LIST_LOCK(&confs);
if (AST_LIST_EMPTY(&confs)) {
ast_cli(fd, "No active MeetMe conferences.\n");
+ AST_LIST_UNLOCK(&confs);
return RESULT_SUCCESS;
}
ast_cli(fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation");
@@ -845,6 +847,7 @@
total += cnf->users;
}
+ AST_LIST_UNLOCK(&confs);
ast_cli(fd, "* Total number of MeetMe users: %d\n", total);
return RESULT_SUCCESS;
}
@@ -899,6 +902,7 @@
return RESULT_SUCCESS;
}
/* Find the right conference */
+ AST_LIST_LOCK(&confs);
AST_LIST_TRAVERSE(&confs, cnf, list) {
if (strcmp(cnf->confno, argv[2]) == 0)
break;
@@ -906,11 +910,12 @@
if (!cnf) {
if ( !concise )
ast_cli(fd, "No such conference: %s.\n",argv[2]);
+ AST_LIST_UNLOCK(&confs);
return RESULT_SUCCESS;
}
/* Show all the users */
+ time(&now);
AST_LIST_TRAVERSE(&cnf->userlist, user, list) {
- now = time(NULL);
hr = (now - user->jointime) / 3600;
min = ((now - user->jointime) % 3600) / 60;
sec = (now - user->jointime) % 60;
@@ -938,7 +943,7 @@
}
if ( !concise )
ast_cli(fd,"%d users in that conference.\n",cnf->users);
-
+ AST_LIST_UNLOCK(&confs);
return RESULT_SUCCESS;
} else
return RESULT_SHOWUSAGE;
More information about the asterisk-commits
mailing list