[asterisk-commits] kpfleming: branch mnicholson/new-v21-detect r349247 - /team/mnicholson/new-v2...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 28 11:30:09 CST 2011
Author: kpfleming
Date: Wed Dec 28 11:30:08 2011
New Revision: 349247
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349247
Log:
Remove trailing whitespace blobs.
Modified:
team/mnicholson/new-v21-detect/res/res_fax.c
Modified: team/mnicholson/new-v21-detect/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/mnicholson/new-v21-detect/res/res_fax.c?view=diff&rev=349247&r1=349246&r2=349247
==============================================================================
--- team/mnicholson/new-v21-detect/res/res_fax.c (original)
+++ team/mnicholson/new-v21-detect/res/res_fax.c Wed Dec 28 11:30:08 2011
@@ -308,7 +308,7 @@
enum ast_fax_modems modems;
uint32_t statusevents:1;
uint32_t ecm:1;
- unsigned int minrate;
+ unsigned int minrate;
unsigned int maxrate;
} general_options;
@@ -343,7 +343,7 @@
};
static void debug_check_frame_for_silence(struct ast_fax_session *s, unsigned int c2s, struct ast_frame *frame)
-{
+{
struct debug_info_history *history = c2s ? &s->debug_info->c2s : &s->debug_info->s2c;
int dspsilence;
unsigned int last_consec_frames, last_consec_ms;
@@ -375,7 +375,7 @@
history->consec_ms += (frame->samples / 8);
}
-static void destroy_callback(void *data)
+static void destroy_callback(void *data)
{
if (data) {
ao2_ref(data, -1);
@@ -393,9 +393,9 @@
struct ast_fax_session_details *details;
struct ast_datastore *datastore;
- ast_channel_lock(chan);
+ ast_channel_lock(chan);
if (!(datastore = ast_channel_datastore_find(chan, &fax_datastore, NULL))) {
- ast_channel_unlock(chan);
+ ast_channel_unlock(chan);
return NULL;
}
if (!(details = datastore->data)) {
@@ -403,8 +403,8 @@
ast_channel_unlock(chan);
return NULL;
}
- ao2_ref(details, 1);
- ast_channel_unlock(chan);
+ ao2_ref(details, 1);
+ ast_channel_unlock(chan);
return details;
}
@@ -414,11 +414,11 @@
{
struct ast_fax_session_details *d = details;
struct ast_fax_document *doc;
-
+
while ((doc = AST_LIST_REMOVE_HEAD(&d->documents, next))) {
ast_free(doc);
}
- ast_string_field_free_memory(d);
+ ast_string_field_free_memory(d);
}
/*! \brief create a FAX session details structure */
@@ -429,7 +429,7 @@
if (!(d = ao2_alloc(sizeof(*d), destroy_session_details))) {
return NULL;
}
-
+
if (ast_string_field_init(d, 512)) {
ao2_ref(d, -1);
return NULL;
@@ -483,7 +483,7 @@
}
/*! \brief returns a reference counted details structure from the channel's fax datastore. If the datastore
- * does not exist it will be created */
+ * does not exist it will be created */
static struct ast_fax_session_details *find_or_create_details(struct ast_channel *chan)
{
struct ast_fax_session_details *details;
@@ -527,7 +527,7 @@
}
static int update_modem_bits(enum ast_fax_modems *bits, const char *value)
-{
+{
char *m[5], *tok, *v = (char *)value;
int i = 0, j;
@@ -725,7 +725,7 @@
ast_module_unref(ast_module_info->self);
ast_free(fax);
ast_verb(4, "Unregistered FAX module type '%s'\n", tech->type);
- break;
+ break;
}
AST_RWLIST_TRAVERSE_SAFE_END;
AST_RWLIST_UNLOCK(&faxmodules);
@@ -833,7 +833,7 @@
}
ao2_ref(s->details, -1);
}
-
+
if (s->debug_info) {
ast_dsp_free(s->debug_info->dsp);
ast_free(s->debug_info);
@@ -973,7 +973,7 @@
return NULL;
}
ast_dsp_set_threshold(s->debug_info->dsp, 128);
- }
+ }
if (!(s->channame = ast_strdup(chan->name))) {
fax_session_release(s, token);
@@ -1288,7 +1288,7 @@
}
ast_channel_lock(chan);
- /* update session details */
+ /* update session details */
if (ast_strlen_zero(details->headerinfo) && (tempvar = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO"))) {
ast_string_field_set(details, headerinfo, tempvar);
}
@@ -1386,7 +1386,7 @@
(frame->datalen == sizeof(t38_parameters))) {
unsigned int was_t38 = t38negotiated;
struct ast_control_t38_parameters *parameters = frame->data.ptr;
-
+
switch (parameters->request_response) {
case AST_T38_REQUEST_NEGOTIATE:
/* the other end has requested a switch to T.38, so reply that we are willing, if we can
@@ -1412,15 +1412,15 @@
ast_smoother_free(fax->smoother);
fax->smoother = NULL;
}
-
+
report_fax_status(chan, details, "T.38 Negotiated");
-
+
ast_verb(3, "Channel '%s' switched to T.38 FAX session '%d'.\n", chan->name, fax->id);
}
} else if ((frame->frametype == expected_frametype) &&
(!memcmp(&frame->subclass, &expected_framesubclass, sizeof(frame->subclass)))) {
struct ast_frame *f;
-
+
if (fax->smoother) {
/* push the frame into a smoother */
if (ast_smoother_feed(fax->smoother, frame) < 0) {
@@ -1782,7 +1782,7 @@
ao2_ref(details, -1);
return -1;
}
-
+
ast_atomic_fetchadd_int(&faxregistry.fax_rx_attempts, 1);
pbx_builtin_setvar_helper(chan, "FAXERROR", "Channel Problems");
@@ -1886,7 +1886,7 @@
get_manager_event_info(chan, &info);
manager_event(EVENT_FLAG_CALL,
- "ReceiveFAX",
+ "ReceiveFAX",
"Channel: %s\r\n"
"Context: %s\r\n"
"Exten: %s\r\n"
@@ -2242,7 +2242,7 @@
ao2_ref(details, -1);
return -1;
}
-
+
/* check for unsupported FAX application options */
if (ast_test_flag(&opts, OPT_CALLERMODE) || ast_test_flag(&opts, OPT_CALLEDMODE)) {
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
@@ -2384,7 +2384,7 @@
ast_channel_lock(chan);
get_manager_event_info(chan, &info);
manager_event(EVENT_FLAG_CALL,
- "SendFAX",
+ "SendFAX",
"Channel: %s\r\n"
"Context: %s\r\n"
"Exten: %s\r\n"
@@ -3221,7 +3221,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "fax set debug {on|off}";
- e->usage =
+ e->usage =
"Usage: fax set debug { on | off }\n"
" Enable/Disable FAX debugging on new FAX sessions. The basic FAX debugging will result in\n"
" additional events sent to manager sessions with 'call' class permissions. When\n"
@@ -3252,11 +3252,11 @@
{
struct fax_module *fax;
unsigned int num_modules = 0;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "fax show capabilities";
- e->usage =
+ e->usage =
"Usage: fax show capabilities\n"
" Shows the capabilities of the registered FAX technology modules\n";
return NULL;
@@ -3347,12 +3347,12 @@
return CLI_SUCCESS;
}
-
+
/*! \brief display fax stats */
static char *cli_fax_show_stats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct fax_module *fax;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "fax show stats";
@@ -3474,9 +3474,9 @@
struct ast_flags config_flags = { 0 };
char modems[128] = "";
- /* set defaults */
+ /* set defaults */
general_options.minrate = RES_FAX_MINRATE;
- general_options.maxrate = RES_FAX_MAXRATE;
+ general_options.maxrate = RES_FAX_MAXRATE;
general_options.statusevents = RES_FAX_STATUSEVENTS;
general_options.modems = RES_FAX_MODEM;
general_options.ecm = AST_FAX_OPTFLAG_TRUE;
@@ -3713,7 +3713,7 @@
static int unload_module(void)
{
ast_cli_unregister_multiple(fax_cli, ARRAY_LEN(fax_cli));
-
+
if (ast_custom_function_unregister(&acf_faxopt) < 0) {
ast_log(LOG_WARNING, "failed to unregister function '%s'\n", acf_faxopt.name);
}
@@ -3746,7 +3746,7 @@
if (!(faxregistry.container = ao2_container_alloc(FAX_MAXBUCKETS, session_hash_cb, session_cmp_cb))) {
return AST_MODULE_LOAD_DECLINE;
}
-
+
if (set_config(config) < 0) {
ast_log(LOG_ERROR, "failed to load configuration file '%s'\n", config);
ao2_ref(faxregistry.container, -1);
More information about the asterisk-commits
mailing list