[asterisk-commits] kpfleming: branch kpfleming/embedded-module-globals r56090 - in /team/kpflemi...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 21 19:19:13 MST 2007


Author: kpfleming
Date: Wed Feb 21 20:19:13 2007
New Revision: 56090

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56090
Log:
Merged revisions 56009,56012,56056 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r56009 | file | 2007-02-21 18:38:46 -0600 (Wed, 21 Feb 2007) | 10 lines

Merged revisions 56008 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r56008 | file | 2007-02-21 19:35:55 -0500 (Wed, 21 Feb 2007) | 2 lines

Print out deprecation notice on usage output of CLI commands. (issue #8925 reported by blitzrage)

........

................
r56012 | russell | 2007-02-21 18:59:17 -0600 (Wed, 21 Feb 2007) | 19 lines

Merged revisions 56011 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r56011 | russell | 2007-02-21 18:57:36 -0600 (Wed, 21 Feb 2007) | 11 lines

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

........
r56010 | russell | 2007-02-21 18:53:25 -0600 (Wed, 21 Feb 2007) | 3 lines

If we receive a frame that is not in any of the negotiated formats, then drop
it.  (potentially issue #8781 and SPD-12)

........

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

................
r56056 | russell | 2007-02-21 19:26:22 -0600 (Wed, 21 Feb 2007) | 11 lines

Merged revisions 56055 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r56055 | russell | 2007-02-21 19:24:10 -0600 (Wed, 21 Feb 2007) | 3 lines

Restructure a little bit of code to reduce nesting.  There is no functionality
change here.

........

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

Modified:
    team/kpfleming/embedded-module-globals/   (props changed)
    team/kpfleming/embedded-module-globals/channels/chan_sip.c
    team/kpfleming/embedded-module-globals/main/cli.c

Propchange: team/kpfleming/embedded-module-globals/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/kpfleming/embedded-module-globals/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb 21 20:19:13 2007
@@ -1,1 +1,1 @@
-/trunk:1-56007
+/trunk:1-56089

Modified: team/kpfleming/embedded-module-globals/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/embedded-module-globals/channels/chan_sip.c?view=diff&rev=56090&r1=56089&r2=56090
==============================================================================
--- team/kpfleming/embedded-module-globals/channels/chan_sip.c (original)
+++ team/kpfleming/embedded-module-globals/channels/chan_sip.c Wed Feb 21 20:19:13 2007
@@ -4420,30 +4420,38 @@
 	    (ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_RFC2833))
 		return &ast_null_frame;
 
-	if (p->owner) {
-		/* We already hold the channel lock */
-		if (f->frametype == AST_FRAME_VOICE) {
-			if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+	/* We already hold the channel lock */
+	if (!p->owner || f->frametype != AST_FRAME_VOICE)
+		return f;
+
+	if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+		if (!(f->subclass & p->jointcapability)) {
+			if (option_debug) {
+				ast_log(LOG_DEBUG, "Bogus frame of format '%s' received from '%s'!\n",
+					ast_getformatname(f->subclass), p->owner->name);
+			}
+			return &ast_null_frame;
+		}
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
+		p->owner->nativeformats = (p->owner->nativeformats & (AST_FORMAT_VIDEO_MASK | AST_FORMAT_TEXT_MASK)) | f->subclass;
+		ast_set_read_format(p->owner, p->owner->readformat);
+		ast_set_write_format(p->owner, p->owner->writeformat);
+	}
+
+	if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
+		f = ast_dsp_process(p->owner, p->vad, f);
+		if (f && f->frametype == AST_FRAME_DTMF) {
+			if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT_UDPTL) && f->subclass == 'f') {
 				if (option_debug)
-					ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
-				p->owner->nativeformats = (p->owner->nativeformats & (AST_FORMAT_VIDEO_MASK | AST_FORMAT_TEXT_MASK)) | f->subclass;
-				ast_set_read_format(p->owner, p->owner->readformat);
-				ast_set_write_format(p->owner, p->owner->writeformat);
+					ast_log(LOG_DEBUG, "Fax CNG detected on %s\n", ast->name);
+				*faxdetect = 1;
+			} else if (option_debug) {
+				ast_log(LOG_DEBUG, "* Detected inband DTMF '%c'\n", f->subclass);
 			}
-			if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
-				f = ast_dsp_process(p->owner, p->vad, f);
-				if (f && f->frametype == AST_FRAME_DTMF) {
-					if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT_UDPTL) && f->subclass == 'f') {
-						if (option_debug)
-							ast_log(LOG_DEBUG, "Fax CNG detected on %s\n", ast->name);
-						*faxdetect = 1;
-					} else if (option_debug) {
-						ast_log(LOG_DEBUG, "* Detected inband DTMF '%c'\n", f->subclass);
-					}
-				}
-			}
-		}
-	}
+		}
+	}
+	
 	return f;
 }
 

Modified: team/kpfleming/embedded-module-globals/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/embedded-module-globals/main/cli.c?view=diff&rev=56090&r1=56089&r2=56090
==============================================================================
--- team/kpfleming/embedded-module-globals/main/cli.c (original)
+++ team/kpfleming/embedded-module-globals/main/cli.c Wed Feb 21 20:19:13 2007
@@ -1729,8 +1729,11 @@
 	switch (res) {
 	case RESULT_SHOWUSAGE:
 		ast_cli(fd, "%s", S_OR(e->usage, "Invalid usage, but no usage information available.\n"));
+		AST_LIST_LOCK(&helpers);
+		if (e->deprecated)
+			ast_cli(fd, "The '%s' command is deprecated and will be removed in a future release. Please use '%s' instead.\n", e->_full_cmd, e->_deprecated_by);
+		AST_LIST_UNLOCK(&helpers);
 		break;
-
 	case RESULT_FAILURE:
 		ast_cli(fd, "Command '%s' failed.\n", s);
 		/* FALLTHROUGH */



More information about the asterisk-commits mailing list