[asterisk-commits] russell: branch group/res_config_ldap r76610 - in /team/group/res_config_ldap...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 23 11:01:58 CDT 2007


Author: russell
Date: Mon Jul 23 11:01:56 2007
New Revision: 76610

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76610
Log:
get branch for issue #5768 and re-enable automerge

Modified:
    team/group/res_config_ldap/   (props changed)
    team/group/res_config_ldap/CHANGES
    team/group/res_config_ldap/Makefile
    team/group/res_config_ldap/apps/app_adsiprog.c
    team/group/res_config_ldap/apps/app_alarmreceiver.c
    team/group/res_config_ldap/apps/app_amd.c
    team/group/res_config_ldap/apps/app_authenticate.c
    team/group/res_config_ldap/apps/app_cdr.c
    team/group/res_config_ldap/apps/app_chanisavail.c
    team/group/res_config_ldap/apps/app_channelredirect.c
    team/group/res_config_ldap/apps/app_chanspy.c
    team/group/res_config_ldap/apps/app_controlplayback.c
    team/group/res_config_ldap/apps/app_db.c
    team/group/res_config_ldap/apps/app_dial.c
    team/group/res_config_ldap/apps/app_dictate.c
    team/group/res_config_ldap/apps/app_directed_pickup.c
    team/group/res_config_ldap/apps/app_directory.c
    team/group/res_config_ldap/apps/app_disa.c
    team/group/res_config_ldap/apps/app_dumpchan.c
    team/group/res_config_ldap/apps/app_echo.c
    team/group/res_config_ldap/apps/app_exec.c
    team/group/res_config_ldap/apps/app_externalivr.c
    team/group/res_config_ldap/apps/app_festival.c
    team/group/res_config_ldap/apps/app_flash.c
    team/group/res_config_ldap/apps/app_followme.c
    team/group/res_config_ldap/apps/app_forkcdr.c
    team/group/res_config_ldap/apps/app_getcpeid.c
    team/group/res_config_ldap/apps/app_ices.c
    team/group/res_config_ldap/apps/app_image.c
    team/group/res_config_ldap/apps/app_ivrdemo.c
    team/group/res_config_ldap/apps/app_macro.c
    team/group/res_config_ldap/apps/app_meetme.c
    team/group/res_config_ldap/apps/app_milliwatt.c
    team/group/res_config_ldap/apps/app_minivm.c
    team/group/res_config_ldap/apps/app_mixmonitor.c
    team/group/res_config_ldap/apps/app_morsecode.c
    team/group/res_config_ldap/apps/app_mp3.c
    team/group/res_config_ldap/apps/app_nbscat.c
    team/group/res_config_ldap/apps/app_osplookup.c
    team/group/res_config_ldap/apps/app_page.c
    team/group/res_config_ldap/apps/app_parkandannounce.c
    team/group/res_config_ldap/apps/app_playback.c
    team/group/res_config_ldap/apps/app_privacy.c
    team/group/res_config_ldap/apps/app_queue.c
    team/group/res_config_ldap/apps/app_read.c
    team/group/res_config_ldap/apps/app_readfile.c
    team/group/res_config_ldap/apps/app_record.c
    team/group/res_config_ldap/apps/app_rpt.c
    team/group/res_config_ldap/apps/app_sayunixtime.c
    team/group/res_config_ldap/apps/app_senddtmf.c
    team/group/res_config_ldap/apps/app_sendtext.c
    team/group/res_config_ldap/apps/app_setcallerid.c
    team/group/res_config_ldap/apps/app_skel.c
    team/group/res_config_ldap/apps/app_sms.c
    team/group/res_config_ldap/apps/app_softhangup.c
    team/group/res_config_ldap/apps/app_speech_utils.c
    team/group/res_config_ldap/apps/app_stack.c
    team/group/res_config_ldap/apps/app_system.c
    team/group/res_config_ldap/apps/app_talkdetect.c
    team/group/res_config_ldap/apps/app_test.c
    team/group/res_config_ldap/apps/app_transfer.c
    team/group/res_config_ldap/apps/app_url.c
    team/group/res_config_ldap/apps/app_userevent.c
    team/group/res_config_ldap/apps/app_verbose.c
    team/group/res_config_ldap/apps/app_voicemail.c
    team/group/res_config_ldap/apps/app_waitforring.c
    team/group/res_config_ldap/apps/app_waitforsilence.c
    team/group/res_config_ldap/apps/app_while.c
    team/group/res_config_ldap/apps/app_zapateller.c
    team/group/res_config_ldap/apps/app_zapbarge.c
    team/group/res_config_ldap/apps/app_zapras.c
    team/group/res_config_ldap/apps/app_zapscan.c
    team/group/res_config_ldap/cdr/cdr_csv.c
    team/group/res_config_ldap/cdr/cdr_manager.c
    team/group/res_config_ldap/cdr/cdr_odbc.c
    team/group/res_config_ldap/cdr/cdr_pgsql.c
    team/group/res_config_ldap/cdr/cdr_radius.c
    team/group/res_config_ldap/cdr/cdr_sqlite.c
    team/group/res_config_ldap/cdr/cdr_tds.c
    team/group/res_config_ldap/channels/chan_agent.c
    team/group/res_config_ldap/channels/chan_h323.c
    team/group/res_config_ldap/channels/chan_iax2.c
    team/group/res_config_ldap/channels/chan_mgcp.c
    team/group/res_config_ldap/channels/chan_phone.c
    team/group/res_config_ldap/channels/chan_sip.c
    team/group/res_config_ldap/channels/chan_skinny.c
    team/group/res_config_ldap/channels/chan_zap.c
    team/group/res_config_ldap/channels/iax2-parser.c
    team/group/res_config_ldap/channels/iax2-parser.h
    team/group/res_config_ldap/channels/misdn/ie.c
    team/group/res_config_ldap/channels/misdn/isdn_lib.c
    team/group/res_config_ldap/channels/misdn/isdn_lib_intern.h
    team/group/res_config_ldap/configs/say.conf.sample
    team/group/res_config_ldap/configs/sip.conf.sample
    team/group/res_config_ldap/configure
    team/group/res_config_ldap/configure.ac
    team/group/res_config_ldap/funcs/func_blacklist.c
    team/group/res_config_ldap/funcs/func_curl.c
    team/group/res_config_ldap/funcs/func_cut.c
    team/group/res_config_ldap/funcs/func_enum.c
    team/group/res_config_ldap/funcs/func_iconv.c
    team/group/res_config_ldap/funcs/func_rand.c
    team/group/res_config_ldap/funcs/func_realtime.c
    team/group/res_config_ldap/funcs/func_strings.c
    team/group/res_config_ldap/funcs/func_timeout.c
    team/group/res_config_ldap/funcs/func_version.c
    team/group/res_config_ldap/funcs/func_vmcount.c
    team/group/res_config_ldap/include/asterisk.h
    team/group/res_config_ldap/include/asterisk/abstract_jb.h
    team/group/res_config_ldap/include/asterisk/acl.h
    team/group/res_config_ldap/include/asterisk/adsi.h
    team/group/res_config_ldap/include/asterisk/app.h
    team/group/res_config_ldap/include/asterisk/autoconfig.h.in
    team/group/res_config_ldap/include/asterisk/cdr.h
    team/group/res_config_ldap/include/asterisk/channel.h
    team/group/res_config_ldap/include/asterisk/cli.h
    team/group/res_config_ldap/include/asterisk/config.h
    team/group/res_config_ldap/include/asterisk/crypto.h
    team/group/res_config_ldap/include/asterisk/devicestate.h
    team/group/res_config_ldap/include/asterisk/doxyref.h
    team/group/res_config_ldap/include/asterisk/dundi.h
    team/group/res_config_ldap/include/asterisk/enum.h
    team/group/res_config_ldap/include/asterisk/file.h
    team/group/res_config_ldap/include/asterisk/frame.h
    team/group/res_config_ldap/include/asterisk/image.h
    team/group/res_config_ldap/include/asterisk/io.h
    team/group/res_config_ldap/include/asterisk/jabber.h
    team/group/res_config_ldap/include/asterisk/linkedlists.h
    team/group/res_config_ldap/include/asterisk/localtime.h
    team/group/res_config_ldap/include/asterisk/logger.h
    team/group/res_config_ldap/include/asterisk/manager.h
    team/group/res_config_ldap/include/asterisk/module.h
    team/group/res_config_ldap/include/asterisk/monitor.h
    team/group/res_config_ldap/include/asterisk/musiconhold.h
    team/group/res_config_ldap/include/asterisk/options.h
    team/group/res_config_ldap/include/asterisk/pbx.h
    team/group/res_config_ldap/include/asterisk/res_odbc.h
    team/group/res_config_ldap/include/asterisk/rtp.h
    team/group/res_config_ldap/include/asterisk/say.h
    team/group/res_config_ldap/include/asterisk/speech.h
    team/group/res_config_ldap/include/asterisk/strings.h
    team/group/res_config_ldap/include/asterisk/tdd.h
    team/group/res_config_ldap/include/asterisk/translate.h
    team/group/res_config_ldap/include/asterisk/udptl.h
    team/group/res_config_ldap/include/asterisk/utils.h
    team/group/res_config_ldap/include/jitterbuf.h
    team/group/res_config_ldap/main/acl.c
    team/group/res_config_ldap/main/app.c
    team/group/res_config_ldap/main/asterisk.c
    team/group/res_config_ldap/main/callerid.c
    team/group/res_config_ldap/main/cdr.c
    team/group/res_config_ldap/main/channel.c
    team/group/res_config_ldap/main/cli.c
    team/group/res_config_ldap/main/config.c
    team/group/res_config_ldap/main/devicestate.c
    team/group/res_config_ldap/main/dns.c
    team/group/res_config_ldap/main/enum.c
    team/group/res_config_ldap/main/http.c
    team/group/res_config_ldap/main/loader.c
    team/group/res_config_ldap/main/logger.c
    team/group/res_config_ldap/main/manager.c
    team/group/res_config_ldap/main/pbx.c
    team/group/res_config_ldap/main/rtp.c
    team/group/res_config_ldap/main/say.c
    team/group/res_config_ldap/main/stdtime/localtime.c
    team/group/res_config_ldap/main/udptl.c
    team/group/res_config_ldap/main/utils.c
    team/group/res_config_ldap/pbx/pbx_ael.c
    team/group/res_config_ldap/pbx/pbx_dundi.c
    team/group/res_config_ldap/pbx/pbx_realtime.c
    team/group/res_config_ldap/pbx/pbx_spool.c
    team/group/res_config_ldap/res/res_agi.c
    team/group/res_config_ldap/res/res_clioriginate.c
    team/group/res_config_ldap/res/res_config_odbc.c
    team/group/res_config_ldap/res/res_config_pgsql.c
    team/group/res_config_ldap/res/res_config_sqlite.c
    team/group/res_config_ldap/res/res_convert.c
    team/group/res_config_ldap/res/res_crypto.c
    team/group/res_config_ldap/res/res_features.c
    team/group/res_config_ldap/res/res_indications.c
    team/group/res_config_ldap/res/res_monitor.c
    team/group/res_config_ldap/res/res_musiconhold.c
    team/group/res_config_ldap/res/res_realtime.c
    team/group/res_config_ldap/res/res_smdi.c
    team/group/res_config_ldap/res/res_snmp.c
    team/group/res_config_ldap/res/res_speech.c
    team/group/res_config_ldap/res/snmp/agent.c
    team/group/res_config_ldap/sounds/Makefile
    team/group/res_config_ldap/utils/ael_main.c
    team/group/res_config_ldap/utils/check_expr.c

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul 23 11:01:56 2007
@@ -1,1 +1,1 @@
-/trunk:1-74213
+/trunk:1-76609

