[asterisk-commits] branch rizzo/base r9936 - in /team/rizzo/base: ./ apps/ channels/ channels/mi...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 14 10:35:27 MST 2006


Author: rizzo
Date: Tue Feb 14 11:35:22 2006
New Revision: 9936

URL: http://svn.digium.com/view/asterisk?rev=9936&view=rev
Log:
prctl portability fixes,
manual merge of previous commits


Modified:
    team/rizzo/base/apps/app_meetme.c
    team/rizzo/base/asterisk.c
    team/rizzo/base/channels/misdn/isdn_lib.c
    team/rizzo/base/channels/misdn_config.c
    team/rizzo/base/funcs/func_enum.c
    team/rizzo/base/pbx/pbx_dundi.c

Modified: team/rizzo/base/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/apps/app_meetme.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/apps/app_meetme.c (original)
+++ team/rizzo/base/apps/app_meetme.c Tue Feb 14 11:35:22 2006
@@ -977,6 +977,8 @@
 		}
 	}
 
+	ast_indicate(chan, -1);
+
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_WARNING, "Unable to set '%s' to write linear mode\n", chan->name);
 		goto outrun;
@@ -987,7 +989,6 @@
 		goto outrun;
 	}
 
-	ast_indicate(chan, -1);
 	retryzap = strcasecmp(chan->tech->type, "Zap");
 	user->zapchannel = !retryzap;
 
@@ -1593,6 +1594,10 @@
 			lastmarked = currentmarked;
 		}
 	}
+
+	if (musiconhold)
+		ast_moh_stop(chan);
+	
 	if (using_pseudo)
 		close(fd);
 	else {

Modified: team/rizzo/base/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/asterisk.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/asterisk.c (original)
+++ team/rizzo/base/asterisk.c Tue Feb 14 11:35:22 2006
@@ -74,6 +74,9 @@
 #include <grp.h>
 #include <pwd.h>
 #include <sys/stat.h>
+#ifdef linux
+#include <sys/prctl.h>
+#endif
 #include <regex.h>
 
 #if  defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS)
@@ -2257,6 +2260,14 @@
 
 #endif /* __CYGWIN__ */
 
+	if (geteuid() && ast_opt_dump_core) {
+#ifdef linux
+		if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
+			ast_log(LOG_WARNING, "Unable to set the process for core dumps after changing to a non-root user. %s\n", strerror(errno));
+		}	
+#endif
+	}
+
 	term_init();
 	printf(term_end());
 	fflush(stdout);

Modified: team/rizzo/base/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/channels/misdn/isdn_lib.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/channels/misdn/isdn_lib.c (original)
+++ team/rizzo/base/channels/misdn/isdn_lib.c Tue Feb 14 11:35:22 2006
@@ -2037,7 +2037,8 @@
 				
 				int i=cb_event( EVENT_BCHAN_DATA, bc, glob_mgr->user_data);
 				if (i<0) {
-					clean_up_bc(bc);
+					cb_log(2,stack->port,"cb_event returned <0\n");
+					/*clean_up_bc(bc);*/
 				}
 			}
 		}
@@ -3247,7 +3248,7 @@
  */
 void manager_ph_control(struct misdn_bchannel *bc, int c1, int c2)
 {
-	unsigned char buffer[mISDN_HEADER_LEN+sizeof(int)+sizeof(int)];
+	unsigned char buffer[mISDN_HEADER_LEN+2*sizeof(long)];
 	iframe_t *ctrl = (iframe_t *)buffer; /* preload data */
 	unsigned long *d = (unsigned long *)&ctrl->data.p;
 	struct misdn_stack *stack=get_stack_by_bc(bc);
@@ -3266,7 +3267,7 @@
  */
 void manager_ph_control_block(struct misdn_bchannel *bc, int c1, void *c2, int c2_len)
 {
-	unsigned char buffer[mISDN_HEADER_LEN+sizeof(int)+c2_len];
+	unsigned char buffer[mISDN_HEADER_LEN+sizeof(long)+c2_len];
 	iframe_t *ctrl = (iframe_t *)buffer;
 	unsigned long *d = (unsigned long *)&ctrl->data.p;
 	struct misdn_stack *stack=get_stack_by_bc(bc);

Modified: team/rizzo/base/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/channels/misdn_config.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/channels/misdn_config.c (original)
+++ team/rizzo/base/channels/misdn_config.c Tue Feb 14 11:35:22 2006
@@ -105,7 +105,7 @@
 	{ "early_bconnect", MISDN_CFG_EARLY_BCONNECT, MISDN_CTYPE_BOOL, "yes", NONE },
 	{ "echocancel", MISDN_CFG_ECHOCANCEL, MISDN_CTYPE_BOOLINT, "0", 128 },
 	{ "echocancelwhenbridged", MISDN_CFG_ECHOCANCELWHENBRIDGED, MISDN_CTYPE_BOOL, "no", NONE },
-	{ "echotraining", MISDN_CFG_ECHOTRAINING, MISDN_CTYPE_BOOLINT, "1", 1 },
+	{ "echotraining", MISDN_CFG_ECHOTRAINING, MISDN_CTYPE_BOOLINT, "0", 1 },
 	{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE },
 	{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "1000", NONE },
 	{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "600", NONE },

Modified: team/rizzo/base/funcs/func_enum.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/funcs/func_enum.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/funcs/func_enum.c (original)
+++ team/rizzo/base/funcs/func_enum.c Tue Feb 14 11:35:22 2006
@@ -139,7 +139,6 @@
 
 	buf[0] = '\0';
 
-
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "TXTCIDNAME requires an argument (number)\n");
 		return -1;

Modified: team/rizzo/base/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/pbx/pbx_dundi.c?rev=9936&r1=9935&r2=9936&view=diff
==============================================================================
--- team/rizzo/base/pbx/pbx_dundi.c (original)
+++ team/rizzo/base/pbx/pbx_dundi.c Tue Feb 14 11:35:22 2006
@@ -3839,7 +3839,6 @@
 	int bypass = 0;
 	struct localuser *u;
 	struct dundi_result dr[MAX_RESULTS];
-
 
 	buf[0] = '\0';
 



More information about the asterisk-commits mailing list