[asterisk-commits] file: branch 1.4 r48377 -
/branches/1.4/apps/app_meetme.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Dec 10 21:57:41 MST 2006
Author: file
Date: Sun Dec 10 22:57:38 2006
New Revision: 48377
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48377
Log:
Don't access the conference structure after it has been freed.
Modified:
branches/1.4/apps/app_meetme.c
Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=48377&r1=48376&r2=48377
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Sun Dec 10 22:57:38 2006
@@ -1927,6 +1927,13 @@
conf->markedusers--;
/* Remove ourselves from the list */
AST_LIST_REMOVE(&conf->userlist, user, list);
+
+ /* Change any states */
+ if (!conf->users)
+ ast_device_state_changed("meetme:%s", conf->confno);
+ if (confflags & (CONFFLAG_SLA_STATION|CONFFLAG_SLA_TRUNK))
+ st_device_state_changed("SLA:%s", conf->confno + 4);
+
if (AST_LIST_EMPTY(&conf->userlist)) {
/* close this one when no more users and no references*/
if (!conf->refcount)
@@ -1935,12 +1942,6 @@
/* Return the number of seconds the user was in the conf */
snprintf(meetmesecs, sizeof(meetmesecs), "%d", (int) (time(NULL) - user->jointime));
pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs);
-
- /* This device changed state now */
- if (!conf->users) /* If there are no more members */
- ast_device_state_changed("meetme:%s", conf->confno);
- if (confflags & (CONFFLAG_SLA_STATION|CONFFLAG_SLA_TRUNK))
- ast_device_state_changed("SLA:%s", conf->confno + 4);
}
free(user);
AST_LIST_UNLOCK(&confs);
More information about the asterisk-commits
mailing list