diff --git a/src/switch_console.c b/src/switch_console.c index a11bc18325..15bf80d320 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -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) { diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 8d0c05bdcc..dd4b3e5e7c 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -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); diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 20a62d3c34..75d57d945f 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -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; diff --git a/src/switch_regex.c b/src/switch_regex.c index a724e01453..651d89e310 100644 --- a/src/switch_regex.c +++ b/src/switch_regex.c @@ -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 {