[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp r218294 - /team/tzafrir/monitor-rtp/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 14 12:30:01 CDT 2009
Author: tzafrir
Date: Mon Sep 14 12:29:58 2009
New Revision: 218294
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218294
Log:
Code actually works in trunk.
It is more verbose as well.
Modified:
team/tzafrir/monitor-rtp/res/res_monitor.c
Modified: team/tzafrir/monitor-rtp/res/res_monitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/res/res_monitor.c?view=diff&rev=218294&r1=218293&r2=218294
==============================================================================
--- team/tzafrir/monitor-rtp/res/res_monitor.c (original)
+++ team/tzafrir/monitor-rtp/res/res_monitor.c Mon Sep 14 12:29:58 2009
@@ -293,7 +293,9 @@
{
int sock;
- if (!ast_get_ip(saddr, server)) {
+ if (ast_get_ip(saddr, server)) {
+ ast_log(LOG_NOTICE, "Failed to get address for: %s. No RTP monitoring.\n",
+ server);
return -EINVAL;
}
ast_log(LOG_NOTICE, "%s: %s:%d\n", __FUNCTION__, server, port);
@@ -408,7 +410,7 @@
}
}
#endif /* ifdef RTP_MONITOR_DEBUG */
- if (!ast_get_ip(&(my_addr), reporting_host)) {
+ if (ast_get_ip(&(my_addr), reporting_host)) {
ast_log(LOG_WARNING, "Bad reporting_host: '%s'\n", reporting_host);
return -1;
}
@@ -479,7 +481,7 @@
{
ast_log(LOG_NOTICE, "STOP monitor2rtp\n");
LOCK_IF_NEEDED(chan, need_lock);
- if ((chan->monitor)) {
+ if (chan->monitor) {
struct monitor_rtp_state *rtp_state_rx;
struct monitor_rtp_state *rtp_state_tx;
@@ -583,7 +585,7 @@
goto out;
}
rtp_state_rx = (struct monitor_rtp_state *)
- ast_filestream_xxx_get_filename(chan->monitor->read_stream);
+ ast_filestream_xxx_get_filename(monitor->read_stream);
rtp_state_tx = (struct monitor_rtp_state *)
ast_filestream_xxx_get_filename(chan->monitor->write_stream);
send_cdr(chan, 1, 1, rtp_state_rx);
More information about the asterisk-commits
mailing list