[Sumover-dev] [svn commit] r4410 - common/trunk/src
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Thu Apr 9 11:00:23 BST 2009
Author: piers
Date: Thu Apr 9 11:00:23 2009
New Revision: 4410
Modified:
common/trunk/src/rtp.c
Log:
Added conversion code for non-printable characters when printing out unknown SDES items - when in IOCOM sessions sometimes there were characters that would interfere (i.e. mess it up) with the terminal debug display.
Modified: common/trunk/src/rtp.c
==============================================================================
--- common/trunk/src/rtp.c (original)
+++ common/trunk/src/rtp.c Thu Apr 9 11:00:23 2009
@@ -1406,10 +1406,12 @@
if (session->opt->wait_for_rtcp) {
s = get_source(session, packet->fields.ssrc);
} else {
+ debug_msg("creating src...\n");
s = create_source(session, packet->fields.ssrc, TRUE);
}
if (session->opt->promiscuous_mode) {
if (s == NULL) {
+ debug_msg("promiscuous_mode on creating src...\n");
s = create_source(session, packet->fields.ssrc, FALSE);
}
process_rtp(session, curr_rtp_ts, packet, s);
@@ -1983,6 +1985,7 @@
{
source *s;
char *v;
+ int i;
check_database(session);
@@ -2031,6 +2034,10 @@
s->priv = v;
break;
default :
+ /* Convert non-printable chars into '?' */
+ for (i=0; i<length; i++) {
+ if (!isalnum(v[i])) v[i]='?';
+ }
debug_msg("Unknown SDES item (type=%d, value=%s)\n", type, v);
xfree(v);
check_database(session);
More information about the Sumover-dev
mailing list