[Devel] [patch] Nathelper - very minor bug

John Riordan john at junctionnetworks.com
Sat Oct 8 16:48:10 CEST 2005


Hi,

extract_mediaip is currently logging failure to find a c= line
as an ERROR. However, the way this function is used (in replace_sdp_ip
and elsewhere) the expectation is that failure may not be an ERROR,
but simply an indication that all c= lines have been dealt with.

The upshot is that an ERROR is getting logged whenever fix_nated_sdp
is used - regardless of there being a c= line in the SDP or not.

The error looks like:

Oct  8 09:58:34 host /usr/local/sbin/openser[10370]: ERROR: extract_mediaip: no `c=' in SDP

The attached patch is simply changes the logged message to DBG.

Regards,

John
-------------- next part --------------
--- modules/nathelper/nathelper.c.~1.5.~	2005-07-15 00:26:56.000000000 -0400
+++ modules/nathelper/nathelper.c	2005-10-08 10:14:59.252490355 -0400
@@ -1020,7 +1020,7 @@
 		cp = cp1 + 2;
 	}
 	if (cp1 == NULL) {
-		LOG(L_ERR, "ERROR: extract_mediaip: no `%s' in SDP\n",line);
+		LOG(L_DBG, "DEBUG: extract_mediaip: no `%s' in SDP\n",line);
 		return -1;
 	}
 	mediaip->s = cp1 + 2;


More information about the Devel mailing list