[asterisk-commits] mmichelson: trunk r261313 - /trunk/channels/sip/dialplan_functions.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 5 13:28:08 CDT 2010


Author: mmichelson
Date: Wed May  5 13:28:05 2010
New Revision: 261313

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261313
Log:
Prevent unnecessary warnings when getting rtpsource or rtpdest.

If a recognized media type was present, but the media type was not
enabled for the channel, then a warning would be emitted. For instance,
attempting to get CHANNEL(rtpsource,video) on a call with no video would
cause a warning message to appear.

With this change, the warning will only appear if the stream argument
is not recognized as being a media type that can be specified.


Modified:
    trunk/channels/sip/dialplan_functions.c

Modified: trunk/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/dialplan_functions.c?view=diff&rev=261313&r1=261312&r2=261313
==============================================================================
--- trunk/channels/sip/dialplan_functions.c (original)
+++ trunk/channels/sip/dialplan_functions.c Wed May  5 13:28:05 2010
@@ -91,8 +91,9 @@
 		else
 			return -1;
 
+		/* Return 0 to suppress a console warning message */
 		if (!stream) {
-			return -1;
+			return 0;
 		}
 
 		ast_rtp_instance_get_remote_address(stream, &sin);
@@ -113,8 +114,9 @@
 		else
 			return -1;
 
+		/* Return 0 to suppress a console warning message */
 		if (!stream) {
-			return -1;
+			return 0;
 		}
 
 		ast_rtp_instance_get_local_address(stream, &sin);




More information about the asterisk-commits mailing list