mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-05 03:40:18 +00:00
Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -736,8 +736,9 @@ static void prep_email_sub_vars(struct ast_channel *channel, const struct minivm
|
||||
return;
|
||||
}
|
||||
|
||||
for (var = vmu->chanvars ; var ; var = var->next)
|
||||
for (var = vmu->chanvars ; var ; var = var->next) {
|
||||
pbx_builtin_setvar_helper(channel, var->name, var->value);
|
||||
}
|
||||
|
||||
/* Prepare variables for substition in email body and subject */
|
||||
pbx_builtin_setvar_helper(channel, "MVM_NAME", vmu->fullname);
|
||||
|
||||
@@ -135,7 +135,7 @@ static const struct strategy {
|
||||
#define DEFAULT_TIMEOUT 15
|
||||
#define RECHECK 1 /*!< Recheck every second to see we we're at the top yet */
|
||||
#define MAX_PERIODIC_ANNOUNCEMENTS 10 /*!< The maximum periodic announcements we can have */
|
||||
#define DEFAULT_MIN_ANNOUNCE_FREQUENCY 15 /*!< The minimum number of seconds between position announcements
|
||||
#define DEFAULT_MIN_ANNOUNCE_FREQUENCY 15 /*!< The minimum number of seconds between position announcements \
|
||||
The default value of 15 provides backwards compatibility */
|
||||
#define MAX_QUEUE_BUCKETS 53
|
||||
|
||||
@@ -1904,11 +1904,12 @@ playout:
|
||||
|
||||
/* Don't restart music on hold if we're about to exit the caller from the queue */
|
||||
if (!res) {
|
||||
if (ringing)
|
||||
if (ringing) {
|
||||
ast_indicate(qe->chan, AST_CONTROL_RINGING);
|
||||
else
|
||||
} else {
|
||||
ast_moh_start(qe->chan, qe->moh, NULL);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -4657,8 +4658,9 @@ static int queue_function_var(struct ast_channel *chan, const char *cmd, char *d
|
||||
sl = 0;
|
||||
res = 0;
|
||||
|
||||
if (q->callscompleted > 0)
|
||||
if (q->callscompleted > 0) {
|
||||
sl = 100 * ((float) q->callscompletedinsl / (float) q->callscompleted);
|
||||
}
|
||||
|
||||
snprintf(interfacevar, sizeof(interfacevar),
|
||||
"QUEUEMAX=%d,QUEUESTRATEGY=%s,QUEUECALLS=%d,QUEUEHOLDTIME=%d,QUEUECOMPLETED=%d,QUEUEABANDONED=%d,QUEUESRVLEVEL=%d,QUEUESRVLEVELPERF=%2.1f",
|
||||
@@ -4669,8 +4671,9 @@ static int queue_function_var(struct ast_channel *chan, const char *cmd, char *d
|
||||
|
||||
ao2_unlock(q);
|
||||
queue_unref(q);
|
||||
} else
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "queue %s was not found\n", data);
|
||||
}
|
||||
|
||||
snprintf(buf, len, "%d", res);
|
||||
|
||||
|
||||
@@ -260,8 +260,9 @@ static void numcpy(char *d, char *s)
|
||||
if (*s == '+')
|
||||
*d++ = *s++;
|
||||
while (*s) {
|
||||
if (isdigit(*s))
|
||||
if (isdigit(*s)) {
|
||||
*d++ = *s;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
*d = 0;
|
||||
@@ -600,8 +601,9 @@ static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, in
|
||||
}
|
||||
|
||||
/*! \brief unpacks bytes (8 bit encoding) at i, len l septets,
|
||||
and places in udh and ud setting udhl and udl. udh not used
|
||||
if udhi not set */
|
||||
* and places in udh and ud setting udhl and udl. udh not used
|
||||
* if udhi not set.
|
||||
*/
|
||||
static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
|
||||
{
|
||||
unsigned short *o = ud;
|
||||
|
||||
@@ -137,8 +137,9 @@ static struct ast_speech_result *find_result(struct ast_speech_result *results,
|
||||
char *tmp = NULL;
|
||||
int nbest_num = 0, wanted_num = 0, i = 0;
|
||||
|
||||
if (!result)
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((tmp = strchr(result_num, '/'))) {
|
||||
*tmp++ = '\0';
|
||||
@@ -167,8 +168,9 @@ static int speech_score(struct ast_channel *chan, const char *cmd, char *data,
|
||||
struct ast_speech *speech = find_speech(chan);
|
||||
char tmp[128] = "";
|
||||
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data)))
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "%d", result->score);
|
||||
|
||||
@@ -194,11 +196,13 @@ static int speech_text(struct ast_channel *chan, const char *cmd, char *data,
|
||||
struct ast_speech_result *result = NULL;
|
||||
struct ast_speech *speech = find_speech(chan);
|
||||
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data)))
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (result->text != NULL)
|
||||
if (result->text != NULL) {
|
||||
ast_copy_string(buf, result->text, len);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -220,11 +224,13 @@ static int speech_grammar(struct ast_channel *chan, const char *cmd, char *data,
|
||||
struct ast_speech_result *result = NULL;
|
||||
struct ast_speech *speech = find_speech(chan);
|
||||
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data)))
|
||||
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (result->grammar != NULL)
|
||||
if (result->grammar != NULL) {
|
||||
ast_copy_string(buf, result->grammar, len);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -244,8 +250,9 @@ static int speech_engine_write(struct ast_channel *chan, const char *cmd, char *
|
||||
{
|
||||
struct ast_speech *speech = find_speech(chan);
|
||||
|
||||
if (data == NULL || speech == NULL)
|
||||
if (data == NULL || speech == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ast_speech_change(speech, data, value);
|
||||
|
||||
|
||||
@@ -79,9 +79,10 @@ static int careful_write(int fd, unsigned char *data, int len)
|
||||
if (errno != EAGAIN) {
|
||||
ast_log(LOG_WARNING, "Failed to write audio data to conference: %s\n", strerror(errno));
|
||||
return -1;
|
||||
} else
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
len -= res;
|
||||
data += res;
|
||||
}
|
||||
@@ -204,19 +205,17 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||
goto zapretry;
|
||||
}
|
||||
f = ast_read(c);
|
||||
if (!f)
|
||||
if (!f) {
|
||||
break;
|
||||
}
|
||||
if (f->frametype == AST_FRAME_DTMF) {
|
||||
if (f->subclass == '#') {
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
else if (f->subclass == '*') {
|
||||
} else if (f->subclass == '*') {
|
||||
ret = -1;
|
||||
break;
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
input[ic++] = f->subclass;
|
||||
}
|
||||
if (ic == 3) {
|
||||
@@ -233,10 +232,11 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||
if (f->subclass == AST_FORMAT_ULAW) {
|
||||
/* Carefully write */
|
||||
careful_write(fd, f->data, f->datalen);
|
||||
} else
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Huh? Got a non-ulaw (%d) frame in the conference\n", f->subclass);
|
||||
}
|
||||
}
|
||||
}
|
||||
ast_frfree(f);
|
||||
} else if (outfd > -1) {
|
||||
res = read(outfd, buf, CONF_SIZE);
|
||||
@@ -252,15 +252,17 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
|
||||
ast_log(LOG_WARNING, "Unable to write frame to channel: %s\n", strerror(errno));
|
||||
/* break; */
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Failed to read frame: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
if (f)
|
||||
}
|
||||
if (f) {
|
||||
ast_frfree(f);
|
||||
if (fd != chan->fds[0])
|
||||
}
|
||||
if (fd != chan->fds[0]) {
|
||||
close(fd);
|
||||
else {
|
||||
} else {
|
||||
/* Take out of conference */
|
||||
/* Add us to the conference */
|
||||
ztc.chan = 0;
|
||||
@@ -316,8 +318,9 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
||||
|
||||
tempchan = ichan ? ichan : ast_channel_walk_locked(tempchan);
|
||||
|
||||
if ( !tempchan && !lastchan )
|
||||
if (!tempchan && !lastchan) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (tempchan && search_group) {
|
||||
const char *mygroup;
|
||||
@@ -340,10 +343,13 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
||||
ast_stopstream(chan);
|
||||
ast_say_number(chan, confno, AST_DIGIT_ANY, chan->language, (char *) NULL);
|
||||
res = conf_run(chan, confno, confflags);
|
||||
if (res<0) break;
|
||||
if (res < 0) {
|
||||
break;
|
||||
}
|
||||
input = res;
|
||||
} else if (tempchan)
|
||||
} else if (tempchan) {
|
||||
ast_channel_unlock(tempchan);
|
||||
}
|
||||
lastchan = tempchan;
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user