]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update comments
authorBrian West <brian@freeswitch.org>
Sun, 4 Mar 2007 01:52:52 +0000 (01:52 +0000)
committerBrian West <brian@freeswitch.org>
Sun, 4 Mar 2007 01:52:52 +0000 (01:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4444 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_loadable_module.c
src/switch_resample.c
src/switch_rtp.c

index aab8342c0bb7cea59e7f2d6ce04aff91256106b7..7f1788d5654eaf0056c9107ed5aeba5c04088561 100644 (file)
@@ -909,7 +909,7 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, switch_
        } 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) {
index 5a9e21f45566f6fa1e5d19912606b00154912b2b..d1bf50492b5e742757c38da295059855793f7538 100644 (file)
@@ -88,7 +88,7 @@ SWITCH_DECLARE(uint32_t) switch_resample_process(switch_audio_resampler_t *resam
                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 @@ SWITCH_DECLARE(int) switch_short_to_float(short *s, float *f, int len)
 
        for (i = 0; i < len; i++) {
                f[i] = (float) (s[i]) / NORMFACT;
-               //f[i] = (float) s[i];
+               /* f[i] = (float) s[i]; */
        }
        return len;
 }
index 1a355d543123ef5618caa58a7bfb5ace8519c33c..c4dd4879440f605a556b6cf2f84672a2ba26502e 100644 (file)
@@ -228,7 +228,7 @@ static void handle_ice(switch_rtp_t *rtp_session, void *data, switch_size_t len)
                }
        } 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 @@ static void handle_ice(switch_rtp_t *rtp_session, void *data, switch_size_t len)
                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 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
                        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 @@ static void do_2833(switch_rtp_t *rtp_session)
                        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 @@ static void do_2833(switch_rtp_t *rtp_session)
                        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 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
                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 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
                                                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 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
                                        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;