Modified: team/group/res_config_ldap/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/CHANGES?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/CHANGES (original)
+++ team/group/res_config_ldap/CHANGES Mon Jul 23 11:01:56 2007
@@ -38,6 +38,7 @@
 -----------
   * New CLI command "core show settings"
   * Added 'core show channels count' CLI command.
+  * Added the ability to set the core debug and verbose values on a per-file basis.
 
 SIP changes
 -----------

Modified: team/group/res_config_ldap/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/Makefile?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/Makefile (original)
+++ team/group/res_config_ldap/Makefile Mon Jul 23 11:01:56 2007
@@ -652,7 +652,10 @@
 	rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
 	rm -rf $(DESTDIR)$(ASTHEADERDIR)
 	rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
-	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
+	rm -f $(DESTDIR)$(ASTMANDIR)/man8/asterisk.8
+	rm -f $(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8
+	rm -f $(DESTDIR)$(ASTMANDIR)/man8/autosupport.8
+	rm -f $(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8
 	$(MAKE) -C sounds uninstall
 
 uninstall: _uninstall

Modified: team/group/res_config_ldap/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_adsiprog.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_adsiprog.c (original)
+++ team/group/res_config_ldap/apps/app_adsiprog.c Mon Jul 23 11:01:56 2007
@@ -1548,10 +1548,7 @@
 
 static int adsi_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
+	int res = 0;
 	
 	if (ast_strlen_zero(data))
 		data = "asterisk.adsi";
@@ -1564,22 +1561,13 @@
 			ast_verbose(VERBOSE_PREFIX_3 "ADSI Available on CPE.  Attempting Upload.\n");
 		res = adsi_prog(chan, data);
 	}
-
-	ast_module_user_remove(u);
 	
 	return res;
 }
 
 static int unload_module(void)
 {
-	int res;
-
-	ast_module_user_hangup_all();
-
-	res = ast_unregister_application(app);	
-	
-
-	return res;
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_alarmreceiver.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_alarmreceiver.c (original)
+++ team/group/res_config_ldap/apps/app_alarmreceiver.c Mon Jul 23 11:01:56 2007
@@ -306,8 +306,8 @@
 static int write_metadata( FILE *logfile, char *signalling_type, struct ast_channel *chan)
 {
 	int res = 0;
-	time_t t;
-	struct tm now;
+	struct timeval t;
+	struct ast_tm now;
 	char *cl,*cn;
 	char workstring[80];
 	char timestamp[80];
@@ -324,12 +324,12 @@
 
 	/* Get the current time */
 		
-	time(&t);
+	t = ast_tvnow();
 	ast_localtime(&t, &now, NULL);
 	
 	/* Format the time */
 	
-	strftime(timestamp, sizeof(timestamp), time_stamp_format, &now); 
+	ast_strftime(timestamp, sizeof(timestamp), time_stamp_format, &now); 
 
 	
 	res = fprintf(logfile, "\n\n[metadata]\n\n");
@@ -628,14 +628,11 @@
 static int alarmreceiver_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 	event_node_t *elp, *efree;
 	char signalling_type[64] = "";
 
 	event_node_t *event_head = NULL;
 
-	u = ast_module_user_add(chan);
-
 	/* Set write and read formats to ULAW */
 
 	if(option_verbose >= 4)
@@ -643,13 +640,11 @@
 
 	if (ast_set_write_format(chan,AST_FORMAT_ULAW)){
 		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 	
 	if (ast_set_read_format(chan,AST_FORMAT_ULAW)){
 		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -664,13 +659,8 @@
 		ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Answering channel\n");
 
 	if (chan->_state != AST_STATE_UP) {
-	
-		res = ast_answer(chan);
-		
-		if (res) {
-			ast_module_user_remove(u);
+		if ((res = ast_answer(chan)))
 			return -1;
-		}
 	}
 
 	/* Wait for the connection to settle post-answer */
@@ -721,9 +711,6 @@
 		elp = elp->next;
 		ast_free(efree);
 	}
-
-
-	ast_module_user_remove(u);
 
 	return 0;
 }
@@ -823,13 +810,7 @@
 
 static int unload_module(void)
 {
-	int res;
-
-	res = ast_unregister_application(app);
-
-	ast_module_user_hangup_all();
-
-	return res;
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_amd.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_amd.c (original)
+++ team/group/res_config_ldap/apps/app_amd.c Mon Jul 23 11:01:56 2007
@@ -318,11 +318,7 @@
 
 static int amd_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u = NULL;
-
-	u = ast_module_user_add(chan);
 	isAnsweringMachine(chan, data);
-	ast_module_user_remove(u);
 
 	return 0;
 }
@@ -383,7 +379,6 @@
 
 static int unload_module(void)
 {
-	ast_module_user_hangup_all();
 	return ast_unregister_application(app);
 }
 

Modified: team/group/res_config_ldap/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_authenticate.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_authenticate.c (original)
+++ team/group/res_config_ldap/apps/app_authenticate.c Mon Jul 23 11:01:56 2007
@@ -90,7 +90,6 @@
 {
 	int res=0;
 	int retries;
-	struct ast_module_user *u;
 	char passwd[256];
 	char *prompt;
 	int maxdigits;
@@ -107,15 +106,10 @@
 		ast_log(LOG_WARNING, "Authenticate requires an argument(password)\n");
 		return -1;
 	}
-	
-	u = ast_module_user_add(chan);
 
 	if (chan->_state != AST_STATE_UP) {
-		res = ast_answer(chan);
-		if (res) {
-			ast_module_user_remove(u);
+		if ((res = ast_answer(chan)))
 			return -1;
-		}
 	}
 	
 	argcopy = ast_strdupa(data);
@@ -217,20 +211,13 @@
 			res = ast_waitstream(chan, "");
 		res = -1;
 	}
-	ast_module_user_remove(u);
+
 	return res;
 }
 
 static int unload_module(void)
 {
-	int res;
-
-	ast_module_user_hangup_all();
-
-	res = ast_unregister_application(app);
-
-	
-	return res;
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_cdr.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_cdr.c (original)
+++ team/group/res_config_ldap/apps/app_cdr.c Mon Jul 23 11:01:56 2007
@@ -46,28 +46,15 @@
 
 static int nocdr_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
-	
-	u = ast_module_user_add(chan);
-
-	if (chan->cdr) {
+	if (chan->cdr)
 		ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
-	}
-
-	ast_module_user_remove(u);
 
 	return 0;
 }
 
 static int unload_module(void)
 {
-	int res;
-
-	res = ast_unregister_application(nocdr_app);
-
-	ast_module_user_hangup_all();
-
-	return res;
+	return ast_unregister_application(nocdr_app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_chanisavail.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_chanisavail.c (original)
+++ team/group/res_config_ldap/apps/app_chanisavail.c Mon Jul 23 11:01:56 2007
@@ -69,7 +69,6 @@
 {
 	int res=-1, inuse=-1, option_state=0, string_compare=0;
 	int status;
-	struct ast_module_user *u;
 	char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
 	struct ast_channel *tempchan;
 	AST_DECLARE_APP_ARGS(args,
@@ -81,8 +80,6 @@
 		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	info = ast_strdupa(data); 
 
@@ -108,7 +105,6 @@
 			number = strchr(tech, '/');
 			if (!number) {
 				ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
-				ast_module_user_remove(u);
 				return -1;
 			}
 			*number = '\0';
@@ -151,19 +147,12 @@
 		pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
 	}
 
-	ast_module_user_remove(u);
 	return 0;
 }
 
 static int unload_module(void)
 {
-	int res = 0;
-
-	res = ast_unregister_application(app);
-
-	ast_module_user_hangup_all();
-	
-	return res;
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_channelredirect.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_channelredirect.c (original)
+++ team/group/res_config_ldap/apps/app_channelredirect.c Mon Jul 23 11:01:56 2007
@@ -52,7 +52,6 @@
 static int asyncgoto_exec(struct ast_channel *chan, void *data)
 {
 	int res = -1;
-	struct ast_module_user *u;
 	char *info, *context, *exten, *priority;
 	int prio = 1;
 	struct ast_channel *chan2 = NULL;
@@ -66,8 +65,6 @@
 		ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	info = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, info);
@@ -115,20 +112,13 @@
  chanquit:
 	ast_mutex_unlock(&chan2->lock);
  quit:
-	ast_module_user_remove(u);
 
 	return res;
 }
 
 static int unload_module(void)
 {
-	int res;
-
-	res = ast_unregister_application(app);
-
-	ast_module_user_hangup_all();
-
-	return res;	
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/group/res_config_ldap/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_chanspy.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_chanspy.c (original)
+++ team/group/res_config_ldap/apps/app_chanspy.c Mon Jul 23 11:01:56 2007
@@ -626,7 +626,6 @@
 
 static int chanspy_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	char *options = NULL;
 	char *spec = NULL;
 	char *argv[2];
@@ -641,8 +640,6 @@
 
 	data = ast_strdupa(data);
 
-	u = ast_module_user_add(chan);
-
 	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
 		spec = argv[0];
 		if (argc > 1)
@@ -674,12 +671,12 @@
 
 		if (ast_test_flag(&flags, OPTION_PRIVATE))
 			ast_set_flag(&flags, OPTION_WHISPER);
-	}
+	} else
+		ast_clear_flag(&flags, AST_FLAGS_ALL);
 
 	oldwf = chan->writeformat;
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -701,14 +698,11 @@
 	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
 static int extenspy_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	char *options = NULL;
 	char *exten = NULL;
 	char *context = NULL;
@@ -724,8 +718,6 @@
 
 	data = ast_strdupa(data);
 
-	u = ast_module_user_add(chan);
-
 	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
 		context = argv[0];
 		if (!ast_strlen_zero(argv[0]))
@@ -758,12 +750,12 @@
 
 		if (ast_test_flag(&flags, OPTION_PRIVATE))
 			ast_set_flag(&flags, OPTION_WHISPER);
-	}
+	} else
+		ast_clear_flag(&flags, AST_FLAGS_ALL);
 
 	oldwf = chan->writeformat;
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -785,8 +777,6 @@
 	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
