[asterisk-commits] oej: branch oej/pinelonely-meetme-single-user-hangup r314066 - /team/oej/pine...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 18 10:03:11 CDT 2011
Author: oej
Date: Mon Apr 18 10:03:09 2011
New Revision: 314066
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=314066
Log:
Adding a separate hangup event to avoid the irritating kicking prompts
Modified:
team/oej/pinelonely-meetme-single-user-hangup/apps/app_meetme.c
Modified: team/oej/pinelonely-meetme-single-user-hangup/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup/apps/app_meetme.c?view=diff&rev=314066&r1=314065&r2=314066
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup/apps/app_meetme.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup/apps/app_meetme.c Mon Apr 18 10:03:09 2011
@@ -83,7 +83,8 @@
enum {
ADMINFLAG_MUTED = (1 << 1), /*!< User is muted */
ADMINFLAG_SELFMUTED = (1 << 2), /*!< User muted self */
- ADMINFLAG_KICKME = (1 << 3) /*!< User has been kicked */
+ ADMINFLAG_KICKME = (1 << 3), /*!< User has been kicked */
+ ADMINFLAG_HANGUP = (1 << 4) /*!< User has been silently kicked */
};
#define MEETME_DELAYDETECTTALK 300
@@ -2119,6 +2120,12 @@
"Usernum: %i\r\n"
"Status: off\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
+ }
+
+ /* If I have been hung up, exit the conference */
+ if (user->adminflags & ADMINFLAG_HANGUP) {
+ ret = 0;
+ break;
}
/* If I have been kicked, exit the conference */
@@ -2577,7 +2584,7 @@
This flag is meant to kill a conference with only one person remaining.
*/
if (conf->users == 1 && (confflags & CONFFLAG_KILL_LAST_MAN_STANDING)) {
- ao2_callback(conf->usercontainer, 0, user_set_kickme_cb, NULL);
+ ao2_callback(conf->usercontainer, 0, user_set_hangup_cb, NULL);
}
/* Return the number of seconds the user was in the conf */
@@ -3063,6 +3070,13 @@
{
struct ast_conf_user *user = obj;
user->adminflags |= ADMINFLAG_KICKME;
+ return 0;
+}
+
+static int user_set_hangup_cb(void *obj, void *unused, int flags)
+{
+ struct ast_conf_user *user = obj;
+ user->adminflags |= ADMINFLAG_HANGUP;
return 0;
}
More information about the asterisk-commits
mailing list