aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-05 18:28:05 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-05 18:28:05 +0000
commitaa215fc662b03f5d665f910b2e3002e255809cd6 (patch)
tree97e0403e2ac2050edfee5f402eb319dbabc6ce63 /channels
parente8516dd762521c747a96a904cbf204285d8b9366 (diff)
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. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261313 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/sip/dialplan_functions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c
index 509eacf31..bbc846fe9 100644
--- a/channels/sip/dialplan_functions.c
+++ b/channels/sip/dialplan_functions.c
@@ -91,8 +91,9 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p
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 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p
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);