getting rid of c++ comments in c files... OCD at work

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9403 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-09-02 10:46:44 +00:00
parent 0a1d9b0206
commit edc3f6509c
4 changed files with 27 additions and 25 deletions

View File

@ -73,7 +73,7 @@ static switch_status_t console_xml_config(void)
if ((i < 1) || (i > 12)) { 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "keybind %s is invalid, range is from 1 to 12\n", var);
} else { } else {
// Add the command to the fnkey array /* Add the command to the fnkey array */
console_fnkeys[i - 1] = switch_core_permanent_strdup(val); 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]; 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"); switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "\n");
if (c == NULL) { if (c == NULL) {

View File

@ -761,7 +761,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
switch (status) { switch (status) {
case SWITCH_STATUS_RESAMPLE: 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: case SWITCH_STATUS_SUCCESS:
session->enc_write_frame.codec = session->write_codec; session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t); session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);

View 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)); 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 /* 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. 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)) { if ((var = switch_event_get_header(var_event, "fail_on_single_reject")) && switch_true(var)) {
fail_on_single_reject = 1; 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 (!switch_core_session_running(peer_sessions[i])) {
//if (!(flags & SOF_NOBLOCK)) { /*if (!(flags & SOF_NOBLOCK)) {
//switch_channel_set_state(peer_channels[i], CS_ROUTING); switch_channel_set_state(peer_channels[i], CS_ROUTING);
//} }
//} else { } else {
*/
switch_core_session_thread_launch(peer_sessions[i]); 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); teletone_init_session(&ringback.ts, 0, teletone_handler, &ringback);
ringback.ts.rate = read_codec->implementation->actual_samples_per_second; 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); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Play Ringback Tone [%s]\n", ringback_data);
//ringback.ts.debug = 1; /* ringback.ts.debug = 1;
//ringback.ts.debug_stream = switch_core_get_console(); ringback.ts.debug_stream = switch_core_get_console();
*/
if (teletone_run(&ringback.ts, ringback_data)) { if (teletone_run(&ringback.ts, ringback_data)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Playing Tone\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Playing Tone\n");
teletone_destroy_session(&ringback.ts); 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); switch_channel_ring_ready(caller_channel);
sent_ring = 1; 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)) if ((to = (uint8_t) ((switch_timestamp(NULL) - start) >= (time_t) timelimit_sec))
|| (fail_on_single_reject && hups)) { || (fail_on_single_reject && hups)) {
idx = IDX_TIMEOUT; idx = IDX_TIMEOUT;

View 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) SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const char *expression)
{ {
const char *error = NULL; //Used to hold any errors const char *error = NULL; /* Used to hold any errors */
int error_offset = 0; //Holds the offset of an error int error_offset = 0; /* Holds the offset of an error */
pcre *pcre_prepared = NULL; //Holds the compiled regex pcre *pcre_prepared = NULL; /* Holds the compiled regex */
int match_count = 0; //Number of times the regex was matched 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 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); 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) { if (error != NULL) {
//Clean up after ourselves /* Clean up after ourselves */
if (pcre_prepared) { if (pcre_prepared) {
pcre_free(pcre_prepared); pcre_free(pcre_prepared);
pcre_prepared = NULL; pcre_prepared = NULL;
} }
//Note our error /* Note our error */
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Regular Expression Error expression[%s] error[%s] location[%d]\n", expression, error, error_offset); "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; 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])); 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) { if (pcre_prepared) {
pcre_free(pcre_prepared); pcre_free(pcre_prepared);
pcre_prepared = NULL; 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); 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) { if (match_count > 0) {
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} else { } else {