Skip to content
Snippets Groups Projects
Commit a6ea125e authored by Mark Michelson's avatar Mark Michelson
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@261313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent d7ff6717
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment