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:
parent
0a1d9b0206
commit
edc3f6509c
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue