[Freeswitch-svn] [commit] r9403 - freeswitch/trunk/src
Freeswitch SVN
brian at freeswitch.org
Tue Sep 2 06:46:45 EDT 2008
Author: brian
Date: Tue Sep 2 06:46:44 2008
New Revision: 9403
Modified:
freeswitch/trunk/src/switch_console.c
freeswitch/trunk/src/switch_core_io.c
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_regex.c
Log:
getting rid of c++ comments in c files... OCD at work
Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c (original)
+++ freeswitch/trunk/src/switch_console.c Tue Sep 2 06:46:44 2008
@@ -73,7 +73,7 @@
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 @@
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) {
Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c (original)
+++ freeswitch/trunk/src/switch_core_io.c Tue Sep 2 06:46:44 2008
@@ -761,7 +761,7 @@
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);
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Tue Sep 2 06:46:44 2008
@@ -684,8 +684,8 @@
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 @@
}
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 @@
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_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;
Modified: freeswitch/trunk/src/switch_regex.c
==============================================================================
--- freeswitch/trunk/src/switch_regex.c (original)
+++ freeswitch/trunk/src/switch_regex.c Tue Sep 2 06:46:44 2008
@@ -163,33 +163,33 @@
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_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 {
More information about the Freeswitch-svn
mailing list