mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
clean up various whitespace issues (issue #7236, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -121,7 +121,7 @@ static struct ast_jb_conf default_jbconf =
|
||||
static struct ast_jb_conf global_jbconf;
|
||||
|
||||
#if !defined(ZT_SIG_EM_E1) || (defined(HAVE_LIBPRI) && !defined(ZT_SIG_HARDHDLC))
|
||||
#error "Your zaptel is too old. please update"
|
||||
#error "Your zaptel is too old. Please update"
|
||||
#endif
|
||||
|
||||
#ifndef ZT_TONEDETECT
|
||||
@@ -377,7 +377,8 @@ static int zt_sendtext(struct ast_channel *c, const char *text);
|
||||
static inline int zt_get_event(int fd)
|
||||
{
|
||||
int j;
|
||||
if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
|
||||
if (ioctl(fd, ZT_GETEVENT, &j) == -1)
|
||||
return -1;
|
||||
return j;
|
||||
}
|
||||
|
||||
@@ -386,8 +387,10 @@ static inline int zt_wait_event(int fd)
|
||||
{
|
||||
int i, j = 0;
|
||||
i = ZT_IOMUX_SIGEVENT;
|
||||
if (ioctl(fd, ZT_IOMUX, &i) == -1) return -1;
|
||||
if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
|
||||
if (ioctl(fd, ZT_IOMUX, &i) == -1)
|
||||
return -1;
|
||||
if (ioctl(fd, ZT_GETEVENT, &j) == -1)
|
||||
return -1;
|
||||
return j;
|
||||
}
|
||||
|
||||
@@ -1760,7 +1763,8 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
|
||||
set_actual_gain(p->subs[SUB_REAL].zfd, 0, p->rxgain, p->txgain, p->law);
|
||||
|
||||
mysig = p->sig;
|
||||
if (p->outsigmod) mysig = p->outsigmod;
|
||||
if (p->outsigmod)
|
||||
mysig = p->outsigmod;
|
||||
|
||||
switch (mysig) {
|
||||
case SIG_FXOLS:
|
||||
@@ -1795,7 +1799,6 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
|
||||
p->cidrings = p->sendcalleridafter;
|
||||
}
|
||||
|
||||
|
||||
/* nick@dccinc.com 4/3/03 mods to allow for deferred dialing */
|
||||
c = strchr(dest, '/');
|
||||
if (c)
|
||||
@@ -2481,7 +2484,6 @@ static int zt_hangup(struct ast_channel *ast)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
|
||||
p->owner = NULL;
|
||||
p->ringt = 0;
|
||||
@@ -2634,7 +2636,6 @@ static int zt_hangup(struct ast_channel *ast)
|
||||
restart_monitor();
|
||||
}
|
||||
|
||||
|
||||
p->callwaitingrepeat = 0;
|
||||
p->cidcwexpire = 0;
|
||||
p->oprmode = 0;
|
||||
@@ -2812,7 +2813,8 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
||||
p->mate = 0;
|
||||
if (!*cp) { /* turn it off */
|
||||
ast_log(LOG_DEBUG, "Set option TDD MODE, value: OFF(0) on %s\n",chan->name);
|
||||
if (p->tdd) tdd_free(p->tdd);
|
||||
if (p->tdd)
|
||||
tdd_free(p->tdd);
|
||||
p->tdd = 0;
|
||||
break;
|
||||
}
|
||||
@@ -2836,7 +2838,8 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
||||
}
|
||||
fd = p->subs[index].zfd;
|
||||
while (len) {
|
||||
if (ast_check_hangup(chan)) return -1;
|
||||
if (ast_check_hangup(chan))
|
||||
return -1;
|
||||
size = len;
|
||||
if (size > READ_SIZE)
|
||||
size = READ_SIZE;
|
||||
@@ -2849,7 +2852,8 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
||||
continue;
|
||||
}
|
||||
/* if got exception */
|
||||
if (fds[0].revents & POLLPRI) return -1;
|
||||
if (fds[0].revents & POLLPRI)
|
||||
return -1;
|
||||
if (!(fds[0].revents & POLLOUT)) {
|
||||
ast_log(LOG_DEBUG, "write fd not ready on channel %d\n", p->channel);
|
||||
continue;
|
||||
@@ -2866,7 +2870,8 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
|
||||
p->didtdd = 1; /* set to have done it now */
|
||||
}
|
||||
if (*cp == 2) { /* Mate mode */
|
||||
if (p->tdd) tdd_free(p->tdd);
|
||||
if (p->tdd)
|
||||
tdd_free(p->tdd);
|
||||
p->tdd = 0;
|
||||
p->mate = 1;
|
||||
break;
|
||||
@@ -3528,7 +3533,8 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
|
||||
|
||||
index = zt_get_index(ast, p, 0);
|
||||
mysig = p->sig;
|
||||
if (p->outsigmod) mysig = p->outsigmod;
|
||||
if (p->outsigmod)
|
||||
mysig = p->outsigmod;
|
||||
p->subs[index].f.frametype = AST_FRAME_NULL;
|
||||
p->subs[index].f.subclass = 0;
|
||||
p->subs[index].f.datalen = 0;
|
||||
@@ -5379,7 +5385,8 @@ static void *ss_thread(void *data)
|
||||
if (!p->immediate)
|
||||
/* Wait for the first digit (up to 5 seconds). */
|
||||
res = ast_waitfordigit(chan, 5000);
|
||||
else res = 0;
|
||||
else
|
||||
res = 0;
|
||||
if (res > 0) {
|
||||
/* save first char */
|
||||
dtmfbuf[0] = res;
|
||||
@@ -6522,7 +6529,8 @@ static int handle_init_event(struct zt_pvt *i, int event)
|
||||
alarm2str(res), i->channel);
|
||||
/* fall thru intentionally */
|
||||
case ZT_EVENT_ONHOOK:
|
||||
if (i->radio) break;
|
||||
if (i->radio)
|
||||
break;
|
||||
/* Back on hook. Hang up. */
|
||||
switch (i->sig) {
|
||||
case SIG_FXOLS:
|
||||
@@ -7853,7 +7861,8 @@ static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
|
||||
return principle;
|
||||
/* First, check for other bearers */
|
||||
for (x = 0; x < pri->numchans; x++) {
|
||||
if (!pri->pvts[x]) continue;
|
||||
if (!pri->pvts[x])
|
||||
continue;
|
||||
if (pri->pvts[x]->call == c) {
|
||||
/* Found our call */
|
||||
if (principle != x) {
|
||||
@@ -11078,9 +11087,8 @@ static int load_module(void *mod)
|
||||
#endif
|
||||
res = setup_zap(0);
|
||||
/* Make sure we can register our Zap channel type */
|
||||
if(res) {
|
||||
if (res)
|
||||
return -1;
|
||||
}
|
||||
if (ast_channel_register(&zap_tech)) {
|
||||
ast_log(LOG_ERROR, "Unable to register channel class 'Zap'\n");
|
||||
__unload_module();
|
||||
@@ -11152,8 +11160,7 @@ static int zt_sendtext(struct ast_channel *c, const char *text)
|
||||
}
|
||||
len = bytes;
|
||||
buf = mybuf;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
len = tdd_generate(p->tdd, buf, text);
|
||||
if (len < 1) {
|
||||
ast_log(LOG_ERROR, "TDD generate (len %d) failed!!\n", (int)strlen(text));
|
||||
@@ -11181,7 +11188,8 @@ static int zt_sendtext(struct ast_channel *c, const char *text)
|
||||
continue;
|
||||
}
|
||||
/* if got exception */
|
||||
if (fds[0].revents & POLLPRI) return -1;
|
||||
if (fds[0].revents & POLLPRI)
|
||||
return -1;
|
||||
if (!(fds[0].revents & POLLOUT)) {
|
||||
ast_log(LOG_DEBUG, "write fd not ready on channel %d\n", p->channel);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user