@@ -797,8 +787,6 @@
 	res |= ast_unregister_application(app_chan);
 	res |= ast_unregister_application(app_ext);
 
-	ast_module_user_hangup_all();
-
 	return res;
 }
 

Modified: team/group/res_config_ldap/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_controlplayback.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_controlplayback.c (original)
+++ team/group/res_config_ldap/apps/app_controlplayback.c Mon Jul 23 11:01:56 2007
@@ -93,7 +93,6 @@
 	int skipms = 0;
 	long offsetms = 0;
 	char offsetbuf[20];
-	struct ast_module_user *u;
 	char *tmp;
 	int argc;
 	char *argv[8] = { NULL, };
@@ -114,8 +113,6 @@
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
 	tmp = ast_strdupa(data);
 
@@ -123,7 +120,6 @@
 
 	if (argc < 1) {
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -165,8 +161,6 @@
 	snprintf(offsetbuf, sizeof(offsetbuf), "%ld", offsetms);
 	pbx_builtin_setvar_helper(chan, "CPLAYBACKOFFSET", offsetbuf);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/res_config_ldap/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_db.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_db.c (original)
+++ team/group/res_config_ldap/apps/app_db.c Mon Jul 23 11:01:56 2007
@@ -68,9 +68,6 @@
 static int deltree_exec(struct ast_channel *chan, void *data)
 {
 	char *argv, *family, *keytree;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
 
 	argv = ast_strdupa(data);
 
@@ -79,7 +76,6 @@
 		keytree = strsep(&argv, "\0");
 			if (!family || !keytree) {
 				ast_debug(1, "Ignoring; Syntax error in argument\n");
-				ast_module_user_remove(u);
 				return 0;
 			}
 		if (ast_strlen_zero(keytree))
@@ -101,18 +97,13 @@
 			ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
 	}
 
-	ast_module_user_remove(u);
-
 	return 0;
 }
 
 static int del_exec(struct ast_channel *chan, void *data)
 {
 	char *argv, *family, *key;
-	struct ast_module_user *u;
 	static int deprecation_warning = 0;
-
-	u = ast_module_user_add(chan);
 
 	if (!deprecation_warning) {
 		deprecation_warning = 1;
@@ -126,7 +117,6 @@
 		key = strsep(&argv, "\0");
 		if (!family || !key) {
 			ast_debug(1, "Ignoring; Syntax error in argument\n");
-			ast_module_user_remove(u);
 			return 0;
 		}
 		if (option_verbose > 2)
@@ -138,8 +128,6 @@
 	} else {
 		ast_debug(1, "Ignoring, no parameters\n");
 	}
-
-	ast_module_user_remove(u);
 	
 	return 0;
 }

