[Freeswitch-svn] [commit] r4444 - freeswitch/trunk/src

Freeswitch SVN brian at freeswitch.org
Sat Mar 3 20:52:52 EST 2007


Author: brian
Date: Sat Mar  3 20:52:52 2007
New Revision: 4444

Modified:
   freeswitch/trunk/src/switch_loadable_module.c
   freeswitch/trunk/src/switch_resample.c
   freeswitch/trunk/src/switch_rtp.c

Log:
update comments

Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c	(original)
+++ freeswitch/trunk/src/switch_loadable_module.c	Sat Mar  3 20:52:52 2007
@@ -909,7 +909,7 @@
 	} else {
 		status = SWITCH_STATUS_FALSE;
 		stream->write_function(stream, "INVALID COMMAND [%s]", cmd);
-		//snprintf(retbuf, len, "INVALID COMMAND [%s]", cmd);
+		/* snprintf(retbuf, len, "INVALID COMMAND [%s]", cmd); */
 	}
 
 	if (stream->event) {

Modified: freeswitch/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/trunk/src/switch_resample.c	(original)
+++ freeswitch/trunk/src/switch_resample.c	Sat Mar  3 20:52:52 2007
@@ -88,7 +88,7 @@
 		int lastFlag = (last && (srcBlock == srclen - srcpos));
 		o = resample_process(resampler->resampler, resampler->factor, &src[srcpos], srcBlock, lastFlag, &srcused,
 							 &dst[out], dstlen - out);
-		//printf("resampling %d/%d (%d) %d %f\n",  srcpos, srclen,  MIN(dstlen-out, dstlen), srcused, factor);
+		/* printf("resampling %d/%d (%d) %d %f\n",  srcpos, srclen,  MIN(dstlen-out, dstlen), srcused, factor); */
 
 		srcpos += srcused;
 		if (o >= 0) {
@@ -169,7 +169,7 @@
 
 	for (i = 0; i < len; i++) {
 		f[i] = (float) (s[i]) / NORMFACT;
-		//f[i] = (float) s[i];
+		/* f[i] = (float) s[i]; */
 	}
 	return len;
 }

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Sat Mar  3 20:52:52 2007
@@ -228,7 +228,7 @@
 		}
 	} while (switch_stun_packet_next_attribute(attr));
 
-	//printf("[%s] [%s] [%s]\n", rtp_session->user_ice, username, !strcmp(rtp_session->user_ice, username) ? "yes" : "no");
+	/* printf("[%s] [%s] [%s]\n", rtp_session->user_ice, username, !strcmp(rtp_session->user_ice, username) ? "yes" : "no"); */
 	if ((packet->header.type == SWITCH_STUN_BINDING_REQUEST)  && !strcmp(rtp_session->user_ice, username)) {
 		uint8_t buf[512];
 		switch_stun_packet_t *rpacket;
@@ -239,7 +239,7 @@
 		memset(buf, 0, sizeof(buf));
 		rpacket = switch_stun_packet_build_header(SWITCH_STUN_BINDING_RESPONSE, packet->header.id, buf);
 		switch_stun_packet_attribute_add_username(rpacket, username, 32);
-		//switch_sockaddr_ip_get(&remote_ip, rtp_session->from_addr);
+		/* switch_sockaddr_ip_get(&remote_ip, rtp_session->from_addr); */
 
 		remote_ip = switch_get_addr(ipbuf, sizeof(ipbuf), rtp_session->from_addr);
 		
@@ -427,8 +427,9 @@
 			return SWITCH_STATUS_FALSE;
 		}
     
-		//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "set master key/salt to %s/", octet_string_hex_string(key, 16));
-		//switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "%s\n", octet_string_hex_string(key+16, 14));
+		/* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "set master key/salt to %s/", octet_string_hex_string(key, 16));
+		 * switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "%s\n", octet_string_hex_string(key+16, 14));
+		 */
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activating Secure RTP!\n");
 	}
 
@@ -678,7 +679,7 @@
 			duration = rtp_session->dtmf_data.out_digit_sofar;
 		}
 
-		//ts = rtp_session->dtmf_data.timestamp_dtmf += samples;
+		/* ts = rtp_session->dtmf_data.timestamp_dtmf += samples; */
 		rtp_session->dtmf_data.out_digit_packet[2] = (unsigned char) (duration >> 8);
 		rtp_session->dtmf_data.out_digit_packet[3] = (unsigned char) duration;
 		
@@ -719,8 +720,9 @@
 			rtp_session->dtmf_data.out_digit_packet[0] = (unsigned char)switch_char_to_rfc2833(rdigit->digit);
 			rtp_session->dtmf_data.out_digit_packet[1] = 7;
 
-			//ts = rtp_session->dtmf_data.timestamp_dtmf += samples;
-			//rtp_session->dtmf_data.timestamp_dtmf++;
+			/* ts = rtp_session->dtmf_data.timestamp_dtmf += samples;
+			 * rtp_session->dtmf_data.timestamp_dtmf++;
+			 */
 
 			rtp_session->dtmf_data.timestamp_dtmf = rtp_session->last_write_ts;
 			rtp_session->dtmf_data.out_digit_seq = rtp_session->last_write_seq;
@@ -1131,7 +1133,7 @@
 		if (rtp_session->vad_data.scan_freq && rtp_session->vad_data.next_scan <= now) {
 			rtp_session->vad_data.bg_count = rtp_session->vad_data.bg_level = 0;
 			rtp_session->vad_data.next_scan = now + rtp_session->vad_data.scan_freq;
-			//printf("RESCAN\n");
+			/* printf("RESCAN\n"); */
 		}
 
 		if (switch_core_codec_decode(&rtp_session->vad_data.vad_codec,
@@ -1162,8 +1164,9 @@
 						rtp_session->vad_data.bg_level += score;
 						if (++rtp_session->vad_data.bg_count == rtp_session->vad_data.bg_len) {
 							rtp_session->vad_data.bg_level /= rtp_session->vad_data.bg_len;
-							//rtp_session->vad_data.bg_level += (rtp_session->vad_data.bg_level / 3);
-							//printf("AVG %u\n", rtp_session->vad_data.bg_level);
+							/* rtp_session->vad_data.bg_level += (rtp_session->vad_data.bg_level / 3);
+							 * printf("AVG %u\n", rtp_session->vad_data.bg_level);
+							 */
 						}
 						send = 1;
 					} else {
@@ -1215,8 +1218,9 @@
 					if (switch_test_flag(&rtp_session->vad_data, SWITCH_VAD_FLAG_CNG) && ++rtp_session->vad_data.cng_count >= rtp_session->vad_data.cng_freq) {
 						rtp_session->send_msg.header.pt = SWITCH_RTP_CNG_PAYLOAD;
 						memset(rtp_session->send_msg.body, 255, SWITCH_RTP_CNG_PAYLOAD);
-						//rtp_session->send_msg.header.ts = htonl(rtp_session->vad_data.ts);
-						//rtp_session->vad_data.ts++;
+						/* rtp_session->send_msg.header.ts = htonl(rtp_session->vad_data.ts);
+						 * rtp_session->vad_data.ts++;
+						 */
 						bytes = SWITCH_RTP_CNG_PAYLOAD;
 						send = 1;
 						rtp_session->vad_data.cng_count = 0;



More information about the Freeswitch-svn mailing list