Merged revisions 51182 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 17 Jan 2007 06:37:47 +0000 (06:37 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 17 Jan 2007 06:37:47 +0000 (06:37 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51182 | file | 2007-01-17 01:36:41 -0500 (Wed, 17 Jan 2007) | 2 lines

Return the correct result when directly writing out a packet so that the core doesn't then decide to handle it the regular way again. (issue #8833 reported by rcourtna)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 90890d3..05ca048 100644 (file)
@@ -1116,11 +1116,11 @@ static int bridge_p2p_rtp_write(struct ast_rtp *rtp, struct ast_rtp *bridged, un
                                ast_log(LOG_DEBUG, "RTP NAT: Can't write RTP to private address %s:%d, waiting for other end to send audio...\n", ast_inet_ntoa(bridged->them.sin_addr), ntohs(bridged->them.sin_port));
                        ast_set_flag(bridged, FLAG_NAT_INACTIVE_NOWARN);
                }
-               return -1;
+               return 0;
        } else if (rtp_debug_test_addr(&bridged->them))
                        ast_verbose("Sent RTP P2P packet to %s:%d (type %-2.2d, len %-6.6u)\n", ast_inet_ntoa(bridged->them.sin_addr), ntohs(bridged->them.sin_port), bridged_payload, len - hdrlen);
 
-       return -1;
+       return 0;
 }
 
 struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)