[asterisk-commits] branch bweschke/func_realtime_bug_5695 r16634 - in /team/bweschke/func_realti...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 30 19:11:41 MST 2006


Author: bweschke
Date: Thu Mar 30 20:11:34 2006
New Revision: 16634

URL: http://svn.digium.com/view/asterisk?rev=16634&view=rev
Log:
Merged revisions 16521,16528,16532-16533,16535,16548,16551,16558,16560-16564,16580,16600-16602,16611,16615-16617 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r16521 | kpfleming | 2006-03-30 08:19:25 -0600 (Thu, 30 Mar 2006) | 2 lines

be more careful when merging in a branch with automerge properties :-(

................
r16528 | rizzo | 2006-03-30 10:09:23 -0600 (Thu, 30 Mar 2006) | 4 lines

document why there are so many versions of the mutex functions,
with their pros and cons, and that we should converge to a single method.


................
r16532 | rizzo | 2006-03-30 11:10:11 -0600 (Thu, 30 Mar 2006) | 13 lines

do not export the tzlock and the list head, and introduce a new method,
ast_walk_indications(), to walk through the list of indications.
The new method returns an unlocked record, which is no different from the
behaviour of other existing methods in indications.c
(i.e. they all need to be fixed, with refcounts or some similar
method).

Note that ast_walk_indications() uses the pointer argument only as a
search key, so its implementation is completely safe.

In turn, this change allows the removal of AST_MUTEX_DEFINE_EXPORTED.


................
r16533 | rizzo | 2006-03-30 11:11:49 -0600 (Thu, 30 Mar 2006) | 3 lines

remove AST_MUTEX_DEFINE_EXPORTED, which now has no more clients.


................
r16535 | file | 2006-03-30 11:58:16 -0600 (Thu, 30 Mar 2006) | 10 lines

Merged revisions 16534 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16534 | file | 2006-03-30 13:55:28 -0400 (Thu, 30 Mar 2006) | 2 lines

Do not exceed the array size for maximum allowed moh files. (issue #6842)

........

................
r16548 | kpfleming | 2006-03-30 12:17:36 -0600 (Thu, 30 Mar 2006) | 2 lines

deprecate insecure=very and insecure=yes, since we have more explicit versions available now

................
r16551 | oej | 2006-03-30 13:05:00 -0600 (Thu, 30 Mar 2006) | 2 lines

Doxygen doc updates

................
r16558 | rizzo | 2006-03-30 15:29:39 -0600 (Thu, 30 Mar 2006) | 8 lines

as discussed with Mark a few weeks ago, the 'newstack' argument
in pbx_exec is always 1 so it can be removed.

This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.


................
r16560 | rizzo | 2006-03-30 15:45:43 -0600 (Thu, 30 Mar 2006) | 3 lines

don't use 8000, use DEFAULT_SAMPLE_RATE


................
r16561 | rizzo | 2006-03-30 15:47:22 -0600 (Thu, 30 Mar 2006) | 3 lines

use ast_strdup instead of strdup


................
r16562 | rizzo | 2006-03-30 15:49:24 -0600 (Thu, 30 Mar 2006) | 3 lines

localize a variable


................
r16563 | file | 2006-03-30 15:52:04 -0600 (Thu, 30 Mar 2006) | 2 lines

Block 1.2 fix for amd64, trunk version coming soon

................
r16564 | file | 2006-03-30 15:57:49 -0600 (Thu, 30 Mar 2006) | 2 lines

Add more 64-bit detection goodness (issue #6850 reported by evilbunny)

................
r16580 | tilghman | 2006-03-30 16:47:11 -0600 (Thu, 30 Mar 2006) | 10 lines

Merged revisions 16579 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16579 | tilghman | 2006-03-30 16:46:06 -0600 (Thu, 30 Mar 2006) | 2 lines

Bug 6849 - trivial typo fix

........

................
r16600 | tilghman | 2006-03-30 17:05:58 -0600 (Thu, 30 Mar 2006) | 10 lines

Merged revisions 16581 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r16581 | tilghman | 2006-03-30 16:56:35 -0600 (Thu, 30 Mar 2006) | 2 lines

Bug 6853 - Manager fixes: 1) extra ActionID, 2) missing colon

........

................
r16601 | rizzo | 2006-03-30 17:26:22 -0600 (Thu, 30 Mar 2006) | 3 lines

initial implementation of support for native atomic ops.


................
r16602 | markster | 2006-03-30 17:42:57 -0600 (Thu, 30 Mar 2006) | 2 lines

Add NetBSD for credits for editline

................
r16611 | rizzo | 2006-03-30 18:11:45 -0600 (Thu, 30 Mar 2006) | 3 lines

remove useless 'extern' in function declarations.


................
r16615 | oej | 2006-03-30 18:25:50 -0600 (Thu, 30 Mar 2006) | 3 lines

- Change AST_INLINE_AP to AST_INLINE_API for non-386 systems :-)
- Doxygen changes

................
r16616 | oej | 2006-03-30 18:33:28 -0600 (Thu, 30 Mar 2006) | 2 lines

Issue 5852 (casper) Code clean up, adding documentation on new switches. Thanks!

................
r16617 | file | 2006-03-30 18:53:32 -0600 (Thu, 30 Mar 2006) | 2 lines

Do not leave a thread in limbo if an error occurs, or if testing packet loss.

................

Modified:
    team/bweschke/func_realtime_bug_5695/   (props changed)
    team/bweschke/func_realtime_bug_5695/CREDITS
    team/bweschke/func_realtime_bug_5695/apps/app_dial.c
    team/bweschke/func_realtime_bug_5695/apps/app_echo.c
    team/bweschke/func_realtime_bug_5695/apps/app_exec.c
    team/bweschke/func_realtime_bug_5695/apps/app_macro.c
    team/bweschke/func_realtime_bug_5695/apps/app_meetme.c
    team/bweschke/func_realtime_bug_5695/apps/app_page.c
    team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c
    team/bweschke/func_realtime_bug_5695/apps/app_while.c
    team/bweschke/func_realtime_bug_5695/asterisk.c
    team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c
    team/bweschke/func_realtime_bug_5695/channels/chan_oss.c
    team/bweschke/func_realtime_bug_5695/channels/chan_sip.c
    team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile
    team/bweschke/func_realtime_bug_5695/include/asterisk/app.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/channel.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/features.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/indications.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/lock.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/pbx.h
    team/bweschke/func_realtime_bug_5695/indications.c
    team/bweschke/func_realtime_bug_5695/pbx.c
    team/bweschke/func_realtime_bug_5695/pbx/pbx_dundi.c
    team/bweschke/func_realtime_bug_5695/pbx/pbx_loopback.c
    team/bweschke/func_realtime_bug_5695/pbx/pbx_realtime.c
    team/bweschke/func_realtime_bug_5695/res/res_agi.c
    team/bweschke/func_realtime_bug_5695/res/res_features.c
    team/bweschke/func_realtime_bug_5695/res/res_indications.c
    team/bweschke/func_realtime_bug_5695/res/res_musiconhold.c
    team/bweschke/func_realtime_bug_5695/res/snmp/agent.c
    team/bweschke/func_realtime_bug_5695/utils.c

Propchange: team/bweschke/func_realtime_bug_5695/
            ('automerge' removed)

Propchange: team/bweschke/func_realtime_bug_5695/
            ('automerge-email' removed)

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 30 20:11:34 2006
@@ -1,1 +1,1 @@
-/trunk:1-16513
+/trunk:1-16633

Modified: team/bweschke/func_realtime_bug_5695/CREDITS
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/CREDITS?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/CREDITS (original)
+++ team/bweschke/func_realtime_bug_5695/CREDITS Thu Mar 30 20:11:34 2006
@@ -90,6 +90,11 @@
 Music provided by www.freeplaymusic.com
 
 === OTHER SOURCE CODE IN ASTERISK ===
+Asterisk uses libedit, the lightweight readline replacement from
+NetBSD. It is BSD-licensed and requires the following statement:
+
+      This product includes software developed by the NetBSD
+      Foundation, Inc. and its contributors.
 
 Digium did not implement the codecs in Asterisk.  Here is the copyright on the
 GSM source:

Modified: team/bweschke/func_realtime_bug_5695/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_dial.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_dial.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_dial.c Thu Mar 30 20:11:34 2006
@@ -1449,7 +1449,7 @@
 					if (*ch == '^')
 						*ch = '|';
 				}