Modified: team/group/res_config_ldap/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_dial.c?view=diff&rev=76610&r1=76609&r2=76610
==============================================================================
--- team/group/res_config_ldap/apps/app_dial.c (original)
+++ team/group/res_config_ldap/apps/app_dial.c Mon Jul 23 11:01:56 2007
@@ -109,7 +109,8 @@
 "           party has answered, but before the call gets bridged. The 'called'\n"
 "           DTMF string is sent to the called party, and the 'calling' DTMF\n"
 "           string is sent to the calling party. Both parameters can be used\n"
-"           alone.\n"  	
+"           alone.\n"
+"    e    - execute the 'h' extension for peer after the call ends\n"
 "    f    - Force the callerid of the *calling* channel to be set as the\n"
 "           extension associated with the channel using a dialplan 'hint'.\n"
 "           For example, some PSTNs do not allow CallerID to be set to anything\n"
@@ -256,10 +257,11 @@
 	OPT_IGNORE_FORWARDING = (1 << 27),
 	OPT_CALLEE_GOSUB =	(1 << 28),
 	OPT_CANCEL_ELSEWHERE =  (1 << 29),
+	OPT_PEER_H =            (1 << 30),
 };
 
-#define DIAL_STILLGOING			(1 << 30)
-#define DIAL_NOFORWARDHTML		(1 << 31)
+#define DIAL_STILLGOING			(1 << 31)
+#define DIAL_NOFORWARDHTML		((uint64_t)1 << 32) /* flags are now 64 bits, so keep it up! */
 
 enum {
 	OPT_ARG_ANNOUNCE = 0,
@@ -282,6 +284,7 @@
 	AST_APP_OPTION('c', OPT_CANCEL_ELSEWHERE),
 	AST_APP_OPTION('d', OPT_DTMF_EXIT),
 	AST_APP_OPTION_ARG('D', OPT_SENDDTMF, OPT_ARG_SENDDTMF),
+	AST_APP_OPTION('e', OPT_PEER_H),
 	AST_APP_OPTION('f', OPT_FORCECLID),
 	AST_APP_OPTION('g', OPT_GO_ON),
 	AST_APP_OPTION_ARG('G', OPT_GOTO, OPT_ARG_GOTO),
@@ -314,7 +317,7 @@
 struct chanlist {
 	struct chanlist *next;
 	struct ast_channel *chan;
-	unsigned int flags;
+	uint64_t flags;
 	int forwards;
 };
 
@@ -448,7 +451,7 @@
  * the outgoing channel without properly deleting it.
  */
 static void do_forward(struct chanlist *o,
-	struct cause_args *num, struct ast_flags *peerflags, int single)
+	struct cause_args *num, struct ast_flags64 *peerflags, int single)
 {
 	char tmpchan[256];
 	struct ast_channel *original = o->chan;
@@ -474,7 +477,7 @@
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, c->name);
 		/* If we have been told to ignore forwards, just set this channel to null and continue processing extensions normally */
