]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
getting rid of c++ comments in c files... OCD at work
authorBrian West <brian@freeswitch.org>
Tue, 2 Sep 2008 10:46:44 +0000 (10:46 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 2 Sep 2008 10:46:44 +0000 (10:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9403 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_console.c
src/switch_core_io.c
src/switch_ivr_originate.c
src/switch_regex.c

index a11bc183250cec28a3174032881a61ed4b916d53..15bf80d3203683fc6547cadcbf30957bb9728d50 100644 (file)
@@ -73,7 +73,7 @@ static switch_status_t console_xml_config(void)
                        if ((i < 1) || (i > 12)) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "keybind %s is invalid, range is from 1 to 12\n", var);
                        } else {
-                               // Add the command to the fnkey array
+                               /* Add the command to the fnkey array */
                                console_fnkeys[i - 1] = switch_core_permanent_strdup(val);
                        }
                }
@@ -323,7 +323,7 @@ static unsigned char console_fnkey_pressed(int i)
 
        c = console_fnkeys[i - 1];
 
-       // This new line is necessary to avoid output to begin after the ">" of the CLI's prompt
+       /* This new line is necessary to avoid output to begin after the ">" of the CLI's prompt */
        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "\n");
 
        if (c == NULL) {
index 8d0c05bdcc656223614f2a703a332e78488dc392..dd4b3e5e7c50e540f132cbb911d063379312c509 100644 (file)
@@ -761,7 +761,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
 
                                switch (status) {
                                case SWITCH_STATUS_RESAMPLE:
-                                       //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "fixme 2\n");
+                                       /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "fixme 2\n"); */
                                case SWITCH_STATUS_SUCCESS:
                                        session->enc_write_frame.codec = session->write_codec;
                                        session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
index 20a62d3c346e65accb220d8c77df0473a49422b7..75d57d945f0e913eec900978252728819b978ba5 100644 (file)
@@ -684,8 +684,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                        switch_copy_string(file, var, sizeof(file));
                }
        }
-       // When using the AND operator, the fail_on_single_reject flag may be set in order to indicate that a single
-       // rejections should terminate the attempt rather than a timeout, answer, or rejection by all.
+       /* When using the AND operator, the fail_on_single_reject flag may be set in order to indicate that a single
+          rejections should terminate the attempt rather than a timeout, answer, or rejection by all. */
        if ((var = switch_event_get_header(var_event, "fail_on_single_reject")) && switch_true(var)) {
                fail_on_single_reject = 1;
        }
@@ -1011,10 +1011,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                }
 
                                if (!switch_core_session_running(peer_sessions[i])) {
-                                       //if (!(flags & SOF_NOBLOCK)) {
-                                       //switch_channel_set_state(peer_channels[i], CS_ROUTING);
-                                       //}
-                                       //} else {
+                                       /*if (!(flags & SOF_NOBLOCK)) {
+                                         switch_channel_set_state(peer_channels[i], CS_ROUTING);
+                                         }
+                                         } else {
+                                       */
                                        switch_core_session_thread_launch(peer_sessions[i]);
                                }
                        }
@@ -1143,8 +1144,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                                teletone_init_session(&ringback.ts, 0, teletone_handler, &ringback);
                                                                ringback.ts.rate = read_codec->implementation->actual_samples_per_second;
                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Play Ringback Tone [%s]\n", ringback_data);
-                                                               //ringback.ts.debug = 1;
-                                                               //ringback.ts.debug_stream = switch_core_get_console();
+                                                               /* ringback.ts.debug = 1;
+                                                                  ringback.ts.debug_stream = switch_core_get_console();
+                                                               */
                                                                if (teletone_run(&ringback.ts, ringback_data)) {
                                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Playing Tone\n");
                                                                        teletone_destroy_session(&ringback.ts);
@@ -1173,7 +1175,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        switch_channel_ring_ready(caller_channel);
                                        sent_ring = 1;
                                }
-                               // When the AND operator is being used, and fail_on_single_reject is set, a hangup indicates that the call should fail.
+                               /* When the AND operator is being used, and fail_on_single_reject is set, a hangup indicates that the call should fail. */
                                if ((to = (uint8_t) ((switch_timestamp(NULL) - start) >= (time_t) timelimit_sec))
                                        || (fail_on_single_reject && hups)) {
                                        idx = IDX_TIMEOUT;
index a724e01453f3d66c058f95088dcc00e339310caa..651d89e3109666d87156316724feaa5fe534edec 100644 (file)
@@ -163,33 +163,33 @@ SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_c
 
 SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const char *expression)
 {
-       const char *error = NULL;       //Used to hold any errors
-       int error_offset = 0;           //Holds the offset of an error
-       pcre *pcre_prepared = NULL;     //Holds the compiled regex
-       int match_count = 0;            //Number of times the regex was matched
-       int offset_vectors[2];          //not used, but has to exist or pcre won't even try to find a match
+       const char *error = NULL;       /* Used to hold any errors                                           */
+       int error_offset = 0;           /* Holds the offset of an error                                      */
+       pcre *pcre_prepared = NULL;     /* Holds the compiled regex                                          */
+       int match_count = 0;            /* Number of times the regex was matched                             */
+       int offset_vectors[2];          /* not used, but has to exist or pcre won't even try to find a match */
 
-       //Compile the expression
+       /* Compile the expression */
        pcre_prepared = pcre_compile(expression, 0, &error, &error_offset, NULL);
 
-       //See if there was an error in the expression
+       /* See if there was an error in the expression */
        if (error != NULL) {
-               //Clean up after ourselves
+               /* Clean up after ourselves */
                if (pcre_prepared) {
                        pcre_free(pcre_prepared);
                        pcre_prepared = NULL;
                }
-               //Note our error    
+               /* Note our error */
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
                                                  "Regular Expression Error expression[%s] error[%s] location[%d]\n", expression, error, error_offset);
 
-               //We definitely didn't match anything
+               /* We definitely didn't match anything */
                return SWITCH_STATUS_FALSE;
        }
-       //So far so good, run the regex
+       /* So far so good, run the regex */
        match_count = pcre_exec(pcre_prepared, NULL, target, (int) strlen(target), 0, 0, offset_vectors, sizeof(offset_vectors) / sizeof(offset_vectors[0]));
 
-       //Clean up
+       /* Clean up */
        if (pcre_prepared) {
                pcre_free(pcre_prepared);
                pcre_prepared = NULL;
@@ -197,7 +197,7 @@ SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const cha
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "number of matches: %d\n", match_count);
 
-       //Was it a match made in heaven?
+       /* Was it a match made in heaven? */
        if (match_count > 0) {
                return SWITCH_STATUS_SUCCESS;
        } else {