-				res = pbx_exec(peer, app, opt_args[OPT_ARG_CALLEE_MACRO], 1);
+				res = pbx_exec(peer, app, opt_args[OPT_ARG_CALLEE_MACRO]);
 				ast_log(LOG_DEBUG, "Macro exited with status %d\n", res);
 				res = 0;
 			} else {

Modified: team/bweschke/func_realtime_bug_5695/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_echo.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_echo.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_echo.c Thu Mar 30 20:11:34 2006
@@ -59,7 +59,6 @@
 	int res = -1;
 	int format;
 	struct localuser *u;
-	struct ast_frame *f;
 
 	LOCAL_USER_ADD(u);
 
@@ -68,7 +67,7 @@
 	ast_set_read_format(chan, format);
 
 	while (ast_waitfor(chan, -1) > -1) {
-		f = ast_read(chan);
+		struct ast_frame *f = ast_read(chan);
 		if (!f)
 			break;
 		f->delivery.tv_sec = 0;

Modified: team/bweschke/func_realtime_bug_5695/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_exec.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_exec.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_exec.c Thu Mar 30 20:11:34 2006
@@ -82,7 +82,7 @@
 			if (appname) {
 				app = pbx_findapp(appname);
 				if (app) {
-					res = pbx_exec(chan, app, args, 1);
+					res = pbx_exec(chan, app, args);
 				} else {
 					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
 					res = -1;

Modified: team/bweschke/func_realtime_bug_5695/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_macro.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_macro.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_macro.c Thu Mar 30 20:11:34 2006
@@ -188,7 +188,7 @@
   		snprintf(varname, sizeof(varname), "ARG%d", argc);
 		s = pbx_builtin_getvar_helper(chan, varname);
 		if (s)
-			oldargs[argc] = strdup(s);
+			oldargs[argc] = ast_strdup(s);
 		pbx_builtin_setvar_helper(chan, varname, cur);
 		argc++;
 	}

Modified: team/bweschke/func_realtime_bug_5695/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_meetme.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_meetme.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_meetme.c Thu Mar 30 20:11:34 2006
@@ -1143,7 +1143,7 @@
 		app = pbx_findapp("agi");
 		if (app) {
 			char *s = ast_strdupa(agifile);
-			ret = pbx_exec(chan, app, s, 1);
+			ret = pbx_exec(chan, app, s);
 		} else {
 			ast_log(LOG_WARNING, "Could not find application (agi)\n");
 			ret = -2;

Modified: team/bweschke/func_realtime_bug_5695/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_page.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_page.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_page.c Thu Mar 30 20:11:34 2006
@@ -186,7 +186,7 @@
 	}
 	if (!res) {
 		snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%sqxd", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t");
-		pbx_exec(chan, app, meetmeopts, 1);
+		pbx_exec(chan, app, meetmeopts);
 	}
 
 	LOCAL_USER_REMOVE(u);

Modified: team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c Thu Mar 30 20:11:34 2006
@@ -3422,7 +3422,7 @@
 				old_priority = chan->priority;
 				
 				/* call the the Directory, changes the channel */
-				res = pbx_exec(chan, app, context ? context : "default", 1);
+				res = pbx_exec(chan, app, context ? context : "default");
 				
 				ast_copy_string(username, chan->exten, sizeof(username));
 				

Modified: team/bweschke/func_realtime_bug_5695/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_while.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_while.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_while.c Thu Mar 30 20:11:34 2006
@@ -101,7 +101,7 @@
 
 		if (ast_true(expr)) { 
 			if ((app = pbx_findapp(myapp))) {
-				res = pbx_exec(chan, app, mydata, 1);
+				res = pbx_exec(chan, app, mydata);
 			} else {
 				ast_log(LOG_WARNING, "Count not find application! (%s)\n", myapp);
 				res = -1;

Modified: team/bweschke/func_realtime_bug_5695/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/asterisk.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/asterisk.c (original)
+++ team/bweschke/func_realtime_bug_5695/asterisk.c Thu Mar 30 20:11:34 2006
@@ -30,7 +30,7 @@
  *
  * \section copyright Copyright and author
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  * Asterisk is a trade mark registered by Digium, Inc.
  *
  * \author Mark Spencer <markster at digium.com>
@@ -216,7 +216,7 @@
 char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH] = "\0";
 char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH] = "\0";
 char ast_config_AST_CTL[AST_CONFIG_MAX_PATH] = "asterisk.ctl";
-char ast_config_AST_SYSTEM_NAME[20]="";
+char ast_config_AST_SYSTEM_NAME[20] = "";
 
 static char *_argv[256];
 static int shuttingdown = 0;
@@ -462,7 +462,7 @@
 static void ast_network_puts(const char *string)
 {
 	int x;
-	for (x=0;x<AST_MAX_CONNECTS; x++) {
+	for (x=0; x < AST_MAX_CONNECTS; x++) {
 		if (consoles[x].fd > -1) 
 			fdprint(consoles[x].p[1], string);
 	}
@@ -503,7 +503,7 @@
 static void *netconsole(void *vconsole)
 {
 	struct console *con = vconsole;
-	char hostname[MAXHOSTNAMELEN]="";
+	char hostname[MAXHOSTNAMELEN] = "";
 	char tmp[512];
 	int res;
 	struct pollfd fds[2];
@@ -566,11 +566,11 @@
 	pthread_attr_t attr;
 	pthread_attr_init(&attr);
 	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-	for(;;) {
+	for (;;) {
 		if (ast_socket < 0)
 			return NULL;
 		fds[0].fd = ast_socket;
-		fds[0].events= POLLIN;
+		fds[0].events = POLLIN;
 		s = poll(fds, 1, -1);
 		if (s < 0) {
 			if (errno != EINTR)
@@ -583,7 +583,7 @@
 			if (errno != EINTR)
 				ast_log(LOG_WARNING, "Accept returned %d: %s\n", s, strerror(errno));
 		} else {
-			for (x=0;x<AST_MAX_CONNECTS;x++) {
+			for (x = 0; x < AST_MAX_CONNECTS; x++) {
 				if (consoles[x].fd < 0) {
 					if (socketpair(AF_LOCAL, SOCK_STREAM, 0, consoles[x].p)) {
 						ast_log(LOG_ERROR, "Unable to create pipe: %s\n", strerror(errno));
@@ -829,7 +829,7 @@
 			if (option_verbose && ast_opt_console)
 				ast_verbose("Beginning asterisk %s....\n", restart ? "restart" : "shutdown");
 			time(&s);
-			for(;;) {
+			for (;;) {
 				time(&e);
 				/* Wait up to 15 seconds for all channels to go away */
 				if ((e - s) > 15)
@@ -846,7 +846,7 @@
 				ast_begin_shutdown(0);
 			if (option_verbose && ast_opt_console)
 				ast_verbose("Waiting for inactivity to perform %s...\n", restart ? "restart" : "halt");
-			for(;;) {
+			for (;;) {
 				if (!ast_active_channels())
 					break;
 				if (!shuttingdown)
@@ -895,7 +895,7 @@
 		if (option_verbose || ast_opt_console)
 			ast_verbose("Preparing for Asterisk restart...\n");
 		/* Mark all FD's for closing on exec */
-		for (x=3;x<32768;x++) {
+		for (x=3; x < 32768; x++) {
 			fcntl(x, F_SETFD, FD_CLOEXEC);
 		}
 		if (option_verbose || ast_opt_console)
@@ -940,7 +940,7 @@
 static void console_verboser(const char *s, int pos, int replace, int complete)
 {
 	char tmp[80];
-	const char *c=NULL;
+	const char *c = NULL;
 	/* Return to the beginning of the line */
 	if (!pos) {
 		fprintf(stdout, "\r");
@@ -964,7 +964,7 @@
 
 static int ast_all_zeros(char *s)
 {
-	while(*s) {
+	while (*s) {
 		if (*s > 32)
 			return 0;
 		s++;  
@@ -1234,8 +1234,8 @@
 
 static int ast_el_read_char(EditLine *el, char *cp)
 {
-	int num_read=0;
-	int lastpos=0;
+	int num_read = 0;
+	int lastpos = 0;
 	struct pollfd fds[2];
 	int res;
 	int max;
@@ -1276,7 +1276,7 @@
 					int tries;
 					int reconnects_per_second = 20;
 					fprintf(stderr, "Attempting to reconnect for 30 seconds\n");
-					for (tries=0;tries<30 * reconnects_per_second;tries++) {
+					for (tries=0; tries < 30 * reconnects_per_second; tries++) {
 						if (ast_tryconnect()) {
 							fprintf(stderr, "Reconnect succeeded after %.3f seconds\n", 1.0 / reconnects_per_second * tries);
 							printf(term_quit());
@@ -1315,7 +1315,7 @@
 {
 	static char prompt[200];
 	char *pfmt;
-	int color_used=0;
+	int color_used = 0;
 	char term_code[20];
 
 	if ((pfmt = getenv("ASTERISK_PROMPT"))) {
@@ -1334,100 +1334,100 @@
 
 				t++;
 				switch (*t) {
-					case 'C': /* color */
-						t++;
-						if (sscanf(t, "%d;%d%n", &fgcolor, &bgcolor, &i) == 2) {
-							strncat(p, term_color_code(term_code, fgcolor, bgcolor, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
-							t += i - 1;
-						} else if (sscanf(t, "%d%n", &fgcolor, &i) == 1) {
-							strncat(p, term_color_code(term_code, fgcolor, 0, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
-							t += i - 1;
-						}
-
-						/* If the color has been reset correctly, then there's no need to reset it later */
-						if ((fgcolor == COLOR_WHITE) && (bgcolor == COLOR_BLACK)) {
-							color_used = 0;
-						} else {
-							color_used = 1;
-						}
-						break;
-					case 'd': /* date */
-						memset(&tm, 0, sizeof(tm));
-						time(&ts);
-						if (localtime_r(&ts, &tm)) {
-							strftime(p, sizeof(prompt) - strlen(prompt), "%Y-%m-%d", &tm);
-						}
-						break;
-					case 'h': /* hostname */
-						if (!gethostname(hostname, sizeof(hostname) - 1)) {
-							strncat(p, hostname, sizeof(prompt) - strlen(prompt) - 1);
-						} else {
-							strncat(p, "localhost", sizeof(prompt) - strlen(prompt) - 1);
-						}
-						break;
-					case 'H': /* short hostname */
-						if (!gethostname(hostname, sizeof(hostname) - 1)) {
-							for (i=0;i<sizeof(hostname);i++) {
-								if (hostname[i] == '.') {
-									hostname[i] = '\0';
-									break;
-								}
-							}
-							strncat(p, hostname, sizeof(prompt) - strlen(prompt) - 1);
-						} else {
-							strncat(p, "localhost", sizeof(prompt) - strlen(prompt) - 1);
-						}
-						break;
-#ifdef linux
-					case 'l': /* load avg */
-						t++;
-						if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
-							float avg1, avg2, avg3;
-							int actproc, totproc, npid, which;
-							fscanf(LOADAVG, "%f %f %f %d/%d %d",
-								&avg1, &avg2, &avg3, &actproc, &totproc, &npid);
-							if (sscanf(t, "%d", &which) == 1) {
-								switch (which) {
-									case 1:
-										snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg1);
-										break;
-									case 2:
-										snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg2);
-										break;
-									case 3:
-										snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg3);
-										break;
-									case 4:
-										snprintf(p, sizeof(prompt) - strlen(prompt), "%d/%d", actproc, totproc);
-										break;
-									case 5:
-										snprintf(p, sizeof(prompt) - strlen(prompt), "%d", npid);
-										break;
-								}
+				case 'C': /* color */
+					t++;
+					if (sscanf(t, "%d;%d%n", &fgcolor, &bgcolor, &i) == 2) {
+						strncat(p, term_color_code(term_code, fgcolor, bgcolor, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
+						t += i - 1;
+					} else if (sscanf(t, "%d%n", &fgcolor, &i) == 1) {
+						strncat(p, term_color_code(term_code, fgcolor, 0, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
+						t += i - 1;
+					}
+
+					/* If the color has been reset correctly, then there's no need to reset it later */
+					if ((fgcolor == COLOR_WHITE) && (bgcolor == COLOR_BLACK)) {
+						color_used = 0;
+					} else {
+						color_used = 1;
+					}
+					break;
+				case 'd': /* date */
+					memset(&tm, 0, sizeof(tm));
+					time(&ts);
+					if (localtime_r(&ts, &tm)) {
+						strftime(p, sizeof(prompt) - strlen(prompt), "%Y-%m-%d", &tm);
+					}
+					break;
+				case 'h': /* hostname */
+					if (!gethostname(hostname, sizeof(hostname) - 1)) {
+						strncat(p, hostname, sizeof(prompt) - strlen(prompt) - 1);
+					} else {
+						strncat(p, "localhost", sizeof(prompt) - strlen(prompt) - 1);
+					}
+					break;
+				case 'H': /* short hostname */
+					if (!gethostname(hostname, sizeof(hostname) - 1)) {
+						for (i = 0; i < sizeof(hostname); i++) {
+							if (hostname[i] == '.') {
+								hostname[i] = '\0';
+								break;
 							}
 						}
-						break;
+						strncat(p, hostname, sizeof(prompt) - strlen(prompt) - 1);
+					} else {
+						strncat(p, "localhost", sizeof(prompt) - strlen(prompt) - 1);
+					}
+					break;
+#ifdef linux
+				case 'l': /* load avg */
+					t++;
+					if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
+						float avg1, avg2, avg3;
+						int actproc, totproc, npid, which;
+						fscanf(LOADAVG, "%f %f %f %d/%d %d",
+							&avg1, &avg2, &avg3, &actproc, &totproc, &npid);
+						if (sscanf(t, "%d", &which) == 1) {
+							switch (which) {
+							case 1:
+								snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg1);
+								break;
+							case 2:
+								snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg2);
+								break;
+							case 3:
+								snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg3);
+								break;
+							case 4:
+								snprintf(p, sizeof(prompt) - strlen(prompt), "%d/%d", actproc, totproc);
+								break;
+							case 5:
+								snprintf(p, sizeof(prompt) - strlen(prompt), "%d", npid);
+								break;
+							}
+						}
+					}
+					break;
 #endif
-					case 't': /* time */
-						memset(&tm, 0, sizeof(tm));
-						time(&ts);
-						if (localtime_r(&ts, &tm)) {
-							strftime(p, sizeof(prompt) - strlen(prompt), "%H:%M:%S", &tm);
-						}
-						break;
-					case '#': /* process console or remote? */
-						if (!ast_opt_remote) {
-							strncat(p, "#", sizeof(prompt) - strlen(prompt) - 1);
-						} else {
-							strncat(p, ">", sizeof(prompt) - strlen(prompt) - 1);
-						}
-						break;
-					case '%': /* literal % */
-						strncat(p, "%", sizeof(prompt) - strlen(prompt) - 1);
-						break;
-					case '\0': /* % is last character - prevent bug */
-						t--;
-						break;
+				case 't': /* time */
+					memset(&tm, 0, sizeof(tm));
+					time(&ts);
+					if (localtime_r(&ts, &tm)) {
+						strftime(p, sizeof(prompt) - strlen(prompt), "%H:%M:%S", &tm);
+					}
+					break;
+				case '#': /* process console or remote? */
+					if (!ast_opt_remote) {
+						strncat(p, "#", sizeof(prompt) - strlen(prompt) - 1);
+					} else {
+						strncat(p, ">", sizeof(prompt) - strlen(prompt) - 1);
+					}
+					break;
+				case '%': /* literal % */
+					strncat(p, "%", sizeof(prompt) - strlen(prompt) - 1);
+					break;
+				case '\0': /* % is last character - prevent bug */
+					t--;
+					break;
 				}
 				while (*p != '\0') {
 					p++;
@@ -1551,7 +1551,7 @@
 
 static char *cli_complete(EditLine *el, int ch)
 {
-	int len=0;
+	int len = 0;
 	char *ptr;
 	int nummatches = 0;
 	char **matches;
@@ -1750,7 +1750,7 @@
 	char *version;
 	int pid;
 	char tmp[80];
-	char *stringp=NULL;
+	char *stringp = NULL;
 
 	char *ebuf;
 	int num = 0;
@@ -1758,13 +1758,13 @@
 	read(ast_consock, buf, sizeof(buf));
 	if (data)
 		write(ast_consock, data, strlen(data) + 1);
-	stringp=buf;
+	stringp = buf;
 	hostname = strsep(&stringp, "/");
 	cpid = strsep(&stringp, "/");
 	version = strsep(&stringp, "\n");
 	if (!version)
 		version = "<Version Unknown>";
-	stringp=hostname;
+	stringp = hostname;
 	strsep(&stringp, ".");
 	if (cpid)
 		pid = atoi(cpid);
@@ -1797,7 +1797,7 @@
 		}
 		return;
 	}
-	for(;;) {
+	for (;;) {
 		ebuf = (char *)el_gets(el, &num);
 
 		if (!ast_strlen_zero(ebuf)) {
@@ -1822,7 +1822,7 @@
 }
 
 static int show_cli_help(void) {
-	printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2005, Digium, Inc. and others.\n");
+	printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2006, Digium, Inc. and others.\n");
 	printf("Usage: asterisk [OPTIONS]\n");
 	printf("Valid Options:\n");
 	printf("   -V              Display version number and exit\n");
@@ -1835,6 +1835,9 @@
 	printf("   -g              Dump core in case of a crash\n");
 	printf("   -h              This help screen\n");
 	printf("   -i              Initialize crypto keys at startup\n");
+	printf("   -I              Enable internal timing if Zaptel timer is available\n");
+	printf("   -L <load>       Limit the maximum load average before rejecting new calls\n");
+	printf("   -M <value>      Limit the maximum number of calls to the specified value\n");
 	printf("   -n              Disable console colorization\n");
 	printf("   -p              Run as pseudo-realtime thread\n");
 	printf("   -q              Quiet mode (suppress output)\n");
@@ -1865,7 +1868,7 @@
 	/* init with buildtime config */
 	ast_copy_string(ast_config_AST_CONFIG_DIR, AST_CONFIG_DIR, sizeof(ast_config_AST_CONFIG_DIR));
 	ast_copy_string(ast_config_AST_SPOOL_DIR, AST_SPOOL_DIR, sizeof(ast_config_AST_SPOOL_DIR));
-	ast_copy_string(ast_config_AST_MODULE_DIR, AST_MODULE_DIR, sizeof(ast_config_AST_VAR_DIR));
+	ast_copy_string(ast_config_AST_MODULE_DIR, AST_MODULE_DIR, sizeof(ast_config_AST_MODULE_DIR));
  	snprintf(ast_config_AST_MONITOR_DIR, sizeof(ast_config_AST_MONITOR_DIR) - 1, "%s/monitor", ast_config_AST_SPOOL_DIR);
 	ast_copy_string(ast_config_AST_VAR_DIR, AST_VAR_DIR, sizeof(ast_config_AST_VAR_DIR));
 	ast_copy_string(ast_config_AST_LOG_DIR, AST_LOG_DIR, sizeof(ast_config_AST_LOG_DIR));
@@ -2004,23 +2007,23 @@
 {
 	int c;
 	char filename[80] = "";
-	char hostname[MAXHOSTNAMELEN]="";
+	char hostname[MAXHOSTNAMELEN] = "";
 	char tmp[80];
 	char * xarg = NULL;
 	int x;
 	FILE *f;
 	sigset_t sigs;
 	int num;
-	int is_child_of_nonroot=0;
+	int is_child_of_nonroot = 0;
 	char *buf;
-	char *runuser=NULL, *rungroup=NULL;
+	char *runuser = NULL, *rungroup = NULL;
 
 	/* Remember original args for restart */
 	if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) {
 		fprintf(stderr, "Truncating argument size to %d\n", (int)(sizeof(_argv) / sizeof(_argv[0])) - 1);
 		argc = sizeof(_argv) / sizeof(_argv[0]) - 1;
 	}
-	for (x=0;x<argc;x++)
+	for (x=0; x<argc; x++)
 		_argv[x] = argv[x];
 	_argv[x] = NULL;
 
@@ -2039,21 +2042,14 @@
 	tdd_init();
 	/* When Asterisk restarts after it has dropped the root privileges,
 	 * it can't issue setuid(), setgid(), setgroups() or set_priority() 
-	 * */
+	 */
 	if (getenv("ASTERISK_ALREADY_NONROOT"))
 		is_child_of_nonroot=1;
 	if (getenv("HOME")) 
 		snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
-	/* Check if we're root */
-	/*
-	if (geteuid()) {
-		ast_log(LOG_ERROR, "Must be run as root\n");
-		exit(1);
-	}
-	*/
 	/* Check for options */
-	while((c=getopt(argc, argv, "tThfdvVqprRgciInx:U:G:C:L:M:")) != -1) {
-		switch(c) {
+	while ((c = getopt(argc, argv, "tThfdvVqprRgciInx:U:G:C:L:M:")) != -1) {
+		switch (c) {
 		case 'd':
 			option_debug++;
 			ast_set_flag(&ast_options, AST_OPT_FLAG_NO_FORK);
@@ -2091,7 +2087,6 @@
 		case 'q':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_QUIET);
 			break;
-			break;
 		case 't':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES);
 			break;
@@ -2112,7 +2107,7 @@
 		case 'i':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS);
 			break;
-		case'g':
+		case 'g':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE);
 			break;
 		case 'h':
@@ -2160,6 +2155,7 @@
 		rungroup = ast_config_AST_RUN_GROUP;
 	if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
 		runuser = ast_config_AST_RUN_USER;
+
 #ifndef __CYGWIN__
 
 	if (!is_child_of_nonroot) 
@@ -2205,7 +2201,7 @@
 			ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", (int)pw->pw_uid, runuser);
 			exit(1);
 		}
-		setenv("ASTERISK_ALREADY_NONROOT","yes",1);
+		setenv("ASTERISK_ALREADY_NONROOT", "yes", 1);
 		if (option_verbose)
 			ast_verbose("Running as user '%s'\n", runuser);
 	}
@@ -2230,7 +2226,6 @@
 	register_config_cli();
 	read_config_maps();
 	
-
 	if (ast_opt_console) {
 		if (el_hist == NULL || el == NULL)
 			ast_el_initialize();
@@ -2259,7 +2254,7 @@
 			exit(1);
 		}
 	} else if (ast_opt_remote || ast_opt_exec) {
-		ast_log(LOG_ERROR, "Unable to connect to remote asterisk (does %s exist?)\n",ast_config_AST_SOCKET);
+		ast_log(LOG_ERROR, "Unable to connect to remote asterisk (does %s exist?)\n", ast_config_AST_SOCKET);
 		printf(term_quit());
 		exit(1);
 	}
@@ -2273,7 +2268,7 @@
 		ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", ast_config_AST_PID, strerror(errno));
 
 	if (!option_verbose && !option_debug && !ast_opt_no_fork && !ast_opt_console) {
-		daemon(0,0);
+		daemon(0, 0);
 		/* Blindly re-write pid file since we are forking */
 		unlink(ast_config_AST_PID);
 		f = fopen(ast_config_AST_PID, "w");
@@ -2389,7 +2384,6 @@
 	ast_enum_reload();
 	ast_rtp_reload();
 #endif
-
 
 	/* We might have the option of showing a console, but for now just
 	   do nothing... */
@@ -2423,7 +2417,7 @@
 				consolehandler((char *)buf);
 			} else {
 				if (write(STDOUT_FILENO, "\nUse EXIT or QUIT to exit the asterisk console\n",
-								  strlen("\nUse EXIT or QUIT to exit the asterisk console\n")) < 0) {
+						strlen("\nUse EXIT or QUIT to exit the asterisk console\n")) < 0) {
 					/* Whoa, stdout disappeared from under us... Make /dev/null's */
 					int fd;
 					fd = open("/dev/null", O_RDWR);
@@ -2431,7 +2425,7 @@
 						dup2(fd, STDOUT_FILENO);
 						dup2(fd, STDIN_FILENO);
 					} else
-						ast_log(LOG_WARNING, "Failed to open /dev/null to recover from dead console.  Bad things will happen!\n");
+						ast_log(LOG_WARNING, "Failed to open /dev/null to recover from dead console. Bad things will happen!\n");
 					break;
 				}
 			}

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c Thu Mar 30 20:11:34 2006
@@ -6558,11 +6558,12 @@
 			if (errno != ECONNREFUSED)
 				ast_log(LOG_WARNING, "Error: %s\n", strerror(errno));
 			handle_error();
+			ASTOBJ_CONTAINER_LINK_END(&idlelist, thread);
 			return 1;
 		}
-		if(test_losspct) { /* simulate random loss condition */
-			if( (100.0*rand()/(RAND_MAX+1.0)) < test_losspct) 
-				return 1;
+		if (test_losspct && ((100.0*rand()/(RAND_MAX+1.0)) < test_losspct)) { /* simulate random loss condition */
+			ASTOBJ_CONTAINER_LINK_END(&idlelist, thread); 
+			return 1;
 		}
 		/* Mark as ready and send on its way */
 		thread->iostate = IAX_IOSTATE_READY;
@@ -9573,7 +9574,7 @@
 }
 
 /*! \brief Execute IAX2 dialplan switch */
-static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
+static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	char odata[256];
 	char req[256];
@@ -9589,7 +9590,7 @@
 		if (dialstatus) {
 			dial = pbx_findapp(dialstatus);
 			if (dial) 
-				pbx_exec(chan, dial, "", newstack);
+				pbx_exec(chan, dial, "");
 		}
 		return -1;
 	} else if (priority != 1)
@@ -9618,7 +9619,7 @@
 	ast_mutex_unlock(&dpcache_lock);
 	dial = pbx_findapp("Dial");
 	if (dial) {
-		return pbx_exec(chan, dial, req, newstack);
+		return pbx_exec(chan, dial, req);
 	} else {
 		ast_log(LOG_WARNING, "No dial application registered\n");
 	}

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_oss.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_oss.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_oss.c Thu Mar 30 20:11:34 2006
@@ -671,7 +671,7 @@
 		ast_log(LOG_WARNING, "Failed to set audio device to mono\n");
 		return -1;
 	}
-	fmt = desired = 8000; /* 8000 Hz desired */
+	fmt = desired = DEFAULT_SAMPLE_RATE; /* 8000 Hz desired */
 	res = ioctl(fd, SNDCTL_DSP_SPEED, &fmt);
 
 	if (res < 0) {

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_sip.c?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_sip.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_sip.c Thu Mar 30 20:11:34 2006
@@ -8287,11 +8287,7 @@
 		ast_cli(fd,"\n");
 		ASTOBJ_UNREF(peer,sip_destroy_peer);
 	} else  if (peer && type == 1) { /* manager listing */
-		char *actionid = astman_get_header(m,"ActionID");
-
 		astman_append(s, "Channeltype: SIP\r\n");
-		if (actionid)
-			astman_append(s, "ActionID: %s\r\n", actionid);
 		astman_append(s, "ObjectName: %s\r\n", peer->name);
 		astman_append(s, "ChanObjectType: peer\r\n");
 		astman_append(s, "SecretExist: %s\r\n", ast_strlen_zero(peer->secret)?"N":"Y");
@@ -8326,7 +8322,7 @@
 		astman_append(s, "SIP-VideoSupport: %s\r\n", (ast_test_flag(&peer->flags[1], SIP_PAGE2_VIDEOSUPPORT)?"Y":"N"));
 
 		/* - is enumerated */
-		astman_append(s, "SIP-DTMFmode %s\r\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
+		astman_append(s, "SIP-DTMFmode: %s\r\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
 		astman_append(s, "SIPLastMsg: %d\r\n", peer->lastmsg);
 		astman_append(s, "ToHost: %s\r\n", peer->tohost);
 		astman_append(s, "Address-IP: %s\r\nAddress-Port: %d\r\n",  peer->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), peer->addr.sin_addr) : "", ntohs(peer->addr.sin_port));
@@ -11959,6 +11955,8 @@
 static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v)
 {
 	int res = 0;
+	static int dep_insecure_very = 0;
+	static int dep_insecure_yes = 0;
 
 	if (!strcasecmp(v->name, "trustrpid")) {
 		ast_set_flag(&mask[0], SIP_TRUSTRPID);
@@ -12008,10 +12006,20 @@
 	} else if (!strcasecmp(v->name, "insecure")) {
 		ast_set_flag(&mask[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
 		ast_clear_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
-		if (!strcasecmp(v->value, "very"))
+		if (!strcasecmp(v->value, "very")) {
 			ast_set_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
-		else if (ast_true(v->value))
+			if (!dep_insecure_very) {
+				ast_log(LOG_WARNING, "insecure=very at line %d is deprecated; use insecure=port,invite instead\n", v->lineno);
+				dep_insecure_very = 1;
+			}
+		}
+		else if (ast_true(v->value)) {
 			ast_set_flag(&flags[0], SIP_INSECURE_PORT);
+			if (!dep_insecure_yes) {
+				ast_log(LOG_WARNING, "insecure=%s at line %d is deprecated; use insecure=port instead\n", v->value, v->lineno);
+				dep_insecure_yes = 1;
+			}
+		}
 		else if (!ast_false(v->value)) {
 			char buf[64];
 			char *word, *next;

Modified: team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile (original)
+++ team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile Thu Mar 30 20:11:34 2006
@@ -38,7 +38,7 @@
 ######### probably require gcc. 
 
 ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
-ifeq (, $(findstring $(PROC) , x86_64 ultrasparc sparc64 arm ppc ppc64 ia64 ))
+ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc ppc64 ia64 ))
 ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l ))
 OPTIMIZE+=-march=$(PROC)
 endif
@@ -215,7 +215,7 @@
 # XXX Keep a space after each findstring argument
 # XXX should merge with GSM_OBJECTS
 ifeq (${OSARCH},Linux)
-ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc ))
+ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
 ifeq (,$(findstring ${PROC} , arm ia64 ))
 GSM_SOURCES+= $(SRC)/k6opt.s
 endif
@@ -267,7 +267,7 @@
 		$(SRC)/table.o
 
 ifeq (${OSARCH},Linux)
-ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc ))
+ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
 ifeq (,$(findstring ${PROC} , arm ia64 ))
 GSM_OBJECTS+= $(SRC)/k6opt.o
 endif

Modified: team/bweschke/func_realtime_bug_5695/include/asterisk/app.h
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/include/asterisk/app.h?rev=16634&r1=16633&r2=16634&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/include/asterisk/app.h (original)
+++ team/bweschke/func_realtime_bug_5695/include/asterisk/app.h Thu Mar 30 20:11:34 2006
@@ -80,7 +80,7 @@
 
 /*!	\brief Runs an IVR menu 
 	\return returns 0 on successful completion, -1 on hangup, or -2 on user error in menu */
-extern int ast_ivr_menu_run(struct ast_channel *c, struct ast_ivr_menu *menu, void *cbdata);
+int ast_ivr_menu_run(struct ast_channel *c, struct ast_ivr_menu *menu, void *cbdata);
 
 /*! \brief Plays a stream and gets DTMF data from a channel 
  * \param c Which channel one is interacting with
@@ -94,10 +94,10 @@
  *  is pressed during playback, it will immediately break out of the message and continue
  *  execution of your code.
  */
-extern int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout);
+int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout);
 
 /*! \brief Full version with audiofd and controlfd.  NOTE: returns '2' on ctrlfd available, not '1' like other full functions */

[... 845 lines stripped ...]


More information about the asterisk-commits mailing list