-		if (ast_test_flag(peerflags, OPT_IGNORE_FORWARDING)) {
+		if (ast_test_flag64(peerflags, OPT_IGNORE_FORWARDING)) {
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s/%s' prevented.\n", in->name, tech, stuff);
 			c = o->chan = NULL;
@@ -496,14 +499,14 @@
 		c = o->chan = NULL;
 	}
 	if (!c) {
-		ast_clear_flag(o, DIAL_STILLGOING);	
+		ast_clear_flag64(o, DIAL_STILLGOING);	
 		handle_cause(cause, num);
 	} else {
 		char *new_cid_num, *new_cid_name;
 		struct ast_channel *src;
 
 		ast_rtp_make_compatible(c, in, single);
-		if (ast_test_flag(o, OPT_FORCECLID)) {
+		if (ast_test_flag64(o, OPT_FORCECLID)) {
 			new_cid_num = ast_strdup(S_OR(in->macroexten, in->exten));
 			new_cid_name = NULL; /* XXX no name ? */
 			src = c;	/* XXX possible bug in previous code, which used 'winner' ? it may have changed */
@@ -523,14 +526,14 @@
 		S_REPLACE(c->cid.cid_rdnis, ast_strdup(S_OR(in->macroexten, in->exten)));
 		if (ast_call(c, tmpchan, 0)) {
 			ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
-			ast_clear_flag(o, DIAL_STILLGOING);	
+			ast_clear_flag64(o, DIAL_STILLGOING);	
 			ast_hangup(original);
 			c = o->chan = NULL;
 			num->nochan++;
 		} else {
 			senddialevent(in, c);
 			/* After calling, set callerid to extension */
-			if (!ast_test_flag(peerflags, OPT_ORIGINAL_CLID)) {
+			if (!ast_test_flag64(peerflags, OPT_ORIGINAL_CLID)) {
 				char cidname[AST_MAX_EXTENSION] = "";
 				ast_set_callerid(c, S_OR(in->macroexten, in->exten), get_cid_name(cidname, sizeof(cidname), in), NULL);
 			}
@@ -550,7 +553,7 @@
 };
 
 static struct ast_channel *wait_for_answer(struct ast_channel *in,
-	struct chanlist *outgoing, int *to, struct ast_flags *peerflags,
+	struct chanlist *outgoing, int *to, struct ast_flags64 *peerflags,
 	struct privacy_args *pa,
 	const struct cause_args *num_in, int *result)
 {
@@ -559,7 +562,7 @@
 	int orig = *to;
 	struct ast_channel *peer = NULL;
 	/* single is set if only one destination is enabled */
-	int single = outgoing && !outgoing->next && !ast_test_flag(outgoing, OPT_MUSICBACK | OPT_RINGBACK);
+	int single = outgoing && !outgoing->next && !ast_test_flag64(outgoing, OPT_MUSICBACK | OPT_RINGBACK);
 	
 	if (single) {
 		/* Turn off hold music, etc */
@@ -579,7 +582,7 @@
 		watchers[pos++] = in;
 		for (o = outgoing; o; o = o->next) {
 			/* Keep track of important channels */
-			if (ast_test_flag(o, DIAL_STILLGOING) && o->chan)
+			if (ast_test_flag64(o, DIAL_STILLGOING) && o->chan)
 				watchers[pos++] = o->chan;
 			numlines++;
 		}
@@ -607,12 +610,12 @@
 
 			if (c == NULL)
 				continue;
-			if (ast_test_flag(o, DIAL_STILLGOING) && c->_state == AST_STATE_UP) {
+			if (ast_test_flag64(o, DIAL_STILLGOING) && c->_state == AST_STATE_UP) {
 				if (!peer) {
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "%s answered %s\n", c->name, in->name);
 					peer = c;
-					ast_copy_flags(peerflags, o,
+					ast_copy_flags64(peerflags, o,
 						       OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
 						       OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
 						       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
@@ -635,7 +638,7 @@
 				in->hangupcause = c->hangupcause;
 				ast_hangup(c);
 				c = o->chan = NULL;
-				ast_clear_flag(o, DIAL_STILLGOING);
+				ast_clear_flag64(o, DIAL_STILLGOING);
 				handle_cause(in->hangupcause, &num);
 				continue;
 			}
@@ -647,7 +650,7 @@
 						if (option_verbose > 2)
 							ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", c->name, in->name);
 						peer = c;
-						ast_copy_flags(peerflags, o,
+						ast_copy_flags64(peerflags, o,
 							       OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
 							       OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
@@ -668,7 +671,7 @@
 					in->hangupcause = c->hangupcause;
 					ast_hangup(c);
 					c = o->chan = NULL;
-					ast_clear_flag(o, DIAL_STILLGOING);	
+					ast_clear_flag64(o, DIAL_STILLGOING);	
 					handle_cause(AST_CAUSE_BUSY, &num);
 					break;
 				case AST_CONTROL_CONGESTION:
@@ -677,7 +680,7 @@
 					in->hangupcause = c->hangupcause;
 					ast_hangup(c);
 					c = o->chan = NULL;
-					ast_clear_flag(o, DIAL_STILLGOING);
+					ast_clear_flag64(o, DIAL_STILLGOING);
 					handle_cause(AST_CAUSE_CONGESTION, &num);
 					break;
 				case AST_CONTROL_RINGING:
@@ -686,7 +689,7 @@
 					/* Setup early media if appropriate */
 					if (single)
 						ast_channel_early_bridge(in, c);
-					if (!(pa->sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
+					if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK)) {
 						ast_indicate(in, AST_CONTROL_RINGING);
 						pa->sentringing++;
 					}
@@ -697,7 +700,7 @@
 					/* Setup early media if appropriate */
 					if (single)
 						ast_channel_early_bridge(in, c);
-					if (!ast_test_flag(outgoing, OPT_RINGBACK))
+					if (!ast_test_flag64(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROGRESS);
 					break;
 				case AST_CONTROL_VIDUPDATE:
@@ -710,7 +713,7 @@
 						ast_verbose (VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", c->name, in->name);
 					if (single)
 						ast_channel_early_bridge(in, c);
-					if (!ast_test_flag(outgoing, OPT_RINGBACK))
+					if (!ast_test_flag64(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROCEEDING);
 					break;
 				case AST_CONTROL_HOLD:
@@ -728,7 +731,7 @@
 					/* Ignore going off hook and flash */
 					break;
 				case -1:
-					if (!ast_test_flag(outgoing, OPT_RINGBACK | OPT_MUSICBACK)) {
+					if (!ast_test_flag64(outgoing, OPT_RINGBACK | OPT_MUSICBACK)) {
 						if (option_verbose > 2)
 							ast_verbose(VERBOSE_PREFIX_3 "%s stopped sounds\n", c->name);
 						ast_indicate(in, -1);
@@ -740,16 +743,16 @@
 				}
 			} else if (single) {
 				/* XXX are we sure the logic is correct ? or we should just switch on f->frametype ? */
-				if (f->frametype == AST_FRAME_VOICE && !ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
+				if (f->frametype == AST_FRAME_VOICE && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
 					if (ast_write(in, f)) 
 						ast_log(LOG_WARNING, "Unable to forward voice frame\n");
-				} else if (f->frametype == AST_FRAME_IMAGE && !ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
+				} else if (f->frametype == AST_FRAME_IMAGE && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
 					if (ast_write(in, f))
 						ast_log(LOG_WARNING, "Unable to forward image\n");
-				} else if (f->frametype == AST_FRAME_TEXT && !ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
+				} else if (f->frametype == AST_FRAME_TEXT && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
 					if (ast_write(in, f))
 						ast_log(LOG_WARNING, "Unable to send text\n");
-				} else if (f->frametype == AST_FRAME_HTML && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML)) {
+				} else if (f->frametype == AST_FRAME_HTML && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)) {
 					if (ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1)
 						ast_log(LOG_WARNING, "Unable to send URL\n");
 				}
@@ -776,7 +779,7 @@
 
 			/* now f is guaranteed non-NULL */
 			if (f->frametype == AST_FRAME_DTMF) {
-				if (ast_test_flag(peerflags, OPT_DTMF_EXIT)) {
+				if (ast_test_flag64(peerflags, OPT_DTMF_EXIT)) {
 					const char *context = pbx_builtin_getvar_helper(in, "EXITCONTEXT");
 					if (onedigit_goto(in, context, (char) f->subclass, 1)) {
 						if (option_verbose > 2)
@@ -790,7 +793,7 @@
 					}
 				}
 
-				if (ast_test_flag(peerflags, OPT_CALLER_HANGUP) && 
+				if (ast_test_flag64(peerflags, OPT_CALLER_HANGUP) && 
 						  (f->subclass == '*')) { /* hmm it it not guaranteed to be '*' anymore. */
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
@@ -803,7 +806,7 @@
 			}
 
 			/* Forward HTML stuff */
-			if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML)) 
+			if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)) 
 				if(ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
 					ast_log(LOG_WARNING, "Unable to send URL\n");
 			
@@ -842,13 +845,13 @@
 
 
 /* returns true if there is a valid privacy reply */
-static int valid_priv_reply(struct ast_flags *opts, int res)
+static int valid_priv_reply(struct ast_flags64 *opts, int res)
 {
 	if (res < '1')
 		return 0;
-	if (ast_test_flag(opts, OPT_PRIVACY) && res <= '5')
+	if (ast_test_flag64(opts, OPT_PRIVACY) && res <= '5')
 		return 1;
-	if (ast_test_flag(opts, OPT_SCREENING) && res <= '4')
+	if (ast_test_flag64(opts, OPT_SCREENING) && res <= '4')
 		return 1;
 	return 0;
 }
@@ -952,7 +955,7 @@
 }
 
 static int do_privacy(struct ast_channel *chan, struct ast_channel *peer,
-    struct ast_flags *opts, char **opt_args, struct privacy_args *pa)
+    struct ast_flags64 *opts, char **opt_args, struct privacy_args *pa)
 {
 
 	int res2;
@@ -966,13 +969,13 @@
 	   target extension was picked up. We are going to have to kill some
 	   time and make the caller believe the peer hasn't picked up yet */
 
-	if (ast_test_flag(opts, OPT_MUSICBACK) && !ast_strlen_zero(opt_args[OPT_ARG_MUSICBACK])) {
+	if (ast_test_flag64(opts, OPT_MUSICBACK) && !ast_strlen_zero(opt_args[OPT_ARG_MUSICBACK])) {
 		char *original_moh = ast_strdupa(chan->musicclass);
 		ast_indicate(chan, -1);
 		ast_string_field_set(chan, musicclass, opt_args[OPT_ARG_MUSICBACK]);
 		ast_moh_start(chan, opt_args[OPT_ARG_MUSICBACK], NULL);
 		ast_string_field_set(chan, musicclass, original_moh);
-	} else if (ast_test_flag(opts, OPT_RINGBACK)) {
+	} else if (ast_test_flag64(opts, OPT_RINGBACK)) {
 		ast_indicate(chan, AST_CONTROL_RINGING);
 		pa->sentringing++;
 	}
@@ -997,9 +1000,9 @@
 		/* now get input from the called party, as to their choice */
 		if( !res2 ) {
 			/* XXX can we have both, or they are mutually exclusive ? */
-			if( ast_test_flag(opts, OPT_PRIVACY) )
+			if( ast_test_flag64(opts, OPT_PRIVACY) )
 				res2 = ast_play_and_wait(peer,"priv-callee-options");
-			if( ast_test_flag(opts, OPT_SCREENING) )
+			if( ast_test_flag64(opts, OPT_SCREENING) )
 				res2 = ast_play_and_wait(peer,"screen-callee-options");
 		}
 		/*! \page DialPrivacy Dial Privacy scripts
@@ -1024,14 +1027,14 @@
 		res2 = ast_play_and_wait(peer, "vm-sorry");
 	}
 
-	if (ast_test_flag(opts, OPT_MUSICBACK)) {
+	if (ast_test_flag64(opts, OPT_MUSICBACK)) {
 		ast_moh_stop(chan);
-	} else if (ast_test_flag(opts, OPT_RINGBACK)) {
+	} else if (ast_test_flag64(opts, OPT_RINGBACK)) {
 		ast_indicate(chan, -1);
 		pa->sentringing=0;
 	}
 	ast_autoservice_stop(chan);
-	if(ast_test_flag(opts, OPT_PRIVACY) && (res2 >= '1' && res2 <= '5')) {
+	if(ast_test_flag64(opts, OPT_PRIVACY) && (res2 >= '1' && res2 <= '5')) {
 		/* map keypresses to various things, the index is res2 - '1' */
 		static const char *_val[] = { "ALLOW", "DENY", "TORTURE", "KILL", "ALLOW" };
 		static const int _flag[] = { AST_PRIVACY_ALLOW, AST_PRIVACY_DENY, AST_PRIVACY_TORTURE, AST_PRIVACY_KILL, AST_PRIVACY_ALLOW};
@@ -1055,7 +1058,7 @@
 		break;
 	case '5':
 		/* XXX should we set status to DENY ? */
-		if( ast_test_flag(opts, OPT_PRIVACY) )
+		if( ast_test_flag64(opts, OPT_PRIVACY) )
 			break;

[... 24027 lines stripped ...]



More information about the asterisk-commits mailing list