mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Simple fax applications
|
||||
*
|
||||
*
|
||||
* 2007-2008, Dmitry Andrianov <asterisk@dima.spb.ru>
|
||||
*
|
||||
* Code based on original implementation by Steve Underwood <steveu@coppice.org>
|
||||
@@ -100,12 +100,12 @@
|
||||
<para>Filename of TIFF file save incoming fax</para>
|
||||
</parameter>
|
||||
<parameter name="c" required="false">
|
||||
<para>Makes the application behave as the calling machine</para>
|
||||
<para>Makes the application behave as the calling machine</para>
|
||||
<para>(Default behavior is as answering machine)</para>
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Receives a FAX from the channel into the given filename
|
||||
<para>Receives a FAX from the channel into the given filename
|
||||
overwriting the file if it already exists.</para>
|
||||
<para>File created will be in TIFF format.</para>
|
||||
|
||||
@@ -282,7 +282,7 @@ static int set_logging(logging_state_t *state)
|
||||
int level = SPAN_LOG_WARNING + option_debug;
|
||||
|
||||
span_log_set_message_handler(state, span_message);
|
||||
span_log_set_level(state, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | level);
|
||||
span_log_set_level(state, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | level);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -328,7 +328,7 @@ static int fax_generator_generate(struct ast_channel *chan, void *data, int len,
|
||||
fax_state_t *fax = (fax_state_t*) data;
|
||||
uint8_t buffer[AST_FRIENDLY_OFFSET + MAX_SAMPLES * sizeof(uint16_t)];
|
||||
int16_t *buf = (int16_t *) (buffer + AST_FRIENDLY_OFFSET);
|
||||
|
||||
|
||||
struct ast_frame outf = {
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass.format = ast_format_slin,
|
||||
@@ -339,7 +339,7 @@ static int fax_generator_generate(struct ast_channel *chan, void *data, int len,
|
||||
ast_log(LOG_WARNING, "Only generating %d samples, where %d requested\n", MAX_SAMPLES, samples);
|
||||
samples = MAX_SAMPLES;
|
||||
}
|
||||
|
||||
|
||||
if ((len = fax_tx(fax, buf, samples)) > 0) {
|
||||
outf.samples = len;
|
||||
AST_FRAME_SET_BUFFER(&outf, buffer, AST_FRIENDLY_OFFSET, len * sizeof(int16_t));
|
||||
@@ -779,14 +779,14 @@ static int transmit(fax_session *s)
|
||||
|
||||
/* Clear all channel variables which to be set by the application.
|
||||
Pre-set status to error so in case of any problems we can just leave */
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "FAILED");
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXERROR", "Channel problems");
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "FAILED");
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXERROR", "Channel problems");
|
||||
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXMODE", NULL);
|
||||
pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", NULL);
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXPAGES", "0");
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", NULL);
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", NULL);
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", NULL);
|
||||
|
||||
if (ast_channel_state(s->chan) != AST_STATE_UP) {
|
||||
/* Shouldn't need this, but checking to see if channel is already answered
|
||||
@@ -800,8 +800,8 @@ static int transmit(fax_session *s)
|
||||
|
||||
s->t38state = ast_channel_get_t38_state(s->chan);
|
||||
if (s->t38state != T38_STATE_NEGOTIATED) {
|
||||
/* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio");
|
||||
/* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio");
|
||||
res = transmit_audio(s);
|
||||
if (res > 0) {
|
||||
/* transmit_audio reports switchover to T38. Update t38state */
|
||||
@@ -813,7 +813,7 @@ static int transmit(fax_session *s)
|
||||
}
|
||||
|
||||
if (s->t38state == T38_STATE_NEGOTIATED) {
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38");
|
||||
pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38");
|
||||
res = transmit_t38(s);
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ static int sndfax_exec(struct ast_channel *chan, const char *data)
|
||||
|
||||
parse = ast_strdupa(data);
|
||||
AST_STANDARD_APP_ARGS(args, parse);
|
||||
|
||||
|
||||
session.caller_mode = TRUE;
|
||||
|
||||
if (args.options) {
|
||||
@@ -926,7 +926,7 @@ static int rcvfax_exec(struct ast_channel *chan, const char *data)
|
||||
|
||||
parse = ast_strdupa(data);
|
||||
AST_STANDARD_APP_ARGS(args, parse);
|
||||
|
||||
|
||||
session.caller_mode = FALSE;
|
||||
|
||||
if (args.options) {
|
||||
@@ -973,8 +973,8 @@ static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_application(app_sndfax_name);
|
||||
res |= ast_unregister_application(app_rcvfax_name);
|
||||
res = ast_unregister_application(app_sndfax_name);
|
||||
res |= ast_unregister_application(app_rcvfax_name);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -998,5 +998,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Simple FAX Application",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user